DulluActs
DulluActs

Reputation: 11

Getting "error can be caused by a virtual directory not being configured as an application in IIS"

I'm getting:

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. F:\LinqWebChat\LinqWebChat\LinqChat\web.config 50.

Please help me recover from this bug.

Upvotes: 0

Views: 1695

Answers (3)

Donny V.
Donny V.

Reputation: 23546

Look inside the "obj" folder. For some reason sometimes during a build Visual Studio will stick a web.config in there. It caused the error for me. If theres nothing in there then do a search inside the project for *.config.

Upvotes: 1

Pankil Agrawal
Pankil Agrawal

Reputation: 101

If you add more than one web.config file in your application then you may face the same error.

It may possible that you add web.config in any sub folder of web-site.

Upvotes: 0

Rophuine
Rophuine

Reputation: 724

I get a very similar error sometimes while working in Visual Studio, and performing a solution clean and rebuild helps.

If you're not in VS then this won't apply.

Upvotes: 0

Related Questions