Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start IIS Express using /path from command line with HTTPS?

Is it possible to start IIS Express from the command line using the /path argument and include an HTTPS binding?

like image 674
Bob Banks Avatar asked Jul 29 '11 21:07

Bob Banks


People also ask

How do I start IIS Express from IIS?

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

How to run IIS without command line?

I want that IIS runs permanently, so without command line. Open a command prompt. 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)

How do I Find my IIS Express folder in Linux?

Run the following command to navigate to the IIS Express installation folder: cd Program FilesIIS Express or if you are using a 64-bit OS, run the following command: cd Program Files (x86)IIS Express Run the following command to view the IIS Express usage string: iisexpress /?

How do I run a website from a folder in IIS?

You can also use the /path option to run a site directly from a folder. This option works for any type of application, including static HTML, ASP.NET, PHP, and WCF. By default, IIS Express will run the site on http://localhost:8080/. For a managed website, such as ASP.NET, IIS Express will use .NET 4.0.


2 Answers

Another one for the scripts section:

IisExpressAdminCmd setupSslUrl -url:https://localhost:44308 -UseSelfSigned

appcmd add site /name:"MySite" /bindings:https/*:44308:localhost /physicalPath:"C:\MySite"

iisexpress /site:MySite

Those commands are in the C:\Program Files (x86)\IIS Express\ directory.

like image 197
Shaun Luttin Avatar answered Oct 09 '22 10:10

Shaun Luttin


  1. Following link would help you in configuring https port (especially read "Making an SSL Cert, hooking it up to IIS Express and making it Trusted" from this link ) https://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx

  2. When /path command line option is used, IIS Express uses the template appliationhost.config file located in %programfiles%\IIS Express\AppServer (on 64-bit machine %programfiles(x86)%\IIS Express\AppServer). Edit binding element in this configuration file as shown below (change the protocol to 'https')

    <binding protocol="https" bindingInformation=":8080:localhost" />
    
  3. Now from the IIS Express installation folder, run iisexpress.exe /path:"<path-to-your-web-application>" /port:<HTTPS-port-configured-in-step-1>

like image 4
vikomall Avatar answered Oct 09 '22 09:10

vikomall