简体   繁体   English

更改本地IIS中的URL以避免端口号

[英]Change url in local IIS to avoid port number

I would like to change port number in URL for page name. 我想更改页面名称的URL中的端口号。 Now in IIS configuration default value is : 现在,在IIS配置中,默认值为:

http://localhost:52576/

I'd like to change this for : 我想将其更改为:

 http://localhost/websiteName/

I am using visual studio 2013 and ASP.NET MVC. 我正在使用Visual Studio 2013和ASP.NET MVC。

If you're not running Visual Studio as Administrator so it didn't have access to modify IIS, you'll need to do this manually. 如果您不是以管理员身份运行Visual Studio,则它无权修改IIS,则需要手动执行此操作。

I assume that you still have the "Default" or "Local" website in the "Sites" list within IIS. 我假设您在IIS的“站点”列表中仍具有“默认”或“本地”网站。

If so, you can right-click on that and select "Add Application", select a reasonable Alias and set the "Physical path" to point to the root of your project (ie where the web.config and /bin/ folders are located). 如果是这样,您可以右键单击它并选择“添加应用程序”,选择一个合理的别名并设置“物理路径”以指向项目的根目录(即web.config和/ bin /文件夹所在的位置) )。

添加应用程序对话框

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM