How to deploy ASP. NET programs in a common folder

Source: Internet
Author: User

How to deploy ASP. NET programs in a common folder

Problem description:

An Asp.net web program (Path: D: \ proj \ webtest). If a virtual directory (such as virtualapp) is used to point to it (D: \ proj \ webtest), http: // localhost/virtualapp/index. aspx can be accessed normally. However, if you move the web program to another folder (D: \ proj \ webtest \ ABC ),
Http: // localhost/virtualapp/ABC/index. aspx cannot be accessed normally. The following error message is displayed.

 

A server error occurs in the "/virtualapp" application.

--------------------------------------------------------------------------------

 

Configuration Error

Note: An error occurred while processing the configuration file required to provide services to the request. Check the following error details and modify the configuration file as appropriate.

 

Analyzer error message: the section registered as allowdefinition = 'machinetoapplication' outside the application level is incorrect. This error may occur because the virtual directory is not configured as an application in IIS.

 

Source error:

 

 

Row 23: "forms", "Passport", and "NONE"

Row 24: -->

Row 25: <authenticationmode = "Windows"/>

Row 26:

Row 27:

Source File: e: \ ASPnet \ webapplicationcsharp \ WEB. config row: 25

 

If. if you comment out <authenticationmode = "Windows"/> In the config file, the system prompts that the DLL file generated after the web program compilation cannot be found (codefile mode) or the corresponding page code file cannot be read (codebehind mode) error.

Do Asp.net programs have to be deployed in virtual directories? If you have purchased a service space and the space service provider does not release multiple virtual directories, how can you deploy multiple applications on a website?

 

Cause:

The essence of a virtual directory is "application domain ". When the application is executed, it will go to the bin directory under the execution directory to find the Execution Code. The bin directory is in the D: \ proj \ webtest \ ABC directory, and the application execution directory is D: \ proj \ webtest. Therefore, the DLL cannot be found.

 

Solution:

Move the bin directory of the application to the execution directory of the application. If there are multiple web applications, pay attention to the DLL file name conflict.To solve this problem, copy the bin directory under the D: \ proj \ webtest \ ABC directory to the D: \ proj \ webtest directory.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.