Resolves an effective way for IIS not to publish MVC3 projects (WINDOWS7,IIS7,MVC3, enable directory browsing)

Source: Internet
Author: User

First of all, we seem to have a common feeling about website publishing: Just three or four steps, just a few points, it's easy to remember.
However, after clicking OK, success is successful, but not successful. We don't seem to have any way, try again or again the same as usual.
Here is a little unsuccessful solution, at least on my machine is to solve the problem.

Necessary conditions:
To enable IIS on the machine (in the "Turn Windows feature on or off" control Panel), it is not certain what is relevant and can only be checked more.
The system version of the machine seems to be a bit higher (such as the Windows Server version, the flagship version, and so on). Not sure the home base version is OK)

In this condition your machine may often see a situation:
You can publish a simple Web page (so-called simple Web pages, that is, the kind of no architectural concept of the page, such as you add an HTML page to go in, casually write something, and then bring a few JS and so on the page. More specifically, it's not a "schema" site like MVC. But your machine is unable to publish MVC site, even if you tried countless times, even if you have confirmed the operation is absolutely correct, permissions have been set to everyone with the highest privileges, your network is not a problem, you have enabled directory browsing, You have added the default document in IIS to the index.cshtml page of your site, and you have enabled the parent path ... In short, it just can't access you at your wits ' end.

You must be familiar with this: HTTP error 403.14-forbidden WEB server is configured to not list the contents of this directory. "Check online, and a bunch of people are really telling you to enable directory browsing, and then it doesn't make sense."

Now provide a way (perhaps only a small area of the problem can be solved, but maybe that's the problem with you.) ):

Navigate to the. NET installation directory C:\Windows\Microsoft.NET\Framework\v4.0.30319,
Start the CMD console and switch the current directory to. NET installation directory, perform aspnet_regiis.exe-i, and then re-register asp.net to IIS to resolve this error.
How to switch to a directory in Ps:cmd. The CD directory path.
Here is the "CD C:\Windows\Microsoft.NET\Framework\v4.0.3031", of course, without quotes.
Results:
When you execute that command, you will see the words "Start installing ASP.net 4.0" in the CMD window, as well as the progress. It's probably also clear why the previous MVC3 site (or the site using ASP.net 4.0 technology) has not been published. Register it in IIS.

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.