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.

Note Note

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

  1. 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.

  2. In the Property Pages dialog box, click the Start Options tab.

  3. Under Server, click Use custom server.

  4. In the Base URL box, type the URL that Visual Studio should start when running the current project.

    Note 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

  1. In Solution Explorer, right-click the name of the Web application project for which you want to specify a Web server, and then clickProperties.

  2. In the Properties window, click the Web tab.

  3. Under Servers, click Use Visual Studio Development Server or Use Local IIS Web server or Use Custom Web server.

  4. 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 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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值