简体   繁体   中英

“..allowDefinition='MachineToApplication' beyond application level” error on deploying the website on web host

I came across the solution of this genetic problem all across the internet and Stackoverflow, but none of them talk about the same after/on deployment . I also read this famous article . So, my website runs absolutely fine via VS 2010. However, I get this problem the moment I deploy my website using the copy tool of VS 2010.

There are three web.config files in. 1- root, 2- Users folder, 3- accounts folder . The tag exists in the web.config file in the root. The hierarchy of which looks like: domain.com / httpdocs / websitefolder / web.config . In the websitefolder there are Accounts and Users folders which further contain web.configs, but non of them have the tag.

What could possibly go wrong from the development machine to deployment? The error I am getting is on line:

Line 16:  <authentication mode="Forms">

In the httpdocs, there are other projects with web.configs, can that be a problem? In that case, I also deleted their contents, but didn't help (but may be I should have done a better job? I don't know if this is what was required at all?).

Also, this is a website , so there's no bin or obj folder being created, none of that kind of issue. Please suggest, I am not able to figure out the problem. Thanks a lot.

Usually when you have multiple sites in sub directories of one site, inspite you delete a web.config, the problem will persist. In that case even the sub folders should be marked as an application.

Is the folder in which you have this website deployed an application in IIS? It is one main reason why this error could occur.

If its not, make it as an application and the problem should resolve.

Update: Seems you have used File System while developing your website.

Firstly install IIS server like " this ".

Next you should create a virtual directory in IIS. See " this " . (in physical path, select the path upto your deployment folder)

Now run the website. If your problem is solved it means the issue is with the virtual directory in your remote server. So report them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM