Solved

ASPNETDB.MDF from Host Server ---  Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

Posted on 2008-10-06
2
977 Views
Last Modified: 2012-05-05
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.50727\aspnet_regsql.exe")

Then I changed the Machine.Config File on the Host box also Located
("C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config")
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?

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

Open in new window

0
Comment
Question by:HarleySkater
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 1

Author Comment

by:HarleySkater
ID: 22649954
I commented out all the theme refrences in my aspx.vb pages behind code and the website it up, but of course without Profiling :*(  I am back on my developer box tryinig to configure the website to remotely connect to the aspnetdb I have on the Host Box :)

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.  

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

0
 
LVL 1

Accepted Solution

by:
HarleySkater earned 0 total points
ID: 22650522
The following message may help in diagnosing the problem: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty. (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config line 141)

so I am going to try to go to my machine.config file first... well actually I am just going to delete it and then reinstall asp.net 3.5
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem to refer to value 8 78
Finding the IIS version 5 37
SSRS Deployment problem 5 91
looking for an ASP.net report designer 4 41
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question