How to: Specify the Web Server for Web Projects in Visual Studio
https://msdn.microsoft.com/en-us/library/ms178108(v=vs.120).aspx
When you run a Web project in Visual Studio, project options determine which Web server Visual Studio uses to run (test) the site.
By default, Visual Studio runs file system Web site projects and Web application projects by using the Visual Studio Development Server.
However, you might want to run a project by using an Internet Information Services (IIS) virtual directory that points to the folder where the project files are located.
For FTP Web site projects, Visual Studio prompts you to specify a server URL the first time that you run the site. You can change the server URL at any time.
You cannot specify that the ASP.NET Development Web server run a local or remote IIS Web site project because Visual Studio always uses the URL where the IIS Web site project was created.
![]() |
---|
The Visual Studio Development Server option applies only when you are running (testing) the Web project in Visual Studio. Production Web applications always run under IIS. |
To specify the Web server for a Web site project
-
In Solution Explorer, right-click the name of the Web site project for which you want to specify a Web server, and then click Property Pages.
-
In the Property Pages dialog box, click the Start Options tab.
-
Under Server, click Use custom server.
-
In the Base URL box, type the URL that Visual Studio should start when running the current project.
Note
If you specify the URL of a remote server (for example, an IIS Web application on another computer), be sure that the remote server is running at least the .NET Framework version 2.0.
To specify the Web server for a Web application project
-
In Solution Explorer, right-click the name of the Web application project for which you want to specify a Web server, and then clickProperties.
-
In the Properties window, click the Web tab.
-
Under Servers, click Use Visual Studio Development Server or Use Local IIS Web server or Use Custom Web server.
-
If you clicked Local IIS Web server or Use Custom Web Server, in the Base URL box, type the URL that Visual Studio should start when running the current project.
Note
If you clicked Use Custom Web Server and specify the URL of a remote server (for example, an IIS Web application on another computer), be sure that the remote server is running at least the .NET Framework version 2.0.
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2015-03-21 supersocket中的日志处理