an ASP.NET Open Source CMS & eCommerce platform
Search:
Skip Navigation LinksHome > DotShoppingCart Forums > Support > Using DotShoppingCart > I need to create new roles under admin role and...
Last Post 5/1/2009 9:56:27 PM By lukezy. 25 replies.
Page 2 of 3 (26 posts) << First < Prev 1 2 3 Next > Last >> 
4/30/2009 9:48:45 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: I need to create new roles under admin role and assign permissions accordingly
Did you add this?
 
<location path="Admin/Catalog">
        <system.web>
            <authorization>
                <allow roles="Administrator, ProductAdmin"/>
            </authorization>
        </system.web>
    </location>
DotShoppingCart Staff
4/30/2009 10:05:35 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: I need to create new roles under admin role and assign permissions accordingly
Yes. I still cannot access any of the admin functions. The web config looks like this
 
 
<configuration>
    <appSettings/>
    <connectionStrings/>
    <system.web>
        <httpRuntime executionTimeout="120" maxRequestLength="20000"/>
        <authorization>
            <allow roles="Administrator"/>
            <deny users="*"/>
        </authorization>
    </system.web>
<location path = "Admin/Catalog">
    <system.web>
      <authorization>
            <allow roles="Administrator,ProductAdmin"/>
      </authorization>
   </system.web>
</location>
</configuration>
 

 

4/30/2009 10:14:06 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: I need to create new roles under admin role and assign permissions accordingly
Hmm, try changing the path to the Products.aspx explicitly. And see if you can have access to just Products.apsx page.
 
<location path = "Admin/Catalog/Products.aspx">
    <system.web>
      <authorization>
            <allow roles="Administrator,ProductAdmin"/>
      </authorization>
   </system.web>
</location>
 
 
DotShoppingCart Staff
4/30/2009 11:54:49 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: I need to create new roles under admin role and assign permissions accordingly
No. Still the same probelm. I cannot access that page. It takes me the login page even though i am logged in when i try to access products page.
 
I added this to the sitemap,
 
<siteMapNode url="/Admin/Catalog/Products.aspx" title="$resources:Common,Products" useSSL="false" allowedRoles="Administrator,ProductAdmin" helplink="Online%20Help/Product%20Management/Managing%20Products.aspx" />
 
 
Is this right? Just making sure i didn't miss out anything in sitemap.
 
4/30/2009 12:03:11 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: I need to create new roles under admin role and assign permissions accordingly
I registered username lukez on your site. Would you please assign me the ProductAdmin role? I could take a look myself.
DotShoppingCart Staff
4/30/2009 12:23:07 PM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: I need to create new roles under admin role and assign permissions accordingly
I wasn't trying it on the live site. I was testing on the demo version i downloaded couple of weeks back. When i tried these changes on the live site, the site is crashing. 
 
 
Server Error in '/' Application
4/30/2009 12:33:03 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: I need to create new roles under admin role and assign permissions accordingly
To receive the exception email, you find the following section in web.config and update email address.
 

    <loggingConfiguration name="Logging Application Block" tracingEnabled="true" defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">

        <listeners>

            <add toAddress="youremail@domain.com" fromAddress="system@domain.com" subjectLineStarter="Unhandled Execption: "

 
Or you can use this to get exception stack.
DotShoppingCart Staff
4/30/2009 12:39:15 PM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: I need to create new roles under admin role and assign permissions accordingly
Here is the stack
 
 
Event code: 3008
Event message: A configuration error has occurred.
Event time: 4/30/2009 12:26:50 PM
Event time (UTC): 4/30/2009 7:26:50 PM
Event ID: 082076ca576a4dedaf88d78211566f74
Event sequence: 13
Event occurrence: 5
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/1/ROOT-3-128855925748912855
    Trust level: Full
    Application Virtual Path: /
    Application Path: C:\DSC\Web\
    Machine name: SD9000
 
Process information:
    Process ID: 2272
    Process name: w3wp.exe
    Account name: NT AUTHORITY\NETWORK SERVICE
 
Exception information:
    Exception type: ConfigurationErrorsException
    Exception message: Multiple nodes with the same URL '/Admin/Catalog/Products.aspx' were found. XmlSiteMapProvider requires that sitemap nodes have unique URLs.
 
Request information:
    Request URL: http://www.sd9000.com/default.aspx
    Request path: /default.aspx
    User host address: 66.184.103.138
    User: 
    Is authenticated: False
    Authentication Type: 
    Thread account name: NT AUTHORITY\NETWORK SERVICE
 
Thread information:
    Thread ID: 21
    Thread account name: NT AUTHORITY\NETWORK SERVICE
    Is impersonating: False
    Stack trace:    at System.Web.XmlSiteMapProvider.AddNodeInternal(SiteMapNode node, SiteMapNode parentNode, XmlNode xmlNode)
   at System.Web.XmlSiteMapProvider.ConvertFromXmlNode(Queue queue)
   at System.Web.XmlSiteMapProvider.BuildSiteMap()
   at System.Web.StaticSiteMapProvider.FindSiteMapNode(String rawUrl)
   at System.Web.XmlSiteMapProvider.FindSiteMapNode(String rawUrl)
   at System.Web.SiteMapProvider.FindSiteMapNode(HttpContext context)
   at System.Web.SiteMapProvider.get_CurrentNode()
   at System.Web.SiteMap.get_CurrentNode()
   at site.Page_Init(Object sender, EventArgs e) in c:\DSC\Web\site.master.cs:line 115
   at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
   at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
   at System.Web.UI.Control.OnInit(EventArgs e)
   at System.Web.UI.UserControl.OnInit(EventArgs e)
   at DotShoppingCart.Commercial.Base.DSCMasterPage.OnInit(EventArgs e)
   at site.OnInit(EventArgs e) in c:\DSC\Web\site.master.cs:line 68
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.default_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\45d6a688\a3507d1d\App_Web_f_89gm6f.4.cs:line 0
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
 
 
Custom event details:
 
4/30/2009 12:47:06 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: I need to create new roles under admin role and assign permissions accordingly
Multiple nodes with the same URL '/Admin/Catalog/Products.aspx' were found. XmlSiteMapProvider
 
Roll back your sitemap changes. You need to update the existing siteMapNode rather than add a new one with the same name.
DotShoppingCart Staff
4/30/2009 12:56:34 PM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: I need to create new roles under admin role and assign permissions accordingly
OK. I updated the siteMapNode and the web.config for admin.
 
I can login as the ProductAdmin user but can't access the admin functions. I assigned your login to the ProductAdmin role too. You can login now and take a look yourself.
Page 2 of 3 (26 posts) << First < Prev 1 2 3 Next > Last >>