Copied to clipboard

Flag this post as spam?

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


  • Albert 8 posts 28 karma points
    Aug 11, 2011 @ 23:17
    Albert
    0

    User password in MSSQL

    Hi experts,

    My old server is almost dead, so I took the last backup set of my MSSQL database and the files, belonging to my Umbraco site. On my new server, I imported the database file into MSSQL Express 2008, and copied the website files to the folder where it belongs (same path as on the old server). I put the correct permissions on the files and folders. So far so good.

    I opened the website, and got an ASP.Net error, stating that the user "umbraco2" could not connect or something (can't remember the exact phrase - doesn't matter, that part is fixed). I looked back in my old server, and found a user called "umbraco2". I created a new user in MSSQL and then I had to choose a password.

    The problem is: it wasn't me who made the setup of umbraco, including MSSQL. I found an encrypted password in one of the files in the umbraco-folder, but that doesn't help me anything. I tried some different passwords, but it keeps saying that the user cannot login. Which is quite understandable, without the password.

    So my question is: how can I tell Umbraco what the password is, after I have created a new password for user "umbraco2"? I cannot make the encryption on my own...

    Yours,

    Albert van Harten
    Denmark

  • Albert 8 posts 28 karma points
    Aug 11, 2011 @ 23:30
    Albert
    0

    I've found the password - it turned out that the password I found wasn't encrypted. However, I am now getting another error:

    Cannot open database "umbraconlnu" requested by the login. The login failed. Login failed for user 'umbraco2'.

     

    Help!! 

  • Lennart Stoop 304 posts 842 karma points
    Aug 11, 2011 @ 23:34
    Lennart Stoop
    0

    Hi Albert,

    Im not sure if I understand correctly: you have created a new login and password for the db in MSSQL?

    If that's the case you can just update the connectionstring in the web.config (configuration > appsettings > umbracoDbDSN) with the new login and password.

     

    Grtz

    L

  • Albert 8 posts 28 karma points
    Aug 12, 2011 @ 00:13
    Albert
    0

    Thanks Lennart. How do I enter the web.config? I suppose you mean mywebserver.ext/umbraco ?  It says:

    Server Error in '/' Application.


    Login failed for user 'umbraco2'.

     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 'umbraco2'.

    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: Login failed for user 'umbraco2'.]
       System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +552
       System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
       System.Data.SqlClient.SqlConnection.Open() +384
       Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +54
       umbraco.BusinessLogic.User.setupUser(Int32 ID) +120
       umbraco.BusinessLogic.User..ctor(Int32 ID) +114
       umbraco.Global.Application_Error(Object sender, EventArgs e) +25
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       System.Web.HttpApplication.RaiseOnError() +159

     

  • Lennart Stoop 304 posts 842 karma points
    Aug 12, 2011 @ 00:26
    Lennart Stoop
    0

    The web.config is a physical file which you will find in the root folder of your website on the file system.

  • Albert 8 posts 28 karma points
    Aug 12, 2011 @ 00:36
    Albert
    0

    OK, thank you very much. I will try it tomorrow! Going to sleep now :) G'night!

    Albert

  • Albert 8 posts 28 karma points
    Aug 12, 2011 @ 09:12
    Albert
    0

    To be sure, I detached the database on my old server, copied the files (both .ldf and .mdf) and attached it to my new server.
    Furthermore, I checked the web.config, and the password and username are the same as in the database. Still the user umbraco2 cannot log on, so the website is not working.
    Doubting if I have to set up a new umbraco, and simply add all information manually...

     

    Albert van Harten
    Denmark

  • Lennart Stoop 304 posts 842 karma points
    Aug 12, 2011 @ 09:25
    Lennart Stoop
    0

    Hi Albert,

    Moving the database should work. What might be the issue here is that in MSSQL your database indeed has a username and password, but you also require a database login. When moving a database you need to create that login manually, and attach the database user to it.

    Check out the installation guide by @cultiv, more specific steps 7 through 9:

    http://cultiv.nl/blog/2011/7/18/how-to-install-umbraco-manually/

     

    Grtz

    L

  • Albert 8 posts 28 karma points
    Aug 13, 2011 @ 13:07
    Albert
    0

    Hi Lennart

    I followed the guide by @cultiv but it gives me the following error:

    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    Configuration Error
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: Unrecognized attribute 'restartOnExternalChanges'.

    Source Error:


    Line 2:  <configuration>
    Line 3:    <configSections >
    Line 4:      <section name="urlrewritingnet" restartOnExternalChanges="true" requirePermission="false" type="UrlRewritingNet.Configuration.UrlRewriteSection, UrlRewritingNet.UrlRewriter" />
    Line 5:      <section name="microsoft.scripting" type="Microsoft.Scripting.Hosting.Configuration.Section, Microsoft.Scripting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" />
    Line 6: 
     

    Source File: E:\ahar\nederlandsknu\web.config    Line: 4


    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:1.1.4322.2443; ASP.NET Version:1.1.4322.2470

     

    This is actually on a brand new Umbraco-setup, I will try later to import the old database, or something.

    Albert

  • Albert 8 posts 28 karma points
    Aug 13, 2011 @ 13:08
    Albert
    0

    Never mind - I forgot to change ASP.Net from 1.x to 4.x. Now it seems to work.... On next halt, I''ll return to this forum ;) LOL

     

  • Albert 8 posts 28 karma points
    Aug 13, 2011 @ 13:32
    Albert
    0

    Update: It works. Now I am having my old website back, on my new server.
    I might have made a mistake before, or, as it often happens in the world of IT: a combination of two mistakes.

    Albert

  • Lennart Stoop 304 posts 842 karma points
    Aug 13, 2011 @ 15:22
    Lennart Stoop
    0

    Yes, we learn most from our mistakes, glad to hear it works!

Please Sign in or register to post replies

Write your reply to:

Draft