You need to Register for free and Login to post a message in the forum.

Forum

Issue 22 - Login failed for user xxxx
Last Post 2011-08-30 02:35 PM by Déclic Vidéo FX. 15 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
picoUser is Offline
Nuke Newbie
Nuke Newbie
Posts:4

--
2008-08-28 03:00 PM
    Hello,

    I'm following the 'How to transfer a localhost DNN installation to a live website' tutirial in issue 22, but have hit a brick wall.

    Once I've created the new user, assigned it to my DNN database and ammended the web.config file, I get the 'Login failed for user' error that is pasted below.

    The installation works corectly before doing this. I've redone it several times over and have repeated it on a second computer - always with the same result.

    I've pasted the connection string bits from the web.config file below the error code.

    I'm using MSSQL Express 2008 rather than 2005. Perhaps the connection string needs to be different.

    Does anyone have any thoughts?

    Thanks
    Craig Allen


    Login failed for user 'craigallen'.

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

    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): Login failed for user 'craigallen'.]
    System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +428
    System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
    System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
    System.Data.SqlClient.SqlConnection.Open() +122
    Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.DiscoverSpParameterSet(SqlConnection connection, String spName, Boolean includeReturnValueParameter, Object[] parameterValues) +233
    Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSetInternal(SqlConnection connection, String spName, Boolean includeReturnValueParameter) +343
    Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName, Boolean includeReturnValueParameter) +175
    Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName) +45
    Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String spName, Object[] parameterValues) +207
    DotNetNuke.Services.Log.EventLog.DBLoggingProvider.Data.SqlDataProvider.GetLogTypeConfigInfo() +71
    DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.GetLogTypeConfigInfo() +101
    DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.GetLogTypeConfigInfoByKey(String LogTypeKey, String LogTypePortalID) +66
    DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.AddLog(LogInfo objLogInfo) +75
    DotNetNuke.Services.Log.EventLog.LogController.AddLog(LogInfo objLogInfo) +193


    Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053


    ---------------

    Connection string bits from the web.config file ...

     
        <!-- Connection String for SQL Server 2005 Express -->
       
        <!-- Connection String for SQL Server 2000/2005
              name="SiteSqlServer"
          connectionString="Server=(local);Database=DotNetNuke;uid=;pwd=;"
          providerName="System.Data.SqlClient" />
       -->
     

     
        <!-- Connection String for SQL Server 2005 Express - kept for backwards compatability - legacy modules   -->
       
    Joseph CraigUser is Offline
    DNN Creative Support
    Nuke Master VI
    Nuke Master VI
    Posts:9008
    Avatar

    --
    2008-08-28 03:06 PM
    Use SQL Server Management Studio or the express version to see which username and password will connect to the database. You may need to add new logins at the server level.

    Also, I don't know for a fact that DotNetNuke will run with SQL Server 2008. You may need to check that, too.

    Joe Craig, DNN Creative Support

    Subscribe to DNNCreative
    I recommend PowerDNN for DotNetNuke Hosting.
    picoUser is Offline
    Nuke Newbie
    Nuke Newbie
    Posts:4

    --
    2008-08-29 04:51 AM
    Thanks Joe,

    You put me on the right track there. Turns out that I had server authentication set to
    'Windows Authentication' mode rather than the required
    'SQL Server and Windows Authentication mode.

    For anyone else with this problem, you can change the authentication mode by right-clicking your server node in the SQL Management Studio, then going to the security tab.
    Then you need to restart the server using the SQL Server Configuration Tool.

    Cheers
    Craig Allen
    CharlesUser is Offline
    Nuke Newbie
    Nuke Newbie
    Posts:4
    Avatar

    --
    2008-09-05 04:54 PM
    Thanks picoallen for the tip. The same error was driving me nuts; such a simple solution.

    Thanks again.
    -----------------------------------------
    Charles Legg, Independent Consultant
    Legg Consulting
    DerpirUser is Offline
    Nuke Ace
    Nuke Ace
    Posts:52
    Avatar

    --
    2008-09-05 05:21 PM
    Thanks Joe,

    You put me on the right track there. Turns out that I had server authentication set to
    'Windows Authentication' mode rather than the required
    'SQL Server and Windows Authentication mode.

    For anyone else with this problem, you can change the authentication mode by right-clicking your server node in the SQL Management Studio, then going to the security tab.
    Then you need to restart the server using the SQL Server Configuration Tool.

    Cheers
    Craig Allen


    OK I am using SQL server Express 2005 and I can't really find were to change the authentication mode as Craig describes above.
    I have also followed Lees videos and are stuck with this, have anyone give me a helping hand, anyone?

    best regards
    Lee SykesUser is Offline
    DNN Creative Staff
    Nuke Master VI
    Nuke Master VI
    Posts:4945
    Avatar

    --
    2008-09-05 05:34 PM
    I just checked and it does have it:

    Right click on the SQL server node - this is the node with the green arrow on it
    Properties
    Security
    Lee Sykes
    Site Administrator
    Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

    Twitter: www.twitter.com/DNNCreative

    Lee Sykes's Facebook Profile
    beterthanlifeUser is Offline
    Nuke Newbie
    Nuke Newbie
    Posts:1

    --
    2008-09-10 05:28 PM
    Hi all,

    really useful post, however I have checked my sqlserver authentication and it is already set to "SQL server and windows authentication mode", yet i still get " Login failed for user 'xxxx' ".


    I know my uid and password are correct, yet I cant connect to the database! PLZZZZZZ HELP!

    my web.config connection string is:

    Data Source=DB1;Initial Catalog=StudNet;User ID=xxx;Password=xxx
    Joseph CraigUser is Offline
    DNN Creative Support
    Nuke Master VI
    Nuke Master VI
    Posts:9008
    Avatar

    --
    2008-09-12 03:43 AM
    Can you connect to your database using SQL Server Management Studio (or Express version)?

    What server address is in your connection string?

    Are you using SQL Server or SQL Server Express?

    Joe Craig, DNN Creative Support

    Subscribe to DNNCreative
    I recommend PowerDNN for DotNetNuke Hosting.
    ipcaliforniaUser is Offline
    Nuke Newbie
    Nuke Newbie
    Posts:2

    --
    2009-06-13 07:30 AM
    Hi -

    To reset the Server in SQL 2008, check out this post:

    http://social.msdn.microsoft.com/Fo...3d585365e3

    HTH

    ipcalifornia
    KenUser is Offline
    Nuke Newbie
    Nuke Newbie
    Posts:7

    --
    2010-09-08 03:35 PM
    Recently we had to update passwords for our database that DNN is attached to. While users are able to log in and use the system we have a nagging entry that keeps appearing in our event log that indicates that the Help Search Item collector can not log into the system (see event log below.)

    In attempting to resolve the problem I have insured that I can log into our database server with the username (dnnProd1) and the new password (no problem.) I have also verified that the connection parameters in the web.config are correct. I have made a grep sweep of the DNN directories as well as the registry looking for the aforementioned user to which I found nothing.

    I’m at wits end with this and am looking for any help that could help resolve the problem. Does anybody have a suggestion on how to resole this problem?

    AssemblyVersion: -1
    PortalID: -1
    PortalName:
    UserID: -1
    UserName:
    ActiveTabID: -1
    ActiveTabName:
    RawURL:
    AbsoluteURL:
    AbsoluteURLReferrer:
    UserAgent:
    DefaultDataProvider:
    ExceptionGUID:
    InnerException: Login failed for user 'DnnProd1'.
    FileName:
    FileLineNumber: -1
    FileColumnNumber: -1
    Method:
    StackTrace:
    Message: System.Data.SqlClient.SqlException: Login failed for user 'DnnProd1'. at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.DiscoverSpParameterSet(SqlConnection connection, String spName, Boolean includeReturnValueParameter, Object[] parameterValues) at Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSetInternal(SqlConnection connection, String spName, Boolean includeReturnValueParameter) at Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName, Boolean includeReturnValueParameter) at Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String spName, Object[] parameterValues) at DotNetNuke.Modules.Help.SqlDataProvider.GetTutorialsByModule(Int32 ModuleId) at DotNetNuke.Modules.Help.HelpController.GetByModules(Int32 ModuleId) at DotNetNuke.Modules.Help.HelpController.GetSearchItems(ModuleInfo ModInfo) at DotNetNuke.Services.Search.ModuleIndexer.GetSearchIndexItems(Int32 PortalID)

    Joseph CraigUser is Offline
    DNN Creative Support
    Nuke Master VI
    Nuke Master VI
    Posts:9008
    Avatar

    --
    2010-09-09 12:13 AM
    There are TWO connection strings in web.config.  Can you verify that you checked both of them?

    Joe Craig, DNN Creative Support

    Subscribe to DNNCreative
    I recommend PowerDNN for DotNetNuke Hosting.
    Déclic Vidéo FXUser is Offline
    Nuke Pro
    Nuke Pro
    Posts:91
    Avatar

    --
    2011-08-20 10:30 PM
    Hello,

    I have the same and exact problem....
    I tried all methods described here, without success.
    I am using Windows 7 / SQL Express 2008

    But I think that my connection string is not correct. Can someone please check and correct me if necessary ?

    Here is what I have:
    <connectionStrings>
        <!-- Connection String for SQL Server 2000/2005 -->
        <add name="SiteSqlServer" connectionString="server=(local);database=my-db-name;uid=my-account-name;pwd=my-password;" providerName="System.Data.SqlClient" />
      </connectionStrings>

    And few lines after:
        <!-- Connection String for SQL Server 2000/2005 - kept for backwards compatability - legacy modules -->
        <add key="SiteSqlServer" value="server=(local);database=my-db-name;uid=my-account-name;pwd=my-password;" />



    Any idea ?
    Thanks a lot,
    DV FX
    Déclic Vidéo FX - http://declic-video-fx.com
    Joseph CraigUser is Offline
    DNN Creative Support
    Nuke Master VI
    Nuke Master VI
    Posts:9008
    Avatar

    --
    2011-08-22 08:53 PM
    It looks like you are using the form of the connection string appropriate to SQL Server and not SQL Server Express.

    Try connectionstrings.com to figure out the format. There is an example, too, in the web.config file.

    I would try to be more specific, but I'm not currently connected to anything with SQL Server Express so it's hard to test right now.

    Joe Craig, DNN Creative Support

    Subscribe to DNNCreative
    I recommend PowerDNN for DotNetNuke Hosting.
    Joseph CraigUser is Offline
    DNN Creative Support
    Nuke Master VI
    Nuke Master VI
    Posts:9008
    Avatar

    --
    2011-08-22 08:54 PM

    Joe Craig, DNN Creative Support

    Subscribe to DNNCreative
    I recommend PowerDNN for DotNetNuke Hosting.
    Joseph CraigUser is Offline
    DNN Creative Support
    Nuke Master VI
    Nuke Master VI
    Posts:9008
    Avatar

    --
    2011-08-22 09:12 PM
    For a local machine named mycomputer and using integrated security: Data Source=mycomputer\SQLEXPRESS;Initial Catalog=mydatabasename;Integrated Security=True

    If you don't want to use integrated security, you can supply and user id and password: Data Source=MRINAL-THINK\SQLEXPRESS;Initial Catalog=dnndev;Persist Security Info=True;User ID=username; pwd=mypassword

    Joe Craig, DNN Creative Support

    Subscribe to DNNCreative
    I recommend PowerDNN for DotNetNuke Hosting.
    Déclic Vidéo FXUser is Offline
    Nuke Pro
    Nuke Pro
    Posts:91
    Avatar

    --
    2011-08-30 02:35 PM
    Hello Joseph,

    Thanks to your wonderful links, I managed to make it working !!! CONGRATULATIONS, without you, I would still fight...
    It was a problem of web.config, and the link gave me all information: http://www.dynamicdataworks.com/not...ress-.aspx

    I am now using:

     <!-- Connection String for SQL Server 2000/2005 --> 
         <add name="SiteSqlServer" connectionString="server=(local);database=my-db;uid=my-user;pwd=abcd;" providerName="System.Data.SqlClient" /> 
      
      
     <!-- Connection String for SQL Server 2000/2005 - kept for backwards compatability - legacy modules --> 
         <add key="SiteSqlServer" value="server=(local);database=my-db;uid=my-user;pwd=abcd;" /> 
    


    DV
    Déclic Vidéo FX - http://declic-video-fx.com
    You are not authorized to post a reply.


    Active Forums 4.3

    Latest Forum Posts

    RE: DNN site automatically redirects to a different domain name. by imran shaikh
    Thanks for the reply joe this is my portalalias table entries 2 0 localhost/tradeupgrade -1
    RE: "Good" hosting providers by ejcullen rene
    informative!!!
    RE: URL Master Module doesn't work on IHostASP hosting by ejcullen rene
    informative!!!
    RE: shared web hosting by ejcullen rene
    informative!!. i got hosting service from http://www.thewebpole.com/ my hosting company offers you
    RE: iPhone website logo in DNN root directory by JohnnieD
    I'm supposed to add this link to make my custom logo show up on iPhones. Where in DNN would I a
    iPhone website logo in DNN root directory by JohnnieD
    I'm trying to put an iPhone logo that I made into my site so when someone saves the website on their
    RE: Fixed size container by Joseph Craig
    Use an HTML module and style the container to have a fixed height and width. Set the overflow attr
    Fixed size container by Aggiedan97
    I am looking for advice or an actual container that has a fixed height (and width). An HTML module w
    RE: DNN 6.1 app_offline.htm by Joseph Craig
    If the site "works" in Chrome, Firefox and Safari, but not in IE8 look to IE8 as the problem. It is
    RE: DNN site automatically redirects to a different domain name. by Joseph Craig
    Make a copy what is in the portalalias table and then remove all but the localhost entry. Verify th
    DNN 6.1 app_offline.htm by Dave Hassall
    Hi As recommended I have successfully been using the app_offline.htm whilst performing upgrades t
    RE: DNN site automatically redirects to a different domain name. by imran shaikh
    Hi i have done same as mention in this post my dnn folder name is Trademaxomanupg with
    Enforce Terms Tutorial Update by Vistalogix Corporation
    I tried configuring my DNN 6.1.2 install to have a required "accept terms" checkbox as described in
    RE: Best Practices for Modifying a Custom Module by Joseph Craig
    Start up the development website, then install the module using the package that you have. Then, yo
    Best Practices for Modifying a Custom Module by schilders
    Good Morning, I'm needing to modify a custom built module created by another developer targeted f
    RE: Admin menu problem by alireza arabiyan
    hi in localhost i have http://localhost/senf/خانه.aspx and http://localhost/senf/Admi
    RE: Admin menu problem by Joseph Craig
    Yes, that is what you should have done. What is the URL for your home page? What is the URL for
    RE: Admin menu problem by alireza arabiyan
    hi first in localhost i add my domain.com as portal alias. then copy all files to host , restore my
    RE: Admin menu problem by Joseph Craig
    How did you move it? Have you added an entry in the portalalias table for the site's domain name?
    RE: Re: SQL SERVER 2008 R2 Remote connection by Joseph Craig
    Set up a user with dbo privileges and set the connection string for that user, rather than using Win
    You are not logged in.
    You must log in to access all 
    650+ videos, tutorials, podcasts, and more.
    RSS Feeds