Can't connect to SQL (ASPNET account)

From: mm2 (jraahauge@yahoo.com)
Date: 07/08/02


From: "mm2" <jraahauge@yahoo.com>
Date: Sun, 7 Jul 2002 18:24:17 -0700


Hi

I have a problem connecting via ASP.NET to my production
SQL 2000 Server. The SQL server is on my webserver running
Win 2000 Server and the Server was locked down before
installing ASP.NET. I don't have any problems in my test
environment, but that isn't locked down either.
I have allowed the ASPNET account access to the directory
with the webfiles and I have allowed the account select
access on the database in question. I have tried the
following connection strings:

("server=localhost;database=xxx;trusted_connection=true;")
("server=localhost;database=xxx;trusted_connection=yes;")
("server=127.0.0.1;database=xxxx;uid=xxx;pwd=xxx;")
("Data Source=
(local);database=xxx;trusted_connection=yes;")
("server=(local);database=xxx;User Id=xxx;Password=xxx")
("server=(local);database=xxx;Trusted_Connection=yes")

Here is my error message:

Exception Details: System.UnauthorizedAccessException:
Access is denied.

Stack Trace:

[UnauthorizedAccessException: Access is denied.]
System.Data.SqlClient.SqlConnection.Open() +761
ASP.data_aspx.Page_Load() in D:\aspx\data.aspx:8
System.Web.Util.ArglessEventHandlerDelegateProxy.Callback
(Object sender, EventArgs e) +10
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +29
System.Web.UI.Page.ProcessRequestMain() +724

I can make it work if I change the user in the
machine.config file to SYSTEM, but that is not an option
to me since it would leave my webserver way to vulnerable.
I don't even understand why some solutions suggest using
this approach.

Hope somebody can help me.



Relevant Pages

  • RE: SBS 2003 Unable to connect to database STS_Config
    ... Uninstall the SQL server from the SBS 2k3 server from add/remove programs ... Uninstall Microsoft SQL Server Desktop Engine (SHAREPOINT) ... If AV software install any extra IIS virtual directory, ...
    (microsoft.public.windows.server.sbs)
  • Re: Memory issues with 64-bit SQL Server 2005 on 64-bit Win 2003 C
    ... I also checked the individual patch levels for the .NET drivers, SQL Server ... The SQL Server is fully patched, however Windows Update reported that the OS ... Lock pages in memory -- I guess you might have taken care of it as well. ...
    (microsoft.public.sqlserver.clustering)
  • RE: migrating from wmsde to sql server
    ... Click Start, point to All Programs\Microsoft SQL Server, and then click ... then click New SQL Server Registration. ... Microsoft CSS Online Newsgroup Support ... This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)
  • RE: SBS 2003 Unable to connect to database STS_Config
    ... Uninstall the SQL server from the SBS 2k3 server from add/remove programs ... Uninstall Microsoft SQL Server Desktop Engine (SHAREPOINT) ... If AV software install any extra IIS virtual directory, ...
    (microsoft.public.windows.server.sbs)
  • Re: Best replication architecture?
    ... Looking for a SQL Server replication book? ... So if it is subscribing to Publisher 1, ...
    (microsoft.public.sqlserver.replication)