Problem Connecting to SQL

A

Aaron Bellante

I have been creating some pages that pull info from an SQL database
located on my computer. I have an identical DB located on the
production machine. The page runs fine on my PC (XP Pro), but when I
move everything over to the target machine (2003 Server) I get this
error:

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:

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: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection
(SqlConnectionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
System.Web.SessionState.SqlStateConnection..ctor(String
sqlconnectionstring)

[HttpException (0x80004005): Unable to connect to SQL Server session
database.]
System.Web.SessionState.SqlStateConnection..ctor(String
sqlconnectionstring)
System.Web.SessionState.SqlStateClientManager.GetConnection(Boolean&
usePooling)
System.Web.SessionState.SqlStateClientManager.GetExclusive(String id)
System.Web.SessionState.StateClientManager.BeginGetExclusiveSync
(String id, AsyncCallback cb, Object state)

System.Web.SessionState.SqlStateClientManager.System.Web.SessionState.IS
tateClientManager.BeginGetExclusive(String id, AsyncCallback cb, Object
state)
System.Web.SessionState.SessionStateModule.GetSessionStateItem()
System.Web.SessionState.SessionStateModule.BeginAcquireState(Object
source, EventArgs e, AsyncCallback cb, Object extraData)

System.Web.AsyncEventExecutionStep.System.Web.HttpApplication+IExecution
Step.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +173


Can someone help me? I am obviously fairly new to this. I really can't
figure out what I am missing.

Thanks
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi Aaron,

It seems that you are using integrated auth. try to change it to SQL auth.

Cheers,
 
A

Aaron Bellante

"Ignacio Machin said:
Hi Aaron,

It seems that you are using integrated auth. try to change it to SQL auth.

Cheers,
I am. Is it possible to use Integrated Authority. If not, why?
 
A

Aaron Bellante

I have been creating some pages that pull info from an SQL database
located on my computer. I have an identical DB located on the
production machine. The page runs fine on my PC (XP Pro), but when I
move everything over to the target machine (2003 Server) I get this
error:
<snip>

I found an answer to my problem. For anyone else who has this problem
go to:
http://www.microsoft.com/resources/documentation/WindowsServ/2003/standa
rd/proddocs/en-us/Default.asp?
url=/resources/documentation/WindowsServ/2003/standard/proddocs/en-
us/sec_acc_wpenable.asp

Thanks, Ignacio, for your response. It pushed me in the right
direction.
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

Of course it's possible, in fact you are using it in your station, now what
you have to do is include the auth for the production machine.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top