Iis7 + virtual directory: failed to load Assembly "**". Make sure that this Assembly has been compiled before accessing this page

Source: Internet
Author: User

After using the Win8 system, I just wanted to run iis, so I started to use iisin windows and registered IIS with aspnet_regiis.exe-I, so I started to publish a site. Everything is normal.

Then, add a virtual directory under the site, and then preview the web page of the virtual directory, and immediately report a message similar to "failed to load assembly" app_web_utohcdb4 ". Make sure that this Assembly has been compiled before accessing this page ." Error

I am wondering, I remember how simple it is to create a virtual directory on IIS in earlier versions and there will be no errors. After searching, I found that right-click the website, two options are available: "add application" and "add virtual directory"

Continue searching for similarities and differences between the two (from: http://blog.csdn.net/xiaoqijun/article/details/16523811)

A. virtual directory refers to creating a virtual subdirectory under the site and specifying a fixed physical path as the Application Path of the site. 1. the virtual directory shares an application pool with the parent site. For example, subtesta (D: \ subtesta) is created under site testweb (C: \ Inetpub \ wwwroot \ testweb) if testweb sets framework V2.0, subtesta must also be an application of framework V2.0; otherwise, various errors that do not match the framework will be caused. 2. The virtual directory must place executable files (such as DLL) in the bin directory of the parent site. 3. web. the Config File inherits the web. config. that is to say, if the reference declared by the parent site is in the web directory of the virtual directory. the Config statement should not be repeated. 4. the application root directory in the virtual directory is the root directory of the parent site 5. the deleetting. the relative path should be used for reference in config settings. B. an application is an independent application established under the parent directory, exclusive application pool 1. the application can have a different application pool than the parent site, that is, testweb is Framework V2.0, and subtesta can be framework v4.0, which does not affect each other. the subtesta executable files are placed in the bin in the root directory, and cannot be placed in the bin directory of webtest. subtesta web. config is independent of webtest web. config 4. the application root directory in subtesta is the root directory of the parent site 5. the deleetting. the relative path should be used for reference in config settings. Applications are built on virtual directories, and applications have independent program running mechanisms on their parent websites, this gives the same site the ability to run different framework sets without affecting each other. In actual use, we need to select virtual directories or applications based on different situations. Considering that I only need a ing of a website URL, there is no relationship between the two release files, and I don't want to share any config or DLL files. So I am still "adding Applications" to solve the problem, go to the IIS website configuration file applicationhost. in config (c: \ windows \ system32 \ inetsrv \ config), you can view part of the content (publish and test2.0 are the added virtual directories and test2.0 _ are the added applications). The corresponding configuration is as follows: <sites>
<Site name = "Default web site" id = "1">
<Application Path = "/">
<Virtualdirectory Path = "/" physicalpath = "% systemdrive % \ Inetpub \ wwwroot"/>
</Application>
<Bindings>
<Binding protocol = "HTTP" bindinginformation = "*: 80:"/>
</Bindings>
</Site>
<Site name = "test1.0" id = "2" serverautostart = "true">
<Application Path = "/" applicationpool = "test1.0">
<Virtualdirectory Path = "/test2.0" physicalpath = "F: \ Asp.net \ test 2.0 \ publish2.0"/>
<Virtualdirectory Path = "/publish" physicalpath = "F: \ Asp.net \ HTML5 drag/drop upload \ test \ publish"/>
</Application>
<Application Path = "/test2.0 _" applicationpool = "test1.0">
<Virtualdirectory Path = "/" physicalpath = "F: \ Asp.net \ test 2.0 \ publish2.0"/>
</Application>
<Bindings>
<Binding protocol = "HTTP" bindinginformation = "192.168.1.107: 8080:"/>
</Bindings>
</Site>
<Sitedefaults>
<Logfile logformat = "W3C" directory = "% systemdrive % \ Inetpub \ logs \ logfiles"/>
<Tracefailedrequestslogging directory = "% systemdrive % \ Inetpub \ logs \ failedreqlogfiles"/>
</Sitedefaults>
<Applicationdefaults applicationpool = "defaultapppool"/>
<Virtualdirectorydefaults allowsubdirconfig = "true"/>
</Sites> it is clear that the hierarchy of site, application, and virtualdirectory is as follows: one site can have one or more applications, one application can have one or more virtual directories, and one virtual directory corresponds to one physical path. By default, a site has at least one application, which is known as the root application or the default application. An application has at least one vitual ctor, the root virtual directory may be in earlier versions of IIS, such as IIS6, which is not strictly differentiated between applications and virtual directories, the three are normalized, and the layer relationships of the three are clearly defined at the IIS architecture level. For details, refer to physicalpath, which clearly knows how IIS maps physical paths.

Iis7 + virtual directory: failed to load Assembly "**". Make sure that this Assembly has been compiled before accessing this page

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.