allow definaetion=Machine to application

G

Guest

Hi EveryBody:

I face the following error when I debugg my web application:

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.

the source of this error when I make spearet folder in my solution explorer
and but my membership pages inside it and I want to make authentication for
this folder by appliying the following code in the web.config file which new
web config file that I replace it Into that folder:

<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<authentication mode="Forms">
<forms name=".ASPXAUTH" loginUrl="~/Default.aspx" />
</authentication>
</system.web>
</configuration>


the red line that I recived when my application debugging as an error is :

<authentication mode="Forms">


some body toled me that I have to go to my project under the default
websites in IIS and right click my project directory then I will see a button
grayied which create new under applcation setting but when I did so nothing
change and I still recived the same error.

So any one can help me with this issue or redirect me?

regard's

Husam
 
C

Cowboy \(Gregory A. Beamer\)

Make sure the website in question is running under the proper version of the
framework. If you are developing with Visual Studio 2005 or the Web
Developer Express product(s), you need ASP.NET 2.0. For Visual Studio .NET
it will be either 1.0 or 1.1.

You can use the aspnet_regiis with the -s flag to set your website up to the
proper version or manually set the types in the IIS Manager. Here is an
article that explains things
http://msdn2.microsoft.com/en-us/library/a99txfy5(vs.71).aspx
 
G

Guest

Besides what Greg specified, this errror often occurs when you have a
web.config file in a folder or subfolder that is not marked in IIS as an
Application.

Peter
 
J

Juan T. Llibre

Make sure the directory from where you are running your code
is configured as an Application, or at least a vurtual directory, in IIS.

You can use the IIS Manager to create your virtual directory/application.
 

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,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top