zoukankan      html  css  js  c++  java
  • How to configure the Virtual Path of ASP.NET Development Server to be “Root”

    How to configure the Virtual Path of ASP.NET Development Server to be “Root”

     

    Posted by: Rickie Lee   http://rickie.cnblogs.com

    As we know, Visual Studio 2005 & .Net Framework 2.0 provide the built-in test web server, named ASP.NET Development Server (located at C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\WebDev.WebServer.EXE). By default, VS 2005 IDE treat each ASP.NET web site project as a sub virtual dir under the root site when running them in test server. Like the following example:

    http://localhost:portnumber/ApplicationName/

     

    However, in fact we often want to run web site projects in the root site, in order to reference static resources, such as images and CSS files. Although we know that we can use “~” symbol to refer to the root of the virtual web application for dynamic resources, static resources still be in trouble.

     

    You can take the following steps to overcome this issue and change ASP.NET web site project as the root site.

    1. Run the following command in [Visual Studio 2005 Command Prompt] window:

    webdev.webserver /port:8181 /path: "the physical path of your web project" /vpath:"/"

     

    2. Configure ASP.NET web project’s property using VS 2005 IDE.

    (1) Choose <Start Options> tab page under web project property page dialog.

    (2) Select <Use custom server> radio button under Server section, and type the following content into Base URL text box:

    http://localhost:8181

    Please note that the port number should be the same as the preceding setting.

     

  • 相关阅读:
    OpenMP并行程序设计
    Snmp在Windows下的实现WinSNMP编程原理
    利用C#开发基于snmpsharpnet基础的SNMP开发应用
    SNMP用VC实现的方法
    题目
    C# combox问题
    网络管理Snmp
    error BK1506
    响应activex事件
    使用C# 连接不同版本的Oracle.DataAccess
  • 原文地址:https://www.cnblogs.com/rickie/p/368011.html
Copyright © 2011-2022 走看看