If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Web.config error in 2017

Hello

I am coming to terms with the Web Forms Identity template and when I try to compile my Web Forms project in VS 2017, I get the following: error ASPCONFIG in my Web.config(18) file:

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

I see no reference to allowDefinition or MachineToApplícation in the entire Solution - let alone Web.config - when I search for either of those terms. This is line 18 in my Web.config file:

Code:

<authentication mode="None"/>

There seems to be two servers that my project uses which I can see in SQL Server Object Explorer:

Re: Web.config error in 2017

Hello Arjay

Thanks for your reply.

Unfortunately, I am still getting that same error as administrator in Cmd Prompt which is how I usually compile:

C:\Users\Steve\source\repos\WebFormsIdentity\webformsidentity\web.config(18): error ASPCONFIG: 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:\>

I can trying compiling (building?) via VS 2017 as admin, though I have never done it that way before.

I assume that these pre-compiled files (I selected the pre-compile checkbox during the build) still need to be compiled before FTP uploading them to my Web hosting service's server, but that still doesn't resolve the server 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' - that I get through Cmd Prompt, does it?

Advertiser Disclosure:
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.