Virtual directory not being configured as an application in IIS
Problem
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 52: -->
Line 53:
Line 54: <authentication mode="Windows"/>
Line 55:
Line 56: <!--
Solution
Change authentication mode to 'None' in web.config.
Go to your web.config file and change following line
<authentication mode="Windows"/>
to
<authentication mode="None"/>.
This should solve this problem.
Cause
By default ASP.Net creates Windows authentication mode in Web.Config file. When you run this site locally on your computer, it runs fine. This is because it runs under current windows account credentials (i.e. Your windows login which may have administrative rights). But when you copy it to web server it runs under [MACHINENAME]\ASPNet account. If it does not have appropriate rights, server will throw this error.
Comments/Questions
Add New Comment/QuestionThis actually has to do with Visual Studio and how it deploys it web applications. From my experience you need to go into IIS and find your project folder on the server, right click to Properties. Under Application Settings click Create. It doesnt matter which authentication mode you use with a web project, IIS will not allow it to run as Web Site. It's configured to be a Web App. => Kevin (Thursday 22-May-08 11:56 AM) | | | Reply | Very helpful comment. Changing authentication mode doesn't really work. => DevAnon (Tuesday 08-Jul-08 07:43 PM) | | | Reply | |
|
|