What should be my virtual directory using Form authentication in asp.net?

C

COHENMARVIN

I have a web site where I put my asp.net application in a folder called
/asp.net/hotelallocation. I want it to be protected by a password, so
I put a web.config file in that folder. But now when I try to access
any page in that folder, I get an 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"
I looked at the message, and I wasn't clear what should be a virtual
directory and what should be an application.
Should I tell my server administrator to make /asp.net/hotelallocation
into a virtual directory? should I tell him to make it into an
application? How would he do this? What does it mean?
The (short) web.config file follows:

<configuration>
<system.web>

<authentication mode="Forms">
<forms name="MyApp02" path="/asp.net/hotelallocation/" loginUrl =
"login.aspx"
protection="All" timeout="30">
<credentials passwordFormat="Clear">
<user name="agent" password="test" />
</credentials>
</forms>
</authentication>

<authorization>
<allow users="agent" />
<deny users="?" />
</authorization>

</system.web>
</configuration>
Thanks for any help.
Marvin
 

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,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top