How to publish an Orchard Site to II5 5.1 on the Windows XP localhost

Topics: Administration
Nov 11, 2012 at 3:17 PM

When I create an ASP.NET web site on my XP workstation, I can publish it to the local IIS 5.1 web server. Since I have port 80 opened up, external users can browse to it from the Internet using

http://<my IP address>/SiteName

where the default document is defined in the IIS settings for the site.

How do I publish an Orchard CMS web site to localhost for external access?

Problems are:

1) Unlike an ASP.NET project in Visual Studio 2010 there is no publish option to IIS 5.1;

2) Webmatrix does not let one publish to a server on localhost.

3) What URL do users enter in their browsers?

Many thanks!




Nov 11, 2012 at 7:04 PM

You want to host a public web site on Windows XP? Do yourself a favor and get a cheap (but not too cheap) hosting account somewhere. You won't regret it.

Nov 12, 2012 at 1:06 AM

Irrelevant. I am not asking about optimal hosting systems.

We have a system set up to quickly share changes with other team members. Having used it successfully for ASP.NET web sites, I want to use it for Orchard CMS sites.

- A


Nov 12, 2012 at 1:12 AM

It is very relevant. We don't support Orchard running on Windows XP.

Nov 12, 2012 at 1:14 AM

That is a different point. 

What about on IIS 7.5 Express? That runs on XP.

Nov 12, 2012 at 1:16 AM

That should work, except that IIS Express doesn't support remote connections as far as I know.

Nov 12, 2012 at 1:23 AM

According to this, it does support remote connections.

So back to the operative issue: What url should be opened?

The "Base URL" in the dashboard is: http://localhost:40042

Is that the port that should be opened? 

Or is it the port in http://localhost:29162/, which is the home page displayed when I click "Your Site" in the dashboard.

I appreciate the discussion links and will study them as well.

- Thks.



Nov 12, 2012 at 2:13 AM

I didn't know that. Yes, it should work then, if you have ASP.NET 4.

You can open any port you want. Orchard won't care. The base url that is in the Orchard admin settings is provided by the administrator of the site. Apparently it was entered in the past and the port changed since then. The good one (that should also be replaced in settings) is the one you see in your browser, the one that works.

Nov 12, 2012 at 2:15 AM

It should be the one that is used by your webserver. If your development web server listens on 29162, then that's the port to open in your firewall. The url set in "Base URL" is to be manually configured and in your case should be set to http://localhost:29162.

Nov 12, 2012 at 1:46 PM

Have set up similar for development using VS2010 and IIS Express on Windows XP - debug locally and then use publish wizard in VS2010 to copy required solution files to another PC on the network running multiple instances of IIS Express all on port 80 - the main difference is IIS Express has to be run from a user account with administrator privileges to serve external requests or use a reserved port, and cannot be run as a service like IIS 5.1.

IIS Express references:

You will not be able to run IIS 5.1 and IIS Express on the same PC using the same port - they use the same httpcfg information and IIS 5.1 will have the port(s) locked before you can start IIS Express - but if you are only using this on an internal network you can replace IIS 5.1 and run IIS Express with administrator privileges for your old websites. But you can restrict IIS Express/IIS 5.1 to listening on specific IP addresses (httpcfg set iplisten) and use Apache or another web server on port 80 on a different IP address.

If you edit your applicationhost.config file you can also set the binding information for each instance of IIS Express and using host names you can run a multi tenant version of Orchard:

	<site name="" id="1092685870">
		<application path="/">
			<virtualDirectory path="/" physicalPath="Z:\Inetpub\website\" />
                    <binding protocol="http" bindingInformation="" />
	<site name="" id="864892907">
		<application path="/">
			<virtualDirectory path="/" physicalPath="Z:\Inetpub\website\" />
			<binding protocol="http" bindingInformation="" />
			<binding protocol="http" bindingInformation="" />
			<binding protocol="http" bindingInformation="" />

A shortcut/command can be used to easily start selected website;

"C:\Program Files\IIS Express\iisexpress.exe" /config:"Z:\Inetpub\IISExpress\config\applicationhost.config" /

The shortcut/command window remains open - in version 1.0 of Webmatrix you could start an instance of IIS Express and close the window and use the system tray to stop IIS Express processes, but that option was removed in version 2.0 - you can still use the system tray but closing the window will now terminate the IIS Express process.