假如我在C:\Inetpub\wwwroot\WebApplication1
建立了一個專案WebApplication1現在我把文件夾下的所有內容移動到
C:\Inetpub\wwwroot\Webhome
裡,那麼此時運行程序會提示
C:\Inetpub\wwwroot\Webhome與http://localhost/WebApplication1
URL不符合請問,我該如何修改舊的專案WebApplication1令它的URL變成http://localhost/Webhome?

解决方案 »

  1.   

    用记事本打开.csproj.webinfo文件,把URLPath属性设置成:
    http://localhost/Webhome/XXXXX.csproj
    Webhome同时也是你的虚拟目录名
      

  2.   

    運行後出現
    Configuration Error ?Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.Source Error: 
    Line 33:           "Passport" 和 "None"
    Line 34:     -->
    Line 35:     <authentication mode="Windows" /> 
    Line 36: 
    Line 37:     <!--  應用程式層級追蹤記錄