asp.net security problem

G

Guest

Hi,
I am hosting a ASP.net web application in a web server. The SQL Server is
locates in the net work it was not in the web server.
The Web server has set up newly

Can anyone tell me how the connectionstring has to made in the web.config
file.

..ASPX file works fine for me. When I am trying to connect the SQL Server I
am getting the below message.

Server Error in '/' Application.
--------------------------------------------------------------------------------

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:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:


[SecurityException: Requested registry access is not allowed.]
Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +473
System.Diagnostics.EventLog.CreateEventSource(String source, String
logName, String machineName, Boolean useMutex) +445
System.Diagnostics.EventLog.CreateEventSource(String source, String
logName, String machineName) +11
System.Diagnostics.EventLog.CreateEventSource(String source, String
logName) +11

Microsoft.ApplicationBlocks.ExceptionManagement.DefaultPublisher.VerifyValidSource()
 
D

David Lloyd

From the stack trace it appears that your exception is more likely being
caused by code related to creating an event source. Please see the
following KB article for more information.

http://support.microsoft.com/default.aspx?scid=kb;en-us;329291

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


Hi,
I am hosting a ASP.net web application in a web server. The SQL Server is
locates in the net work it was not in the web server.
The Web server has set up newly

Can anyone tell me how the connectionstring has to made in the web.config
file.

..ASPX file works fine for me. When I am trying to connect the SQL Server I
am getting the below message.

Server Error in '/' Application.
--------------------------------------------------------------------------------

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:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:


[SecurityException: Requested registry access is not allowed.]
Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
+473
System.Diagnostics.EventLog.CreateEventSource(String source, String
logName, String machineName, Boolean useMutex) +445
System.Diagnostics.EventLog.CreateEventSource(String source, String
logName, String machineName) +11
System.Diagnostics.EventLog.CreateEventSource(String source, String
logName) +11

Microsoft.ApplicationBlocks.ExceptionManagement.DefaultPublisher.VerifyValidSource()
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top