ADO DB Connection to SQL Server (ASP.Net)

G

Guest

I'm attempting to connect to a SQL Server DB, using ADO, from my new ASP.NET
web application. I can use the same connect string from within a VB.Net app
(windows app) just fine, but I cannot do it from within my web app... Here
is the error I am receiving:

Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection.

I am using windows authentication, which works just fine within my windows
app - I'm using the web server on my local machine... Here is my connect
string and code associated with this:

sDatabaseType = "SQL Server"
sServerName = "MyServer"
sDatabaseName = "MyDatabase"sConnectString = "DRIVER={SQL
Server};SERVER=" & sServerName & ";Trusted_connection=yes;DATABASE=" &
sDatabaseName & ";"
gdcDataConnection = New ADODB.Connection
gdcDataConnection.Open(sConnectString)

I would appreciate any help that you can provide!!!!!
Thank you!-Valerie
 
C

Cor Ligthert

Krdev.

This problem is almost forever that the user for a webserver application is
the ASPNET or the IIS user. And need therefore the rights on the database
that you use confirm that.

I hope this helps,

Cor
 
G

Guest

ASP .Net application is runnig under "ASPNET" account for IIS 5 and Network
Services in IIS 6. While Windows appliations are running under the current
user account.
So what you need is add access persissions on the server, database, table,
views, stored prcedures for the ASPNET or the Network Services account

I hope this helps
 

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