0
votes

If you are publishing your website to the root of a website, instead of a subfolder that is marked as an application, there are certain config settings that wont apply it seems. How can I mark the root of my website itself as an application.
Well, the website itself is already an application by default see ref: https://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/1d1c9a73-b4c5-4cfb-ad69-b77fa2e17e19.mspx?mfr=true

Currently, if I add a element to my web.config and publish to the root of my website, I get the following error.

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 can add an application under the website root, set an alias and have it point at the same physical path as the root of the website, but im not sure thats what I want to do.

How can I define a sessionState element if I am publishing to the root of my website and how do "applicaiton" level config settings apply in this case?

1

1 Answers

0
votes

You got error "allowDefinition='MachineToApplication' beyond application level. " occurs when you have multiple web.config under single root folder, you may avoid this error by removing unwanted web.config files.