HarleySkater
asked on
ASPNETDB.MDF from Host Server --- Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
I ran into a problem transfering the website from the developer box to the host box. I developed in 2008 VDE and 2008 SQL Express. From the error I am guessing there is a problem with the website connecting to the database.
So I used asp.net Frameworks Reg SQL on the Host Box Located:
("C:\WINDOWS\Microsoft.NET \Framework \v2.0.5072 7\aspnet_r egsql.exe" )
Then I changed the Machine.Config File on the Host box also Located
("C:\WINDOWS\Microsoft.NET \Framework \v2.0.5072 7\CONFIG\m achine.con fig")
I modified the connection string to this -
<connectionStrings>
<add name="LocalSqlServer" connectionString="data source=AMCAP000;Integrated Security=SSPI;User Instance=true" providerName="System.Data. SqlClient" />
</connectionStrings>
Any suggestions on how to make this work?
So I used asp.net Frameworks Reg SQL on the Host Box Located:
("C:\WINDOWS\Microsoft.NET
Then I changed the Machine.Config File on the Host box also Located
("C:\WINDOWS\Microsoft.NET
I modified the connection string to this -
<connectionStrings>
<add name="LocalSqlServer" connectionString="data source=AMCAP000;Integrated
</connectionStrings>
Any suggestions on how to make this work?
Server Error in '/ACF' Application.
--------------------------------------------------------------------------------
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
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 'NT AUTHORITY\NETWORK SERVICE'.
Source Error:
Line 19: public virtual string MyTheme {
Line 20: get {
Line 21: return ((string)(this.GetPropertyValue("MyTheme")));
Line 22: }
Line 23: set {
Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\acf\233ceae2\35975430\App_Code.qtodrcie.0.cs Line: 21
Stack Trace:
[SqlException (0x80131904): Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4844759
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +144
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +433
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
System.Data.SqlClient.SqlConnection.Open() +122
System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +87
System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +221
System.Web.Profile.SqlProfileProvider.GetPropertyValuesFromDatabase(String userName, SettingsPropertyValueCollection svc) +772
System.Web.Profile.SqlProfileProvider.GetPropertyValues(SettingsContext sc, SettingsPropertyCollection properties) +433
System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider) +258
System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName) +132
System.Configuration.SettingsBase.get_Item(String propertyName) +102
System.Web.Profile.ProfileBase.GetInternal(String propertyName) +36
System.Web.Profile.ProfileBase.get_Item(String propertyName) +68
System.Web.Profile.ProfileBase.GetPropertyValue(String propertyName) +7
ProfileCommon.get_MyTheme() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\acf\233ceae2\35975430\App_Code.qtodrcie.0.cs:21
_Default.Page_PagePrePreInit(Object sender, EventArgs e) in G:\WEBSITE\ACF\Default.aspx.vb:5
System.Web.UI.Page.OnPreInit(EventArgs e) +8694814
System.Web.UI.Page.PerformPreInit() +31
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +282
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Provider Management
Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.
Open in new window