0

I have a simple asp.net project. I put it on my host but I now have the following error:

Parser 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.

Source Error: 

  Line 37:     ASP.NET to identify an incoming user. 
  Line 38:     -->
  Line 39:     <authentication mode="Windows" />
  Line 40:     <customErrors mode="Off"/>
  Line 41:       <pages>

LINK

4
  • 1
    May be you two web.config files.Try to remove which s not needed. Commented Nov 25, 2011 at 18:23
  • 1
    Have you configured its published directory as an application? (In IIS) Commented Nov 25, 2011 at 18:26
  • Configure all MachineToApplication settings in your application's root, and remove all MachineToApplication settings from your application's subdirectories. Commented Nov 25, 2011 at 18:26
  • there is only oe i the directory Commented Nov 25, 2011 at 18:26

4 Answers 4

2

Create the virtual directory for it on the server - like the error message says.

Sign up to request clarification or add additional context in comments.

Comments

2

Most likely this is because you have not configured IIS to treat this directory as an application.

I'm assuming you published under the inetpub\wwwroot path on the host.

On the host, in IIS (Internet Information Services - Under Administrative Tools in the Control Panel). You need to navigate to the directory you published under (Default Web Site[your path].

Right click the directory and choose Add Application (on IIS 7+) (Documentation) or Properties and then click the button that says "Create" by the Application Name field near the bottom (image)

1 Comment

Command Line Tool: appcmd add app /site.name: string /path: string /physicalPath: string
1

I got the same error, but got resolved by changing the app pool..try changing the app pool..as such i changed it from default app pool to classic .net app pool. Hope you find it useful.

Comments

1

Follow this link and here is the workaround for this http://geekswithblogs.net/ranganh/archive/2005/04/25/37609.aspx

Try changing < authentication mode="None" />

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.