Exception Details: System.Data.SqlClient.SqlException: Cannot open database
"oaklandsymphonychorus" requested by the login. The login failed.
Login failed for user 'IIS APPPOOL\DefaultAppPool'.
Stack Trace:
[SqlException (0x80131904): Cannot open database "oaklandsymphonychorus"
requested by the login. The login failed.
Login failed for user 'IIS APPPOOL\DefaultAppPool'.]
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject) +578
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) +88
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +6265031
System.Data.SqlClient.SqlConnection.Open() +258
Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.DiscoverSpParameterSet(SqlConnection
connection, String spName, Boolean includeReturnValueParameter, Object[]
parameterValues) +391
Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSetInternal(SqlConnection
connection, String spName, Boolean includeReturnValueParameter) +641
Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName, Boolean includeReturnValueParameter) +208
Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName) +63
Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String
connectionString, String spName, Object[] parameterValues) +293
DotNetNuke.Services.Log.EventLog.DBLoggingProvider.Data.SqlDataProvider.GetLogTypeConfigInfo() +106
DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.GetLogTypeConfigInfo() +127
DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.GetLogTypeConfigInfoByKey(String LogTypeKey, String LogTypePortalID) +86
DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.AddLog(LogInfo objLogInfo) +98
DotNetNuke.Services.Log.EventLog.LogController.AddLog(LogInfo objLogInfo)
+254
---- end of stack trace ---------------------
The actual SQL login and database user is oscuser, and I created it with the
same password the production site uses. The test web site does use the
DefaultAppPool, and did before my upgrade. I'm using the following
connection strings, which worked until the system upgrade:
<connectionStrings>
<add name="SiteSqlServer" connectionString="Data Source=.\SQLEXPRESS;
Initial Catalog=oaklandsymphonychorus; Integrated Security=True;"
providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<add key="SiteSqlServer" value="Data Source=.\SQLEXPRESS; Initial
Catalog=oaklandsymphonychorus; Integrated Security=True;"/>
</appSettings>
Can anyone suggest why I'm now getting this login error? Is this a Win7
issue? I've seen one problem here where SQL Server was running under the
local userid and the local user had recently changed his password; I did
recently change my password, but when I checked the Logon tab for my SQL
Server, it was logged in as Network Service - it had password/password
confirmation fields below but of course they're encrypted and I have no idea
what they are.
--
hedera
Nature bats last.
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
http://betav.com http://betav.com/blog/billva
____________________________________________________________________________________________
"hedera" <hed...@discussions.microsoft.com> wrote in message
news:2079AD75-DAE5-4129...@microsoft.com...
First question: is there a database with this name at all?
> The actual SQL login and database user is oscuser, and I created it with
> the same password the production site uses. The test web site does use
> the DefaultAppPool, and did before my upgrade. I'm using the following
> connection strings, which worked until the system upgrade:
>
><connectionStrings>
> <add name="SiteSqlServer" connectionString="Data
>Source=.\SQLEXPRESS;
> Initial Catalog=oaklandsymphonychorus; Integrated Security=True;"
> providerName="System.Data.SqlClient" />
></connectionStrings>
><appSettings>
> <add key="SiteSqlServer" value="Data Source=.\SQLEXPRESS; Initial
> Catalog=oaklandsymphonychorus; Integrated Security=True;"/>
></appSettings>
Above you talk about an SQL login and user, but here you say
"Integrated Security=True", which means Windows authentication?
If you want to use an SQL login, you need to change the connection
string?
If you want to run with Windows authentication, you need to give
tihs APPPOOL user access to the database.
--
Erland Sommarskog, SQL Server MVP, esq...@sommarskog.se
Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Supposing I do want to use SQL authentication, what should my connection
string be? At this point I'm going to take the whole thing down and
reconstruct it.
--
hedera
Nature bats last.
"Erland Sommarskog" wrote:
> .
>
You should take out Integrated Security=True, and put in
User Id=username;Password=Pwd
There is some variation which keywords that are actually used, so it could
be Uid and Pwd instead.
www.connectionstrings.com may be worth checking out.
Nature bats last.
"Erland Sommarskog" wrote:
> .
>
exec sp_change_users_login 'Auto_fix', 'oscuser'
Thanks for helping me identify my real problem.
--
hedera
Nature bats last.
I see that you have already sorted out the issue. I only like to add this
is not something that started to happen with SQL 2005 SP2, but it has
been this way since the dawn of time.
The only thing that was new in SQL 2005 SP2, is you since then can use
the command ALTER USER SET LOGIN. The procedure sp_change_users_login
is older function for the same thing.
http://yeejie.
com/blog/post/2010/01/08/Login-failed-for-user-IIS-APPPOOL5cDefaultAppPool.
aspx