How do I start IIS Express?

前端 未结 7 646
傲寒
傲寒 2020-12-25 14:04

I\'ve used the Web PI to install IIS Express. In the tray, there is not the IIS Express icon. How do I start IIS Express without using the command line? I want that IIS runs

相关标签:
7条回答
  • 2020-12-25 14:20

    In Windows 7 you can use the Windows PowerShell to hide the command window, for example i use:

    start-process "c:\program files\iis express\iisexpress.exe" -workingdirectory "c:\program files\iis express" -windowstyle Hidden
    

    PowerShell script execution is set to Restricted on most new systems by default so you might need to change that to RemoteSigned or something first.

    0 讨论(0)
  • 2020-12-25 14:20

    You can also install Web Matrix, which has an administration interface to IIS Express.

    0 讨论(0)
  • 2020-12-25 14:21

    See Running IIS Express from the Command Line

    1. Open a command prompt.
    2. cd \Program Files\IIS Express, or
      cd \Program Files (x86)\IIS Express on 64-bit OS
    3. iisexpress /? to show usage

    For example, you can start your IIS Express named site by issuing the command iisexpress /site:WebSite1 where WebSite1 is a site from the user profile configuration file (C:\Program Files (x86)\IIS Express\AppServer\applicationhost.config)

    Another common way to start IIS Express is to issue the command iisexpress /path:c:\myapp\ /port:80 This command runs the site from the c:\myapp folder over port 80.

    You could use a *.bat that you include in your startup folder that starts IIS Express for you (using C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup or the All Users startup folder C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup).

    0 讨论(0)
  • 2020-12-25 14:25

    Use Vb.net 2010

    and put this on a button

    this will execute the IIS Express console less

    shell("C:\Program files\IIS Express\iisexpress", vbhide)

    To kill the process

    *this will kill the IIS Express *

    shell("taskkill /f /im iisexpress.exe", vbhide)

    0 讨论(0)
  • 2020-12-25 14:26

    I don't think running IIS Express without the command line is achievable unless you're successful in writing a separate program to do it, as some have attempted to do in this related question.

    Quoting the online documentation:

    IIS Express is a lightweight, self-contained version of IIS optimized for developers. IIS Express makes it easy to use the most current version of IIS to develop and test websites. It has all the core capabilities of IIS 7 as well as additional features designed to ease website development including:

    • It doesn't run as a service or require administrator user rights to perform most tasks.
    • IIS Express works well with ASP.NET and PHP applications.
    • Multiple users of IIS Express can work independently on the same computer.
    0 讨论(0)
  • 2020-12-25 14:26

    You could use srvany to run IISExpress as a service.

    Here is a blog post about this (though I haven't tested it yet, it looks promissing).

    http://arvinboggs.wordpress.com/2011/04/08/installing-iisexpress-as-a-service-on-windows-2003/

    The interesting part is where you pass a /config ... parameter to iisexpress, otherwise IIS Express loads the config from the users documents folder.

    If you want your IISExpress to be able to be reachable from remote machines you can either

    1. Start is with admin privileges and edit your applicationhost.config file: http://blogs.iis.net/vaidyg/archive/2010/07/29/serving-external-traffic-with-webmatrix-beta.aspx
    2. Start is a a user and set up an ACL: http://blogs.iis.net/vaidyg/archive/2010/07/29/serving-external-traffic-with-webmatrix-beta.aspx
    0 讨论(0)
提交回复
热议问题