views:

1489

answers:

4

I've inherited some aspx (including the web.config file) and am getting the following error. I've created a virtual directory for it but I'm not sure how would I "configure it as an application"?

Configuration Error 
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details 
below and modify your configuration file appropriately. 

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 49:             ASP.NET to identify an incoming user. 
Line 50:         -->
Line 51:     <authentication mode="Windows"/>
Line 52: 
Line 53:     <customErrors mode="Off"/>


Source File: C:\<MYPATH>\web.config    Line: 51
+4  A: 

Go into the properties of the virtual directory, click the 'Virtual Directory' tab and click 'Create' button under 'Application Settings', then set 'Execute permissions' to 'Scripts only'

Also check the ASP.NET tab to make sure it is set to the correct version for your app.

Lastly, make sure the application pool being used for the virtual directory is only used by other sites and virtual directories using the same version of ASP.NET.

John Sheehan
Couldn't have said it better myself. Especially the AppPool thing. .NET 1.1 apps don't like to play well with the rest of the crew.
Dillie-O
A: 

In IIS6 MMC, right click on the folder the application is deployed to, click Properties then click the Create button.

That will create an IIS Application.

Oh and make sure you choose the correct version of ASP.NET from the ASP.NET tab and make sure it resides in the correct application pool for the version of ASP.NET selected.

HTH
Kev

Kev
A: 

Bring up the properties for the vdir. Verify that it is an application, on the Virtual Directory tab look at Application Settings, click Create if it is not an application.

The vDir Icon is also different if the folder is an application, applications are little open boxes, non-application vdirs show a folder icon with a small globe.

Darryl Braaten
+1  A: 

right click your your virtual directory - properties - the the tab "virtual directory" click the button "create" in the middle and give your application a name

toebens