Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms authentication & webconfig.

Status
Not open for further replies.

Borracho1

Programmer
Apr 2, 2005
28
BE
I have several aspx pages in a folder under my and now i want to disable that people can enter one page by typing it directly in the browser. Therefore i read some posts on forums and tutorials and made a loginpage with following line if the password is true

FormsAuthentication.RedirectFromLoginPage (TextLogin.Text, False)

And made a web.config file with the following content
Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>

	<system.web>
		<authentication mode="Forms">
			<forms name=".ASPXAUTH" 
			       loginUrl="login.aspx"
			       protection="Encryption"
			       timeout="20"
			       path="/"
			</forms>
		</authentication>
	</system.web>


	<location path="reservatie.aspx">
		<system.web>
			<authorization>
				<deny users="?" />
			</authorization>
		</system.web>
	</location>

</configuration>

But now i get the following error on every page that i open in this directory.

'MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

But if this is really the problem how do i change this. If i open the IIS directory (inetmgr in commandpromt) and look at the properties of my folder, i see a tab ASP.net but nothing where i could change it to an application directory.

Already thanks

Borracho
 
Right click the folder in IIS. Then click the Create button to create the application.

Jim
 
thanks for the quick reply. But i have a dutch version and i can't find an exact translation of create or application (if a rightclick the name of my directory with my aspx pages in there is explore, open, delete,all taks, properties and some less important i think).

Also have the option new - virtual directory, tried this but only gives me an extra directory in this folder with all my .aspxs in.

Is this the intention or am i doing something wrong cause it still gives me this error.

Sorry if this is something quite easy but have absolutely no idea what i may change in the IIS.


thanks
 
Sorry, I should have been more clear.. Right click and choose Properties.. then choose Create.
 
ok thanks a lot for your help, i owe you a beer if you ever visit belgium.

Borracho
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top