By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,971 Members | 1,467 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,971 IT Pros & Developers. It's quick & easy.

Configuration Error Session authentication mode="Forms">

P: n/a
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 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
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.

Nov 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.