pico
Nuke Newbie Posts:4
|
08/28/2008 9:00 AM |
|
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 Craig DNN MVP Posts:11667
|
08/28/2008 9:06 AM |
|
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, Patapsco Research Group Complete DNN Support |
|
|
pico
Nuke Newbie Posts:4
|
08/28/2008 10:51 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 |
|
|
|
|
Charles
Nuke Newbie Posts:6
|
09/05/2008 10:54 AM |
|
Thanks picoallen for the tip. The same error was driving me nuts; such a simple solution. Thanks again. |
|
----------------------------------------- Charles Legg, Independent Consultant Legg Consulting
|
|
|
|
Derpir
Nuke Ace Posts:52
|
09/05/2008 11:21 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 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 Sykes DNN Creative Staff
Nuke Master VI Posts:4945
|
|
beterthanlife
Nuke Newbie Posts:1
|
09/10/2008 11:28 AM |
|
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 Craig DNN MVP Posts:11667
|
09/11/2008 9:43 PM |
|
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, Patapsco Research Group Complete DNN Support |
|
|
ipcalifornia
Nuke Newbie Posts:2
|
|
Ken
Nuke Newbie Posts:7
|
09/08/2010 9:35 AM |
|
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 Craig DNN MVP Posts:11667
|
09/08/2010 6:13 PM |
|
There are TWO connection strings in web.config. Can you verify that you checked both of them?
|
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Déclic Vidéo FX
Nuke Pro Posts:93
|
08/20/2011 4: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 Craig DNN MVP Posts:11667
|
08/22/2011 2: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, Patapsco Research Group Complete DNN Support |
|
|
Joseph Craig DNN MVP Posts:11667
|
|
Joseph Craig DNN MVP Posts:11667
|
08/22/2011 3: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, Patapsco Research Group Complete DNN Support |
|
|
Déclic Vidéo FX
Nuke Pro Posts:93
|
08/30/2011 8:35 AM |
|
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 |
|
|