使Localhost成为IIS Express中的自定义域 [英] Make Localhost a Custom Domain in IIS Express

查看:69
本文介绍了使Localhost成为IIS Express中的自定义域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2010中使用IIS Express,现在它在localhost:61156上运行.但是我需要它在域上运行.是否可以使IIS Express在devserver.com而不是localhost:61156上运行?因此,基本上,当我运行调试时,我需要devserver.com,而不是localhost:61156.我在Google上遇到了一些问题,但是没有运气.有关如何执行此操作的任何想法?

I am using IIS Express in Visual Studio 2010 and right now it runs on localhost:61156. But I need it to run on a domain. Is it possible to make IIS Express to run on devserver.com, instead of localhost:61156? So basically when I run debug I want devserver,com, instead of localhost:61156. I've come across a few things on google, but no luck. Any ideas on how to do this?

谢谢!

推荐答案

执行以下操作

  1. 如果IIS Express正在运行,请停止它
  2. 打开您的Web应用程序项目文件(* .csproj或* .vbproj)
  3. 找到<IISUrl>http://localhost:61156/</IISUrl>并将其更改为< IISUrl>http://devserver.com:61156/</IISUrl>
  4. 打开%userprofile%\ documents \ iisexpress \ config \ applicationhost.config文件

  1. If IIS Express is running stop it
  2. Open your webapplication project file (*.csproj or *.vbproj)
  3. Find <IISUrl>http://localhost:61156/</IISUrl> and change it to <IISUrl>http://devserver.com:61156/</IISUrl>
  4. Open %userprofile%\documents\iisexpress\config\applicationhost.config file

Visual Studio 2015现在将特定于您项目的applicationhost.config文件放入而不是使用全局文件.它位于:/path/to/code/root/.vs/config/applicationhost.config

Visual Studio 2015 now puts an applicationhost.config file specific to your project instead of using the global one. It is located at: /path/to/code/root/.vs/config/applicationhost.config

这篇关于使Localhost成为IIS Express中的自定义域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆