Nano HE
Nano HE

Reputation: 1971

Asp.net Web Application Publish

I am new to asp.net and failed to publish my web application on local host. I develop my application on D:/learning/MyWebApp/.;

And it works quite well.

Then I created a new folder imct, the location is C:\inetpub\wwwroot\imct\

File System methond selected and Successfully published.

But I can't open my app from http://localhost/imct/

> Server Error in '/' 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 16: Line 17: Line 18: Line 19: Line 20:

Source File: C:\inetpub\wwwroot\imct\web.config Line: 18

Show Additional Configuration Errors:

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. (C:\inetpub\wwwroot\imct\web.config line 22)

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. (C:\inetpub\wwwroot\imct\web.config line 32)

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. (C:\inetpub\wwwroot\imct\web.config line 39)

Is there anything wrong? Appreciated for your replies.

Upvotes: 0

Views: 1540

Answers (2)

KV Prajapati
KV Prajapati

Reputation: 94653

Use the Visual Studio Publish Wizard (Build + Publish Web Site)

Upvotes: 1

SLaks
SLaks

Reputation: 888047

You need to set up that folder as an Application in IIS Manager.

Upvotes: 3

Related Questions