Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • MrMufakka 24 posts 44 karma points
    Jun 23, 2011 @ 01:18
    MrMufakka
    0

    Login fails after restore

    Hello

    First time Umbraco user here. I've been fighting with a site for several days. About to give up. Here's the dilemma.

    Umbraco installs great. I can log in at the /umbraco screen and it all works. Then comes the database restore (I'm transferring this site from another server). The restore completes however now when I try to log in at the /umbraco screen, I just get the red shakey boxes.

    I found this thread during a search and tried the command that is posted there that drops and adds the user. I've executed this code with no errors but I still can't get in. I'm out of ideas.

    http://our.umbraco.org/forum/getting-started/installing-umbraco/5199-Copy-existing-Umbraco-instance---SQL-Server-problems?p=0

    Also, I'm very new to SQL. Please be kind in your replies.

    Thanks!!

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jun 23, 2011 @ 04:38
    Tom Fulton
    0

    Hi,

    After you did the database restore, moved the files, updated permissions etc - did you update the web.config with the new connection string details (new server name, database name, user, password)?  The red shakey boxes can occur if the site can't access the database for whatever reason (instead of giving a DB connection error).  When this happens to me I usually visit the front end of the website and it gives me the real SQL error that leads me in the right direction.

    Might not be your issue, but worth a shot to check..

    -Tom

  • MrMufakka 24 posts 44 karma points
    Jun 23, 2011 @ 04:52
    MrMufakka
    0

    Thanks for the reply and the info about there possibly being a different error than the username or password.

    Let me ask you this (as I'm figuring out this as I go along). You mentioned "moving the files" and "updating the permissions". Can you elaborate on that please? I haven't done anything past restoring the database.

    Also, I took your advice and tried accessing the front of the site. I got and error saying ''login failed for user "xxxxx".

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jun 23, 2011 @ 14:09
    Tom Fulton
    0

    Hi,

    Are you moving web servers or just database servers?  If you are moving web servers you'll need to re-apply write permissions to the website files for your app pool user.

    If you are just moving to a different database server you don't need to worry about that.

    However, you will need to update the connection string in the web.config to point to the new server, new database name, and new login/password.  Have you already done that?  The error is indicating that the login/password you have in your web.config is not valid for the database you are trying to access.

    -Tom

  • MrMufakka 24 posts 44 karma points
    Jun 23, 2011 @ 15:08
    MrMufakka
    0

    I'm moving web servers. I'm sorry if this is a rookie question but is there any documentation on applying the write permissions to the files for my app pool user? I'm just unsure what this means. I know what and how to change permissions, I just don't know what files to change.

    Thanks for all your help!

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jun 23, 2011 @ 15:12
    Tom Fulton
    0

    It's a bit outdated, but there's a wiki article explaining the permissions: http://our.umbraco.org/wiki/reference/files-and-folders/permissions

    However I think most usually just apply write permissions to the entire site.

    The way you do this depends on your host environment - are you using some shared hosting service?  Usually you can apply the permissions through their control panel.  Or do you have access to the Windows box?  If so you would just apply NTFS permissions as normal to the entire site folder, giving Write permissions to the user who is running the Application Pool that the site uses.  Let me know your setup and I'm sure we can figure it out.

    I don't think this is related to the "shakey box" problem you are having, which looks like an SQL connection string issue, but this will need to be done anyway if it hasn't already.  Have you checked the SQL connection string details?

     

     

  • MrMufakka 24 posts 44 karma points
    Jun 24, 2011 @ 05:54
    MrMufakka
    0

    OK, I've gone through and set "full control" to the user. Still no luck with the log in. I'm trying to log in with the user and password that is called out in the web.config file.  What else should I look at in that file?

    Also, earlier you mentioned about moving files. What files are you referring to here?

    Once again, thanks for helping me on this.

    Edit: This is in my current web.config file. Do I need to replace the databae, user and password with my umbraco database settings?

      <connectionStrings>
        <remove name="LocalSqlServer" />
        <!--<add name="LocalSqlServer" connectionString="server=.\sqlexpress;database=aspnetdb;user

    id=DBUSER;password=DBPASSWORD" providerName="System.Data.SqlClient"/>-->
      </connectionStrings>

  • Trevor Loader 199 posts 256 karma points
    Jun 24, 2011 @ 06:12
    Trevor Loader
    0

    If it is actually an incorrect password issue, check the password in the umbracoUser table.  If it's not encrytped, double check the login name and password and try again.

    If it is encrypted, update your web.config so that the UsersMembershipProviders passwordFormat="Clear".  Then change the password in the database to a new password.

    At this point you'll be able to log in (assuming it really is just a pasword issue).

    While still logged in, change the web.config back to "Hashed" and go to the User section and reset your password.  At this point your password should be encrypted again in the database.

  • MrMufakka 24 posts 44 karma points
    Jun 24, 2011 @ 06:44
    MrMufakka
    0

    I've gone into the user table and changed the password for "admin". I've also changed the web.config file to reflect this user name and password. Logging in with that new info still does not work.

     

    I did notice something interesting however. There were to users in that table. admin and editor. The user I originally setup with the database (and that was working prior to the database restore) is not listed in that table.

  • Trevor Loader 199 posts 256 karma points
    Jun 24, 2011 @ 07:20
    Trevor Loader
    0

    Are you trying to log into the back end with a "Member" username and password instead of "User" username and password?  Often confusing.

    If the table only has Admin and Editor then these are the only two users that can log into the umbraco backend.

    Was your web.config hashed or clear?

  • MrMufakka 24 posts 44 karma points
    Jun 24, 2011 @ 07:24
    MrMufakka
    0

    I'm trying to log into the http://localhost/umbraco/ with user: admin and password: password. These are the settings that are now in the umbracoUser table and in my web.config file.

    The web.config file originally said hashed. I changed it to clear however the password was still encrypted when viewed in the table. I simply clicked on the encrypted password and typed "password" (just as a temp password). I went back into the table and double checked that the change took.

  • Simon Dingley 1470 posts 3427 karma points c-trib
    Jun 24, 2011 @ 07:49
    Simon Dingley
    0

    Since you have restored the database are you still able to view the front end of the site? If you are restoring a database to another server you will need to remap the database user and permissions. If these are not configured correctly you should get an error on the front end of the site.

  • MrMufakka 24 posts 44 karma points
    Jun 24, 2011 @ 07:53
    MrMufakka
    0

    If I try and view the site from the front end, I get a runtime error, Server Error in '/' Application.

    This is the site... http://184.168.93.142/

  • Simon Dingley 1470 posts 3427 karma points c-trib
    Jun 24, 2011 @ 07:55
    Simon Dingley
    0

    Can you either temporarily disable custom errors in your web.config or set it to RemoteOnly and view the page from the server to find out the detail of the exception being thrown?

  • MrMufakka 24 posts 44 karma points
    Jun 24, 2011 @ 08:03
    MrMufakka
    0

    Ok, I set it to RemoteOnly and viewed it from the server. This appeared.

     

    Server Error in '/' Application.


    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]
       System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +690
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +89
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +6296606
       System.Data.SqlClient.SqlConnection.Open() +300
       Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +97
       umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) +150
    
    [SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteReader]
       umbraco.DataLayer.SqlHelper`1.ExecuteReader(String commandText, IParameter[] parameters) +261
       umbraco.cms.businesslogic.web.Domain.<GetDomains>b__0() +128
       umbraco.cms.businesslogic.cache.Cache.GetCacheItem(String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem) +159
       umbraco.cms.businesslogic.cache.Cache.GetCacheItem(String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem) +126
       umbraco.cms.businesslogic.cache.Cache.GetCacheItem(String cacheKey, Object syncLock, CacheItemRemovedCallback refreshAction, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem) +112
       umbraco.cms.businesslogic.cache.Cache.GetCacheItem(String cacheKey, Object syncLock, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem) +88
       umbraco.cms.businesslogic.web.Domain.GetDomains() +173
       umbraco.cms.businesslogic.web.Domain.Exists(String DomainName) +42
       umbraco.requestHandler.CreateXPathQuery(String url, Boolean checkDomain) +285
       umbraco.requestHandler..ctor(XmlDocument umbracoContent, String url) +605
       umbraco.UmbracoDefault.Page_PreInit(Object sender, EventArgs e) +1294
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       System.Web.UI.Page.PerformPreInit() +49
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1700
    


  • Simon Dingley 1470 posts 3427 karma points c-trib
    Jun 24, 2011 @ 08:05
    Simon Dingley
    0

    And there lies your problem. There is a problem with the connection between Umbraco and your SQL Server instance. Make sure that your connection string is correct in the umbracoDbDSN appsetting.

  • Trevor Loader 199 posts 256 karma points
    Jun 24, 2011 @ 08:08
    Trevor Loader
    0

    If your have tripple checked your web.config connection string (as Simon suggests) and it is correct...is your database on the same server as IIS?

    If not, could also be firewall issues.  You'll need to open the SQL ports on the DB server.

  • MrMufakka 24 posts 44 karma points
    Jun 24, 2011 @ 08:09
    MrMufakka
    0

    I've tried numerous combinations in the web.config file. The above error is with the server setting as my server's IP address.

    I've tried switching the server setting back to .\sqlexpress. I now get this error:

     

    Server Error in '/' Application.


    Login failed for user 'admin'.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'admin'.

  • MrMufakka 24 posts 44 karma points
    Jun 24, 2011 @ 08:12
    MrMufakka
    0

    This is the connection strings section of my web.config file. Does this look correct?

      <connectionStrings>
        <remove name="LocalSqlServer" />
        <!--<add name="LocalSqlServer" connectionString="server=.\sqlexpress;database=dreamfinders;user id=admin;password=password" providerName="System.Data.SqlClient"/>-->
      </connectionStrings>

  • Simon Dingley 1470 posts 3427 karma points c-trib
    Jun 24, 2011 @ 08:12
    Simon Dingley
    1

    Good, that's a step forward, your server address is now correct but the username/password is not or the correct user in the database is not mapped as per my original post. My suggestion would be to remove the user "admin" from the database and then add it again ensuring that the password for the user is the same as the one you are using in your web.config. Note: This is not the umbraco user but the actual database user account. 

  • Simon Dingley 1470 posts 3427 karma points c-trib
    Jun 24, 2011 @ 08:13
    Simon Dingley
    0

    Also, I seriously suggest you change the password at the very least on that database user account for a live installation!

  • MrMufakka 24 posts 44 karma points
    Jun 24, 2011 @ 08:18
    MrMufakka
    0

    Embarassing but... how do I remove and add a user. I'm using MS SQL Studio. Sorry!!

    I THINK I go to the security folder that is in the database tree. Then right click on the users folder and click New user. I do not see where I put the password. Only the user name & login name.

  • MrMufakka 24 posts 44 karma points
    Jun 24, 2011 @ 08:26
    MrMufakka
    0

    I'm IN!!!!

    I found the security folder under logins. Changed that password. Tried logging in and it worked!

    HUGE THANKS to you guys for walking this rookie through all of this. I'm sure it was painful.

  • nirmala 4 posts 74 karma points
    Apr 04, 2018 @ 09:26
    nirmala
    0

    Hi IN

    Where do i find security folder?

    Regards

    Nirmala

  • Simon Dingley 1470 posts 3427 karma points c-trib
    Jun 24, 2011 @ 08:29
    Simon Dingley
    1

    Yay, result! Not painful at all I used to be new to this once and know how grateful you can be of help when you have been beating your head against a wall trying to work something out ;)

    Make sure you vote for a solution and click the "High Five" beside any posts you found helpful.

    Thanks

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jun 24, 2011 @ 13:54
    Tom Fulton
    0

    Wow, 20 responses later while I was sleeping - glad you finally got it worked out!

  • MrMufakka 24 posts 44 karma points
    Jun 27, 2011 @ 01:40
    MrMufakka
    0

    I'd give all you guys high fives but I guess I need omre karma points.

     

    A big thanks though!

Please Sign in or register to post replies

Write your reply to:

Draft