ASP.NET Web Site + SQL Server Connectivity Problems!

G

Gareth

Can somebody help me with the following problem I have?

Configuration:

1 x Microsoft Windows Server 2003 Web Edition + IIS 6.0 + ASP.NET

1 x Microsoft Windows Server 2003 Standard Edition + SQL Server 2000 Service
Pack 3

Both PC's are installed on a separate switch so that they can talk to each
other and they are isolated from the rest of our internal network. The web
server is publically accessible on the internet. Both PC's are in a
WORKGROUP and NOT in a domain.

I have an ASP.NET web application running on the web server that has a login
page with is served over SSL. The login code creates a SQL server connection
to the database server in order to process the login.

The connection string on the web server is in the registry and contains:
server=<servername>; database=<Databasename>; integrated security = SSPI;

The SQL Server is set to Windows Integrated security. I have created a local
user account on the database PC with GUEST access rights. I have added this
user to the SQL server security logins and given the account appropriate
access to the required stored procedures in the relevant database.

On the web server I have created a local user account with GUEST access
rights. Same name and same password as the account on the SQL server box.
In IIS 6.0 I am setting the web site username for anonymous logins to be
this user account.

In the asp.net web.config file I have set <identity impersonate="true" />.

When I attempt to login to the database I get the following error message:

System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason:
Not associated with a trusted SQL Server connection. at
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString options, Boolean& isInTransaction) at
System.Data.SqlClient.SqlConnection.Open() at
SpringFin.Login.VerifyPassword(String suppliedUserName, String
suppliedPassword)



I tried setting the web.config to this...

<identity impersonate="true" userName="<username>" password="password" />

....but that only caused a server error and the web page would not start at
all.

I am a little lost at this point and I would appreciated some guidance if
anyone can help.

Kind regards,
Gareth
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top