How to deploy an Orchard CMS web project to a Windows Azure Cloud Service? - deployment

Basically, I want to be able to deploy a Orchard CMS web application to a windows azure cloud service. I v'e tried following the same steps as I would normally do for any other web application but it just never works.
UPDATE
I downloaded the Orchard.Source.1.5.1 from orchardproject.net website. Added my custom modules and themes. Published the web application to a local folder. That would result in a Orchard web application. I open this web application, add the Windows Azure Cloud Service project and my web application is the web role in this project. I set up DataConnectionString to my azure cloud storage with my name and key. Published to Azure.
Once the deployment is over when I go to the site url to see the result I get this the YSOD with the following exception:
Server Error in '/' Application.
None of the constructors found with 'Public binding flags' on type 'Orchard.Environment.DefaultOrchardShell' can be invoked with the available services and parameters:
Cannot resolve parameter 'Orchard.Mvc.Routes.IRoutePublisher routePublisher' of constructor 'Void .ctor(System.Func1[Autofac.Features.OwnedInstances.Owned1[Orchard.Environment.IOrchardShellEvents]], System.Collections.Generic.IEnumerable1[Orchard.Mvc.Routes.IRouteProvider], Orchard.Mvc.Routes.IRoutePublisher, System.Collections.Generic.IEnumerable1[Orchard.Mvc.ModelBinders.IModelBinderProvider], Orchard.Mvc.ModelBinders.IModelBinderPublisher, Orchard.Tasks.ISweepGenerator)'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Autofac.Core.DependencyResolutionException: None of the constructors found with 'Public binding flags' on type 'Orchard.Environment.DefaultOrchardShell' can be invoked with the available services and parameters:
Cannot resolve parameter 'Orchard.Mvc.Routes.IRoutePublisher routePublisher' of constructor 'Void .ctor(System.Func1[Autofac.Features.OwnedInstances.Owned1[Orchard.Environment.IOrchardShellEvents]], System.Collections.Generic.IEnumerable1[Orchard.Mvc.Routes.IRouteProvider], Orchard.Mvc.Routes.IRoutePublisher, System.Collections.Generic.IEnumerable1[Orchard.Mvc.ModelBinders.IModelBinderProvider], Orchard.Mvc.ModelBinders.IModelBinderPublisher, Orchard.Tasks.ISweepGenerator)'.
UPDATE:
I followed the guide in the orchard project website "Deploying Orchard to Windows Azure" and didn't touch anything, just got all the source code from the repository, ran ClickToBuildAzure from the Visual Studio 2010 command line, didn't get any error messages, set up my storage in the ServiceConfiguration file and uploaded my package and ServiceConfiguration files. Deployment went ok. I got to the Orchard Get Started screen but after input all the information, including a connection string to my SQL Azure DB (got the connection string from Azure Portal and inserted my password), I got the following error:
Setup failed: An exception was thrown while invoking the constructor 'Void .ctor(Orchard.Environment.Configuration.ShellSettings, Orchard.Data.ISessionLocator, System.Collections.Generic.IEnumerable`1[Orchard.Data.Migration.Interpreters.ICommandInterpreter], Orchard.Data.ISessionFactoryHolder, Orchard.Reports.Services.IReportsCoordinator)' on type 'DefaultDataMigrationInterpreter'.
I didn't even get to the AddingaModuletotheDistribution point.
The guide provided by the Orchard Team is not the ideal solution for me.
I have developed custom modules and themes and I work in a development environment with Visual Studio and TFS and would not like to use it with WebMatrix and and deploy to Azure Web site.
I downloaded the source code from the orchard website and added an azure web role project.
By the way, I've checked this question and this blog post and still could not resolve my problem.
Everything I find regarding this is fairly outdated!
I am almost giving up. Could anybody tell me if this is possible? Or the only way to work with Orchard is WebMatrix?

You need to read the documentation more carefully, as adding modules and themes is covered here: http://docs.orchardproject.net/Documentation/Deploying-Orchard-to-Windows-Azure#AddingaModuletotheDistribution
You need to add your modules and themes to the Azure solution, not the Orchard solution the is in src. Once you've done that, the ClickToBuildAzure script will generate a package that contains your modules and themes, and that will deploy well to Azure.

You could try http://docs.orchardproject.net/Documentation/Building-and-deploying-Orchard-from-a-source-code-drop This solved the exact same exception for me just now, but I built with the intent to run on IIS rather than Azure.
Didn't investigate to figure out what the steps in the link did to satisfy the IoC container that was not satisfied by doing a regular file system publish.

Related

VSCode - Shows Deploy to Function App, instead of Deploy to Web App for blazor (ASP.Net) webapp

VSCode sees my Blazor server app as an Azure Function. Right-clicking on my publish folder I only have the option to Deploy to Function App, instead of Deploy to Web App which logically shows me only my function apps from azure. How is this determined by VSCode? I have checked the project file, but I do not see anything obvious wrong.
I tried Googling this, but the search terms only brings me to tutorials where this problem does not exist.
I was missing the Azure Web App extension. Once that was installed, the option appeared

Application Can Not Be Deployed on Cloudhub

currently I am working with mule esb in cloud, to achieve this I am using free trial version of Cloudhub. FYI, I am new to cloudhub and right now tring to deploy my mule application there. Unfortunately, everytime I tried to deploy my application, it can not be deployed.
I have tried 2 ways to deploy the apps.
The first one is from the Mule Studio, by following this documentation:
Deploy Apps to Cloudhub From Mule Studio
When I tried that way, I got following error:
I guess it was because of the proxy.
The second way I tried is by deploying it directly from the cloudhub.io, by following this documentation:
Deploying Apps Directly From Cloudhub.io
But, when I check on the deployment section, I found out, that my application is not uploaded. Then I tried to upload it again, update it, and run the application, but it seems that the application still not uploaded and the change I made is not applied.
Here is the error I got:
FYI, before I upload the application to cloudhub, I compressed the application folder into zip file.
How can I solved this problem? Do you think I did something wrong when deploying it? Thanks in advance.
I too faced similar problem, when deploying application in cloud hub, using Mule 3.5. My application inserts Contacts info (FirstName, LastName, Title, Email etc) from CSV file in Salesforce "Contacts" object. With proxy details configured, my application was running fine in local machine but when deployed in cloud hub, I was getting "Unknown host Exception. Root exception in proxy (something similar to this) " exception.
What I did:
I have removed proxy details from Salesforce connector and re-compiled and deployed in cloud hub. When I tested, the contacts from csv file are getting inserted in Salesforce "Contacts" objects.
Note: When Proxy details are removed, it works in cloud hub but fails in local. It seems cloud hub takes care of proxy connection and we don't need to explicitly mention it.
Regards
Ravi Nori
Be sure that you configure your http endpoint like this:
<http:inbound-endpoint host="localhost" port="${http.port}".... />
CloudHub will automatically expand http.port property to the correct value.
To make it work deploying from CloudHub you shouldn't compress your project yourself and upload but make Studio create a deployable archive: Right click on your project and then click export, select 'Anypoint Studio Project to Mule Deployable Archive' under Mule category. That will have Mule ESB application structure and should work in CloudHub.
Check your http global endpoint is like that
or you can give in properties file like http.host=0.0.0.0 http.port=8081
these values you can give directly in cloudhub properties.
From flow you can access like ${http.host} , ${http.port}
First check that domain name is available

Error on deploying a SharePoint 2010 site template

I have a web application in which I have few document libraries, lists, picture libraries, workflows and few webparts. The webparts are created using visual studio with the feature site scoped. WorkFlows are created using SPD. Everyting working fine in my local SharePoint server. I want to copy my web application to a different server. For this I saved the site template Site Actions-> Save Site as template, saved the wsp to my desktop. Then I took the wsp to the other server machine where i created a webapplication.
Then using PowerShell command added the solution using Add-SPSolution command. When trying to install using Install-SPSolution command I got an error:
This solution contains no resources scoped for a web application and cannot be deployed to a particular web application
I tried to change the scope of webpart feature to Web/WebApplication but encountered error when tried to deployed using visual studio.
How can I deploy the wsp in a different SharePoint Server machine?
When you save the site as a template, you'll only save the site, not your web application. Create the web application first (maybe without a site template), and roll out your site from your WSP afterwards.
If you are using powershell to deploy the solutions, please remember to include the flag -GACDeployment.

error activating .wsp file in sharepoint server 2010

I developed a sample application in visual studio 2010. I created an Empty SharePoint Project and gave the local site url for debugging. Checked "Deploy as Farm" as the trust level of the SharePoint solution. Added a visual webpart and also a class to the solution. I am able to build and successfully run the application using visual studio. In my local machine am using SharePoint foundation 2010 to debug the SharePoint application.
Now i want to deploy this application in the SharePoint server 2010 which is in a virtual machine.
1. I copied the .wsp file of the application i created to the virtual machine.
2. From the central administrator in the VM I created a web application and the site collection.
3. Then using Site Actions -> Site Settings -> Solution(Galleries), choose the .wsp file for uploading. it showed a "Warning: You should only activate this solution if you trust this solution. An activated solution can read, modify and delete your data. " and the activate button is disabled.
Then I tried to do same in my local machine on a different site collection. Here Activate button is enabled but when clicked it threw exception
Server Error in '/' Application.
This solution contains invalid markup or elements that cannot be deployed as part of a sandboxed solution. Solution manifest for solution 'aee60282-765d-4c9f-b67a-5981f18a6d3b' failed validation, file manifest.xml, line 10, character 4: The element 'Solution' in namespace 'http://schemas.microsoft.com/sharepoint/' has invalid child element 'TemplateFiles' in namespace 'http://schemas.microsoft.com/sharepoint/'. List of possible elements expected: 'FeatureManifests, ActivationDependencies' in namespace 'http://schemas.microsoft.com/sharepoint/'.
What could be this error?
The "TemplateFiles" element refers to items that will be copied onto the web server. This is allowed for farm solutions (which are deployed via CentralAdmin), but is not allowed for sandboxed solutions (which are deployed via the Solution Gallery).
When you deploy your wsp with visual studio, you deploy it as farm solution.
When you deploy your wsp from site settings into solution galery, you deploy it as user solution (sandbox solution) with some limitations :
first, avoid using out of the box visual webparts, it's prohibited !
Deploy your wsp by writing powershell script.
A good starting point here :
patrickboom.wordpress.com/2010/05/31/using-powershell-to-deploy-sharepoint-solutions-wsp-2/
Le_Fredo is correct here, when attempting to deploy a WSP file into the site collection directly under the site settings, you won't be able to. I found this article from microsoft to be extermely helpful
http://technet.microsoft.com/en-us/library/ff607688(v=office.14).aspx

Deploy WEB Service Consumer module

We have recently added some functionality to our web site that requires adding a service reference to an api in an external domain. Adding the reference to a VS2008 project createed a sub-folder in the "Service References" folder and added 18 files to that folder that appear to represent the classes in the api. The api provider also had me add custom binding and client references to system.serviceModel in my web.config file.
Do I have to deploy that entire folder with its 18 files to my production site to use the web service? Does some of it get compiled into my project dll? I can find all kinds of references to deploying a service, but not what is necessary to deploy a service consumption module.
Sorry for short, but I don't have the answer for you. But you can get this answer yourself. This is the only way Iwould get the answer. Deploy it without them, see if it works. If it doesn't deploy with. If it works, then you know.
The good news is that I have to deploy absolutely no files from the project have to be deployed to the production site. Everything the web service consumer application needs gets compiled into the application assembly.