locked
Help : can't login and can't register after moving the site to IIS RRS feed

  • Question

  • User1851116723 posted
    I tested the site in VS2005, created a user and Administrators role. Everything
    works fine in VS2005, I can login, add events,...

    I copied all the web site folder to an IIS server folder, including the app_data
    folder. I can access the web site, it displays well, but I cannot login and I can't
    register a new member.

    Does anyone know how to correct this? It looks like it's a database problem,
    but I'm not sure, I'm kind of new with ASP and SQLExpress mdf file.

    Is it enough to just copy the app_data folder?

    Thanks a lot.

    Aymeric
    Thursday, January 5, 2006 6:21 AM

All replies

  • User1851116723 posted
    UPDATE :
    I isolated the problem, it's a write permission on the aspnetdb.
    Failed to update database "C:\INETPUB\WWWROOT\INTRANET\APP_DATA\ASPNETDB.MDF" because the database is read-only.

    I gave ASPNET the full control to the app_data, restarded IIS but I still get this error.

    Anyone could help me please?
    Friday, January 6, 2006 5:39 AM
  • User-1732934972 posted

    I am having the exact same issue, so I am bumping this thread back to the top. If anyone knows, please help. :)

    Thanks!

    Tuesday, February 7, 2006 8:29 PM
  • User-1732934972 posted

    OK, I found it. I'm in XP Pro in a workgroup environment (not a domain).

    Must turn off simple file sharing and give directory permissions to ASPNET, IUSR_, and IWAM_ (and maybe NETWORK SERVICE) users.

    Open windows explorer, Tools -> folder options -> View tab

    Go to bottom option and uncheck Use simple file sharing.

    Then go to the directory that contains your web site, right click -> Sharing and Security.

    Add the users listed above and give read/write pirvs.

    BINGO.

    I hope this helps someone! Good Luck.

    Wednesday, February 8, 2006 8:23 PM
  • User1008851990 posted

    how about publishing to hosting providers where you do not have admin rights?  how do you grant the correct level of permissions to enable the Login/Register functionality at a remote hosting provider rather than on a local server at home?

    Thanks.

    Thursday, February 9, 2006 7:20 AM
  • User-1732934972 posted

    If they can host and serve your site and they have SQL Express installed you "should" be OK. If you are not OK, i.e. your pages are served but you can't log in to the site on the host, here is some stuff to consider:

    1. Your connection string. You will most likely need to edit the DataSource property in the connection string to match the name on the host. The connection string is in the web.config. mine looks like this:

    <connectionStrings>
      <add name="ClubSiteDB" connectionString="Data Source=.\SQLEXPRESS;Integrated Security=true;AttachDBFileName=|DataDirectory|Club.mdf;User Instance=True"
       providerName="System.Data.SqlClient" />
     </connectionStrings>

    I had to change "Data Source=.\SQLEXPRESS" to "Data Source=.\ProvidersServerName" so my site could access the ClubSitDB.

    Confession on my part: I have not yet found how the connection is set in the project to connect to ASPNETDB to do the role validation/login. BUT I had a guy at my host provider go into my site in IIS -> Properties -> ASP.NET tab -> Edit Configuration -> General tab : there is a Connection string manager. I had him set the connection string for the ASPNETdb to the necessary DataSource name.

    Best-O-Luck!

    Thursday, February 9, 2006 5:11 PM