allow definaetion=Machine to application

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************
 
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
 
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.



Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
 
Back
Top