zoukankan      html  css  js  c++  java
  • 使用IIS Express调试网站的方法

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

    vs2012:

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

    taskkill /F /IM "WebDev.WebServer40.EXE"
    CD /D "C:Program FilesCommon Filesmicrosoft sharedDevServer11.0"
    START WebDev.WebServer40.EXE /port:8888 /path:"E:CodeWebSite" /vpath:"/WEBSITE1"
    START iexplore.exe "
    http://localhost:8888/Index.aspx"

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

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

    vs2013:

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

    比如:

    <site name="Kingdee" id="1" serverAutoStart="true">
        <application path="/">
          <virtualDirectory path="/" physicalPath="E:workWebSite" />
        </application>
        <bindings>
          <binding protocol="http" bindingInformation=":8888:localhost" />
        </bindings>
    </site>

    批处理改为:

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

  • 相关阅读:
    2019.1.1-11 总结
    配置文件的选择
    2019.1.1-5 总结
    shell 脚本
    2017- 感谢自己
    debug和release版本的区别
    linux 下一些命令
    Python中getopt()函数的使用
    开发环境的一些基本认识
    Leetcode 49. Group Anagrams
  • 原文地址:https://www.cnblogs.com/lhl98/p/6206442.html
Copyright © 2011-2022 走看看