468,287 Members | 1,916 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,287 developers. It's quick & easy.

Configuration Error Session authentication mode="Forms">

Hi
I have a problem with my web applications. I believe the problem is
somehow connected to HttpSession.
I use form authentication in my project. Once I authenticate the user and
redirect to default page
I create an User object and assign this object to session["MyUserObject"].
Then in other forms I access this object and use it to load data from
database. Some times I keep
data in the object as a property of object. For example let say my object is
student. I read student courses
and keep them as student.courses property of my user object.
It works fine but when I deploy the project to web server after some time
(may be 30 min, some timeout probably ) I start throwing following error:

Configuration Error ....

Parser Error Message: It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This error
can be caused by a virtual directory not being configured as an application
in IIS.

Source Error:
Line 44: by Microsoft that offers a single logon and core profile
services for member sites.
Line 45: -->
Line 46: <authentication mode="Forms"> //THIS LINE IS MARKED WITH RED
COLOR
Line 47: <forms loginUrl="Secure/Login.aspx"
Line 48: name = "ASPXAUTHPCRWS"
I noticed that I get the same error if I try to assign null value to
session["MyUserObject"] in Global.aspx Session_end event handler.
Then I removed the session["MyUserObject"] = myobj from the code and the
errors sopped.
Of course my application stopped working as well since I need this object
later in my program.

I thought that the reason is that I assign session["MyUserObject"] =
myobj before user have been authenticated by
FormsAuthentication.RedirectFromLoginPage(srlzobj, false);

but the change I made to fix this does not seems to work either.

Thanks for your reply. I am getting really desperate here.
Angel

Nov 18 '05 #1
0 5175

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Anton ml. Vaheie | last post: by
6 posts views Thread by Meena Desai | last post: by
29 posts views Thread by not.here.now | last post: by
2 posts views Thread by MrBee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.