昨天我在写一个独立的html的网页。我看它每次,该文件在本地主机已运行。因此,端口号是由我的操作系统(Windows 8)分配。
Yesterday I was writing a stand-alone .html web-page. Every time I viewed it, the file was run in the local host. Thus a port number was assigned by my OS (Windows 8).
我的文件的路径是这样的:
The path to my file looked like this:
localhost:2038/Projects/test.html但是今天,当我运行它,ASP.NET开发服务器分配一个不同的端口号:
But today, when I run it, the ASP.NET Development Server assigned a different port number:
localhost:27290/Projects/test.html现在我的重定向不工作。此文件是纯粹的独立文件。它不是一个Visual Studio的Web项目或任何东西的一部分。因此,有在Visual Studio中没有项目的设置来改变。不过我确实使用Visual Studio作为一个文本编辑器。要查看浏览器中的文件覆盖在VS2012文件我只需右键单击并选择:在浏览器中查看(谷歌浏览器)
Now my redirects don't work. This file is pure a stand-alone file. It is not part of a visual studio web-project or anything. So there are no project settings in visual studio to alter. However I do use visual studio as a text editor. To view the file in the browser I simply right-click over the file in VS2012 and select: 'View in Browser (Google Chrome)'
在我在Chrome中查看时,Windows 8从工具栏区域,通知我说,ASP.NET开发服务器运行的是弹出一个消息。并列出太新的端口。
After I view it in Chrome, Windows 8 pops up a message from the toolbar area informing me that ASP.NET Development Server is running. And it lists the new port too.
我如何更改端口为固定的东西,而不是一些随机值?
How do I change the port to something fixed and not some random value?
谢谢!
推荐答案要指定端口为ASP.NET开发服务器:
To specify a port for the ASP.NET Development Server:
更多信息:如何:指定端口对于ASP.NET开发服务器
更多推荐
如何解决在asp.NET开发服务器的端口号
发布评论