Deployment problem

Last post 05-10-2008 9:56 PM by nmpgaspar. 6 replies.

Sort Posts:

  • Deployment problem

    05-07-2008, 1:46 PM
    • Loading...
    • nmpgaspar
    • Joined on 03-03-2008, 6:59 AM
    • Posts 14

     

    After setting up the login users, stored on ASPNETDB.mdf, and tested the WebApp on Visual Studio, i published the site to my server.

    The index.aspx file shows the result of a query on my ASPNETDB.mdf file - all fine with that.

    But when i try to login, all the users account give me: "Your login attempt was not successful. Please try again."

    I have my ASPNETDB.mdf file in App_Data folder, i did nothing in particular, just publish from Visual Studio. I have SQL Server Express running on my server, the result showed by the query made in the index.aspx file is fine too.

    So my question is, why isn't the login accounts working? Any idea?

  • Re: Deployment problem

    05-07-2008, 1:54 PM
    • Loading...
    • Jeev
    • Joined on 11-24-2005, 7:49 AM
    • Posts 1,112

     Make sure that you have the name of the application set up in the Membership registration section of the web.config. If not there is no way for the membership provider to corelate your production app to the development applications and it then relies on the url and creates a new application entry

    http://weblogs.asp.net/scottgu/archive/2006/04/22/Always-set-the-_2200_applicationName_2200_-property-when-configuring-ASP.NET-2.0-Membership-and-other-Providers.aspx 

    Jeev
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If you get the answer to your question, please mark it as the answer.
  • Re: Deployment problem

    05-07-2008, 5:18 PM
    • Loading...
    • nmpgaspar
    • Joined on 03-03-2008, 6:59 AM
    • Posts 14

    I have no Membership tag in web.config file. I just have:

    <roleManager enabled="true"/>

    i replaced it with:

    <roleManager enabled="true">

    <providers>

    <clear/>

    <add type="System.Web.Security.RoleProvider, System.Web" name="AspNetSqlRoleProvider"

    applicationName="/" />

    </providers>

    and now i'm getting an exception: Parser Error Message: Provider must implement the class 'System.Web.Security.RoleProvider'.

    Wath should i replace with? Include Membership just like in the article? Or include de ApplicationName in RoleManager? How?

  • Re: Deployment problem

    05-08-2008, 12:13 PM
    • Loading...
    • nmpgaspar
    • Joined on 03-03-2008, 6:59 AM
    • Posts 14

    From wath i've read from microsoft website,

    <roleManager enabled="true"><providers>

     

    <add

    applicationName="/"

    name="AspNetWindowsTokenRoleProvider"

    type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

    </providers>

    </roleManager>

    Should have done the trick. But i'm still getting the same problem.

    If i put <clear/> before the <add> i get an exception. How should i fix that?

  • Re: Deployment problem

    05-08-2008, 12:35 PM
    • Loading...
    • Jeev
    • Joined on 11-24-2005, 7:49 AM
    • Posts 1,112

    See the applicationName rather that  "/" give it a name 

    eg" applicationName="Mywebsite"  

    Jeev
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If you get the answer to your question, please mark it as the answer.
  • Re: Deployment problem

    05-08-2008, 12:46 PM
    • Loading...
    • nmpgaspar
    • Joined on 03-03-2008, 6:59 AM
    • Posts 14

    By checking  on my asp_Applications table, i see that the applicationName is set to "/", that's why i putted that in the web.config file.

    Why should i put "MyWebsite" as a name? From wath i've read from scott Gu article, putting "/" as the applicationName should fix the deployment issue...

    Anyhow, setting the ApplicationName to "Mywebsite" gives me an exception when running it:

    Parser Error Message: The entry 'AspNetWindowsTokenRoleProvider' has already been added.
    Line 40:       <providers>
    Line 41:        
    Line 42:         <add
    Line 43:         applicationName="MyWebSite"
    Line 44:         name="AspNetWindowsTokenRoleProvider"

    ..

  • Re: Deployment problem

    22 hours, 32 minutes ago
    • Loading...
    • nmpgaspar
    • Joined on 03-03-2008, 6:59 AM
    • Posts 14

    anyone?

    Can't figure wath i am doing wrong..

     

Page 1 of 1 (7 items)