How to... Step by step deployment of Publish Orchard.Web into IIS 7.5

Topics: General, Troubleshooting
Jun 12, 2012 at 3:39 PM
Edited Jun 12, 2012 at 3:39 PM

Hi,

I'd been researching around the web and nobody can tell it directly in how to deploy the published Orchard.Web.

Here's the settings I did in how I publish Orchard.Web (I used the source file zip).

Orchard.Web properties > Package/Publish Web

  • Configuration: Active (Release)
  • Only files needed to run this application
  • Create deployment package as a zip file
    • obj\Release\Package\Orchard.Web.zip
  • IIS Web site/application name to use on the destination server:
    • /
  1. Now, after these configurations I right clicked Orchard.Web > Build Deployment Package
  2. Open IIS 7.5
  3. Add Web Site
  4. Right click the new website > Deploy > Import Application
  5. Find the location of the Orchard.Web zip file, inside Orchard.Web\obj\Release\Package\
  6. Continue to press Next and it will install.

I browsed the website and this error occurs.

 

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

How to fix this please. I am really having a hard time on this. I know I am not the only one who has this problem.

Thank you very much!

Jun 12, 2012 at 4:36 PM

This may help: http://docs.orchardproject.net/Documentation/Building-and-deploying-Orchard-from-a-source-code-drop

Coordinator
Jun 13, 2012 at 4:41 AM

This should have worked, if your target IIS site is correctly configured to be in a ASP.NET 4.0 app pool, integrated pipeline, and if the settings.txt file for the site has the right connection string, with the right database credentials. If that is the case and you still see the error, please look into app_data\logs to debug it further.

Jun 13, 2012 at 12:56 PM

Is the total size of Orchard.Web is around 53MB ?

Because I guess deploying a 700+MB Orchard.Web is not the best practice. Right?

Developer
Jun 13, 2012 at 1:11 PM

53MB sounds right, when it's signifacantly more, that's probably compiled in Debug mode.

Developer
Jun 13, 2012 at 4:36 PM

Anyway, rather than using the copy-paste method for publishing, I recommend the Web Deploy tool built into Visual Studio. It can be configured in a minute, works great and is much more user friendly. I wrote a step-by-step guide about this in Hungarian, Microsoft/Google translator produces a readable translation. :)

Coordinator
Jun 14, 2012 at 5:58 AM

If you are deploying 700MB you're doing it wrong. What you need to know is that VS is a little dumb when compiling that sort of solution in that it includes a bin folder with all dlls in each module. If you have 70 modules that means 70 times all the dlls. When you use Web Deploy, Orchard does the right thing and doesn't deploy those heavy bin folders.

Feb 6, 2013 at 3:05 PM
Try to grant Full control access for Everyone on your website folder
Apr 5, 2013 at 3:29 PM
I use Msbuild to build the package, using the target Build in Orchard.proj.

It works but i have to include some projects that were excluded like DesignerTools to get the alternates to work on production.

This are the excluded projects:
      <MsDeploy-Exclude-Modules Include="
        $(StageFolder)\**\Modules\Orchard.Localization\**;
        $(StageFolder)\**\Modules\Orchard.Messaging\**;
        $(StageFolder)\**\Modules\Lucene\**;
        $(StageFolder)\**\Modules\Orchard.ArchiveLater\**;
        $(StageFolder)\**\Modules\Orchard.CodeGeneration\**;
        $(StageFolder)\**\Modules\Orchard.DesignerTools\**;
        $(StageFolder)\**\Modules\Orchard.Email\**;
        $(StageFolder)\**\Modules\Orchard.ImportExport\**;
        $(StageFolder)\**\Modules\Orchard.Indexing\**;
        $(StageFolder)\**\Modules\Orchard.Lists\**;
        $(StageFolder)\**\Modules\Orchard.Migrations\**;
        $(StageFolder)\**\Modules\Orchard.MultiTenancy\**;
        $(StageFolder)\**\Modules\Orchard.Scripting.Dlr\**;
        $(StageFolder)\**\Modules\Orchard.Search\**;
        $(StageFolder)\**\Modules\Orchard.TaskLease\**;
        $(StageFolder)\**\Modules\Orchard.ContentPermissions\**;
        $(StageFolder)\**\Modules\Orchard.CustomForms\**;
        $(StageFolder)\**\Modules\Orchard.AntiSpam\**;
        " />
Why some projects are excluded in the Build?.

And i do not include the .cs files only the dll. This could improve the perfomance of the application?
Coordinator
Apr 6, 2013 at 12:43 AM
Edited Apr 6, 2013 at 12:43 AM
This proj file is there to generate the default package that is for download on CodePlex and WebPI. It is not intended to be used for anything else. If you want to change it for your own usage, please do so.

And no, not including the cs files will have no impact at all on performance.
Apr 6, 2013 at 12:37 PM
Excellent. Thanks.
May 7, 2013 at 11:17 PM
Edited May 7, 2013 at 11:18 PM
In the original instructions, the last two:
  • Create deployment package as a zip file ◦obj\Release\Package\Orchard.Web.zip
  • IIS Web site/application name to use on the destination server: ◦/
Don't seem available in VS2012.2. Where exactly does one specify the deployment package of the Orchard.Web solution so as to obtain a .zip file?
Apr 30, 2014 at 10:13 AM
Edited Apr 30, 2014 at 10:13 AM
nunez wrote:
In the original instructions, the last two:
  • Create deployment package as a zip file ◦obj\Release\Package\Orchard.Web.zip
  • IIS Web site/application name to use on the destination server: ◦/
Don't seem available in VS2012.2. Where exactly does one specify the deployment package of the Orchard.Web solution so as to obtain a .zip file?
I came across the same problem, but for VS 2013. From 2012 onwards the web publishing has meant this process is slightly different. Those two settings are applicable to publishing in "web deploy package" mode.

You get there by selecting "Publish" from the Orchard.Web project's context menu and selecting the Web Deploy Package option in the drop down.
Aug 1, 2014 at 3:25 PM
Hi eronkid,

Did you able to resolve the Issue. Is it running fine in Local IIS 7.5. I tried same steps that you did but I still have same Issues.

Thanks for any help on this.
Sep 3, 2014 at 5:33 PM
I've been trying to install Orchard with some customizations, from source.

This error:
Description: HTTP 404. The resource
I got this the first time I deployed. Opening "App_Data/Logs" you will find the error log from Orchard. open that and you might find, as I did, that my permissions were all wrong with the test db login. So after I added the login to the 'db_owner' role (and recycled the app), Orchard moved on.

Funny part for me is that from debug mode in VS2012, orchard runs fine. From the web deploy, it complains about missing some Excerpt class.

Do we need to install something on the server for Orchard, or can the source drop be compiled into the web deploy package?
Sep 4, 2014 at 1:01 PM
You need URL Rewrite module for IIS as well.
Feb 16, 2015 at 12:33 PM
I did the same thing also tried copy paste the pusblished version of source code release but nothing worked.

My working solution was: Enable the modify permission for IIS_IUSRS on App_Data folder on your release. I believe it's because you store here cache etc. so it's correct to have to allowed but not sure how it was corresponding with our error. Maybe someone here can give a quick brief why.

Cheers