如果不想安装IIS,可以直接使用IIS Express来运行网站。

vs2012:

新建个文档,拷贝下面代码

taskkill /F /IM "WebDev.WebServer40.EXE"
CD /D "C:\Program Files\Common Files\microsoft shared\DevServer\11.0"
START WebDev.WebServer40.EXE /port:8888 /path:"E:\ZCode\WebSite" /vpath:"/WEBSITE1"
START iexplore.exe "
http://localhost:8888/Index.aspx"

将其存为index.bat批处理文件。

想运行网站,直接双击这个批处理文件就可以了。 

vs2013:

C:\Users\Administrator\Documents\IISExpress\config\applicationhost.config,这个复制一份,把它放到另外的位置,然后修改<sites>段,只留一个自己需求的,其它的<site></site>都删除了。

比如:

<site name="Kingdee" />
    </bindings>
</site>

批处理改为:

TASKKILL /F /IM iisexpress.exe /T
CD /D "C:\Program Files\IIS Express\"
start iisexpress /config:E:\work\applicationhost.config /systray:true /site:website2
START chrome.exe "http://localhost:8888/Index.aspx"

 

相关文章:

  • 2022-01-11
  • 2021-08-01
  • 2022-12-23
  • 2022-12-23
  • 2021-10-24
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
猜你喜欢
  • 2021-06-15
  • 2022-12-23
  • 2021-08-02
  • 2021-10-07
相关资源
相似解决方案