HELP!!!!!!! Problem with roles..

Discussion in 'Databases' started by qwerty, Dec 27, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi,
    as usually everything worked pretty well on my local and not on the DASP.
    I have roles and they are not working on DASP? Why? Do I have to change something when I copy my files to DASP?
    Do I have to create roles on DASP?
    I'm confused...
     
  2. Yes...The roles need to be reflected.
    Are you using SQL Server on both ends?
     
  3. I've tried what they have in KB at http://kb.discountasp.net/article.aspx?id=10413
    but it doesn't help me, still when logged in user wants to access his profile, web-site tries to send me to login page, as if I don't have permission to enter that part of the web-site.
     
  4. Are you using a particular Starter Kit or CMS?
     
  5. I actually did everything by myself.
    I assigned roles using ASP.NET Configuration on my local. and it works perfect on my local server.
     
  6. Do you see the Roles/Users [using the ASP.NET Configuration tool -under security] ,after you updated your connection string to point to the DASP membership database?.If you just moved your local version of your membership database which has the roles/users to DASP SQL server, it should still have the roles/users in it.Do you have any other kind of authentication/authorization setting for specific location's in your web.config?

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  7. YEs, I see.

    Here is my web.config:



    <configuration>
    <appSettings/>

    <connectionStrings>
    <clear/>
    <remove name='LocalSqlServer' />
    <add name='LocalSqlServer' connectionString='Data Source=tcp:sql2k501.discountasp.net;Integrated Security=False;Initial Catalog=XXX;User ID=XXX;Password=DBPassword'
    providerName='System.Data.SqlClient' />
    <add name='ASPDBConnectionString' connectionString='Data Source=tcp:sql2k501.discountasp.net;Initial Catalog=XXX;User ID=XXX;Password=XXX;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True'
    providerName='System.Data.SqlClient' />

    </connectionStrings>
    <system.web>
    <!--
    Set compilation debug='true' to insert debugging
    symbols into the compiled page. Because this
    affects performance, set this value to true only
    during development.
    -->
    <pages styleSheetTheme='Blue'/>
    <customErrors defaultRedirect='~/Error.aspx' />
    <roleManager enabled='true' />
    <compilation debug='true'/>
    <!--
    The <authentication> section enables configuration
    of the security authentication mode used by
    ASP.NET to identify an incoming user.
    -->
    <authentication mode='Forms' />
    <!--
    The <customErrors> section enables configuration
    of what to do if/when an unhandled error occurs
    during the execution of a request. Specifically,
    it enables developers to configure html error pages
    to be displayed in place of a error stack trace.

    <customErrors mode='RemoteOnly' defaultRedirect='GenericErrorPage.htm'>
    <error statusCode='403' redirect='NoAccess.htm' />
    <error statusCode='404' redirect='FileNotFound.htm' />
    </customErrors>
    -->
    <membership defaultProvider='MyProvider'>
    <providers>
    <add passwordFormat='Clear' minRequiredNonalphanumericCharacters='0'
    minRequiredPasswordLength='3' requiresQuestionAndAnswer='true'
    requiresUniqueEmail='true' enablePasswordRetrieval='true' connectionStringName='LocalSqlServer'
    name='MyProvider' type='System.Web.Security.SqlMembershipProvider' applicationName='/PapersProject' />
    </providers>
    </membership></font>
     
  8. For some reason it seems you are loosing your session when you try to visit the profile page.I mean the user is able to log in and view other pages,right?
    Can you provide us with a test account to test with?

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  9. Thanks for a quick reply, yes I'm using SQL Server,
    so what should I do now?
     
  10. Your roles appear to be working, there are other, unknown,problems causing errors.
    I was able to login, before that I was able to have the password mailed out.
    This could be something simple like file location, or location directives.
     
  11. There seems to be an error[theme 'blue' file missing],when I click on My Profile after logging in.

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  12. the problem is that it cannot find files which are on the root from non-root folder.
    The structure is like that:

    Root
    Themes->Blue
    Papers->UserProfile.aspx

    and it looks for Blue in the Papers folder, it is really very interesting, cause the links are correct and on the local computer it works!
     
  13. and also I can't get why it doesn't let me see the page, cause the registered user is allowed to see the page, but it still tryes to send me to the Login page, which is by the way also was on the root, but just for test moved it to the Papers folder also.

    Thanks for helping!
     
  14. Does anybody has any idea how to solve this problem? I can't figure it out for the 5th day already,
    please give me any idea,
    thank you /emoticons/confused.gif
     
  15. That solved my problem!!!!!!!!!!!!
    God bless you!!!
    Happy New Year!!!!!!!!!!!!
     
  16. Is the papers sub-folder configured as a sub-application</font>?Since the 'Theme' folder is considered as an ASP.NET folder and therefore the sub-application looks for this folder or its items in the same application domain i.e papers itself.Only work around for this to have Themes folder under papers or dont configue 'papers' as a sub-appln.

    The above[in red] could also cause the logging out issue.Remember, the scope of the user being logged in is only valid until you are accessing secured pages within that particular application.As soon as you goto the profiles page which is under 'papers' sub-appln ,your logged in status goes out of scope and you get re-directed to the login page.The solution to this would be to set the application name under the membership section to something in your root web.config,which will then get inherited to your sub-appln[papers] and this will resolve the above issue.

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page