Solve the problem that the project directory list cannot be displayed after vs2010 is upgraded to vs2012.

Source: Internet
Author: User
Tags change settings


(1) When using vs2010 to Develop ASP. NET, we only need to enable debugging to display all the folders under our project on the page:



In this way, we can clearly see the project directory for operations!


(2) This is not the case with vs2012 or later!



(3) The main reason is that the default server version is different!


In vs2010, a server with a slightly lower function (vs Development Server) provided by vs is used. In vs2012 and later, the local IIS Web server is used by default.

So there will not be any presentation on the way!

On the other hand, it is also out of security considerations! In this way, visitors of the website can access the project's file directory, which can easily be hacked!


(4) There are three solutions:


1. Enter the address directly in the address bar to access our webpage (I think most of them are unwilling to do this! Trouble !);

2. Change settings: Right-click the project and choose Properties -------- web ------ server ----- change 'use local IIS Web server' to use the Visual Studio method server! (This is to change the server,
However, in this case, we will discard the powerful local IIS Web server but use the server that comes with !)

3. Solve the problem according to the "operation you can try" shown in the second figure above, so that the local IIS server can display the "Directory List ":


Step 1: Find the installation directory of the local IIS server (the default is to find appcmd.exe in disk C --- program files -- IIS express;


Step 2: Execute appcmd.exe with the command line

The general method is to open CMD and enter the path to the directory for execution. This is troublesome !!

Here is a simple method:


Enter cmd in the address bar of your directory (under the directory of paiappcmd.exe) to enter this directory. Then, directly throw the appcmd.exe file to the CMD and press Enter !!! So easy!


(5) compared to the first two methods, the last one is obviously better, that is, retaining the powerful features of the local server, and making it easy for us to visit the web page!


Note: Please indicate the source for reprinting !!





Solve the problem that the project directory list cannot be displayed after vs2010 is upgraded to vs2012.

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.