Access Denied to sqlConnection

J

John Giblin

I am trying to make a connection to the Db and everytime I try to open
the connection I get "access denied"

"ASP.NET is not authorized to access the requested resource. Consider
granting access rights to the resource to the ASP.NET request
identity. ASP.NET has a base process identity (typically
{MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if
the application is not impersonating. If the application is
impersonating via <identity impersonate="true"/>, the identity will be
the anonymous user (typically IUSR_MACHINENAME) or the authenticated
request user."


Now I have asp.net process running under a service account which is
part of the local admins.
web.config settings
<identity impersonate="false"/>
<authentication mode="Windows" />

I have IIS5 running intergrate security.

The Connection string I used through the gui in vs.net which was able
to see the tables. So it can see it.

Does anyone have an idea what this is? Help me please. This is
driving me crazy. I hate MS.

Also, I had it under impersonate = true and the stupid app kept ask
for my username\password\domain. Why is not using the sa account?
Here is my connectiob string.
this.sqlConnection1.ConnectionString = "workstation
id=NYCNJGIBLIN;packet size=4096;user id=sa;data
source=\"nycnjgiblin\\p" +
"erfect\";persist security info=False;initial catalog=SitePages";

any help would be appreciated.
John
 
N

Naveen K Kohli

Are you using Windows authentication or moxed mode authentication on SQL
Server?
 

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,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top