parser errors loading class

G

Guest

For an application root i use a web.config file and specify this authentication and authorization scheme:

<authentication mode="Forms"><forms loginUrl = "AdminLogin.aspx" name = "FORMSAUTHCOOKIE" path="/" timeout="10"></forms></authentication><authorization><deny users="*"/></authorization>

The result when browsing to the application root (under which are sensitive .aspx pages), is that AdminLogin.aspx is found, but not loaded. There is a parser error loading the code behind class.

What is the likely solution to this issue? Why?
 
G

Guest

<authorization><allow users="*" /><!-- Allow all users --></authorization
Tommy's suggestion, given below, yields the same inability to load the class in the C# codebehind file

Now, for folders that you want to restrict access, create a Web.Confi
that contains only the "Authorization" section, and deny anonymou
access

<authorization><deny users="?" /><allow users="*" /><!-- Allow all users --></authorization>
 
G

Guest

David Coe's suggestion, given below, also does not allow the codebehind class to load

In the root web.config file, specify a location for certain configuration, like this

<location path="AdminPages"><system.web><authentication mode="Forms"><forms loginUrl = "AdminLogin.aspx" name = "FORMSAUTHCOOKIE" path="/" timeout="30"></forms></authentication><authorization><deny users="*"/><!--allow users="*"/--></authorization></system.web></location>
 
G

Guest

The answer is to first make the subfolder an application root using iis properties. Then create a bin folder in the subfolder and copy the application's .dll into it.
 

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

Top