Session Security in ASP.Net/VB.Net

T

Tristan

uhm First time ive encountered this situation. I am getting a Security
Exception when referencing a Session Variable.

Line 54: Dim objCustomer As New Customer
Line 55: 'If Session("uid") > -1 Then
--> Line 56:
objCustomer.LoadCustomterDetails(CInt(Session("UID")))
Line 57: 'End If
Line 58: lblFirstName.Text = objCustomer.FirstName

This is the Breakpoint where it falls over.

Here is the error:

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.


The session is created when a user Logs into the Web site and thier
Username/password is Validated by a customer Login object. The UID is
returned and assigned to the Session("UID")

In this situation the File that is referencing the session is within a
restricted zone which only keeps out anonymous uses. No roles ahve
been assigned at this stage. Also it is using standard
FormsAuthentication methods.

Any Suggestion Welcome!
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top