开发者

How do I start IIS Express?

I've used the Web PI to install IIS Express. In the tray, there is not the IIS Express icon开发者_Go百科. How do I start IIS Express without using the command line? I want that IIS runs permanently, so without command line.


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).


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.


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


IIS Express isn't really meant to be run without some kind of interaction with it - Visual Studio, WebMatrix, or other. IIS Express isn't a service.

If you wanted to automate its startup in Windows, you can do so via Startup directory, or add a new item to the registry key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

C:\Program Files (x86)\IIS Express\iisexpress.exe

You could run this executable ad-hoc if you like, perhaps create a shortcut on your quicklaunch or desktop or other.


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.


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


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜