SecurityException for registry access while opening SQL Connection
From: Brian Noyes (brian@softinsight.com)
Date: 01/28/03
- Next message: GolferAGW: "Error with ASPNET_WP.EXE creating temporary asp.net folder"
- Previous message: Vince: "Web.config"
- Next in thread: Bassel Tabbara [MS]: "RE: SecurityException for registry access while opening SQL Connection"
- Reply: Bassel Tabbara [MS]: "RE: SecurityException for registry access while opening SQL Connection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Brian Noyes" <brian@softinsight.com> Date: Tue, 28 Jan 2003 10:41:28 -0500
I have something strange going on on two of my development machines. If I do
something as simple as trying to open a SQL connection to a database from an
ASP.NET page, I get a security exception for registry access. The exact same
code on my two other machines does not cause this. See below for the
exception dump.
If I go an change machine.config processModel to use SYSTEM as the user
instead of machine, the problem clears up, but that is a security hole.
Any ideas why opening a SQL connection would require registry access on one
machine but not another. They are all trying to access it as ASPNET, and
that user has been granted access.to the database. The registry security
access check appears to be happening after the database access check,
because if I deny the ASPNET user access to the database, that exception is
thrown first.
I'm sure it is some config setting somewhere, but I have not done any
tweaking of config on these machines myself. In fact on one of them, I
uninstalled VS.NET, .NET, SQL, and IIS, and reinstalled them all with latest
service packs and it did not clear the problem.
Any help greatly appreciated.
Security Exception
Description: The application attempted to perform an operation not allowed
by the security policy. To grant this application the required permission
please contact your system administrator or change the application's trust
level in the configuration file.
Exception Details: System.Security.SecurityException: Requested registry
access is not allowed.
Source Error:
Line 52: {
Line 53: SqlConnection conn = new
SqlConnection("server=localhost;Trusted_Connection=true;database=Northwind")
;
Line 54: conn.Open();
Line 55: conn.Close();
Line 56: }
- Next message: GolferAGW: "Error with ASPNET_WP.EXE creating temporary asp.net folder"
- Previous message: Vince: "Web.config"
- Next in thread: Bassel Tabbara [MS]: "RE: SecurityException for registry access while opening SQL Connection"
- Reply: Bassel Tabbara [MS]: "RE: SecurityException for registry access while opening SQL Connection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|