2
votes

i've hit a brick wall in how to move my website to my host @ https://my.discountasp.net. My main problem is all my previous projects have been INTRANET based. I've never published directly to the web

Locally my development machine is Windows 8 Server running SQL Server 2008 R2

I started using latest version of Orchard CMS last week. I've created a working website with content that runs from http://localhost/orchard/ so I think its running from IIS7 ok. Orchard created tables in my 2008 R2 database for storing content, all this works a treat

Now I want to deploy website and database to the web host discountasp. I subscribed to discountasp.net and have all the settings I need. My problems is moving the website.

So far I tried loading up the website using Visual Studio 2010. I then do a right click from top of solution explorer and enter "http://retiremovec.eweb701.discountasp.net".

VS 2010 tries to build and I get :

"Error 1 It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. C:\inetpub\wwwroot\orchard\Modules\Orchard.Autoroute\Specs\bin\Hosting\Orchard.Web\Web.config 48
"

I've already looked up this error online and getting nowhere. I think i'm missing something fundamental. If I can get this to build is deployment of the website done simply by right clicking then publish website to target location "http://retiremovec.eweb701.discountasp.net"

Maybe I should not be loading up the website in Visual Studio, should i use something else. I'm just so used to doing all my work in VS2010. But this time i've left it all to Orchard and results are gr8 for the CMS site but now i'm stuck

Any comments appreciated, regards, J

2
That's the error you normally get when you haven't converted the virtual path on the server to an application ...McGarnagle
But it runs from IIS ok, looking in IIS now and I have a virtual directory (app) that i can right click -> Manage Application -> Browse and the Site runs...Does this not mean its an applicationJohn
Yes, you're right. Must be something else.McGarnagle

2 Answers

3
votes

What you want to deploy is Orchard.Web, not the whole solution. If you right-click on Orchard.Web from the solution explorer, you will see the option to publish. There are lots of options starting from there, including the possibility of creating a deploy package (that has my preference as I find it more flexible and less "magic"). But the key really is to look at Orchard.Web rather than the solution.

2
votes

Do not open Orchard app as a website, ever. It means trouble.

There are two ways to deploy your Orchard application from dev machine to external server:

  1. Open up a solution file and use WebDeploy from VS (2010 or 2012) to deploy it to desired server.
  2. If the above won't work for you for some reason, then build it using a provided ClickToBuild.cmd script and copy the contents on /build/Stage to your webserver (via FTP or other means). It's described in details here.