Getting started with Orchard on Azure - azure

I'm trying to set up an Orchard site to deploy to Azure, but have fallen at the first hurdle. I've downloaded the source code and opened Orchard.Azure.sln, but when I run it I get the error:
Access to the path 'C:\APPG\src\Orchard.Azure\Orchard.Azure.Web\App_Data\Dependencies' is denied.
What am I doing wrong? I'm a complete noob with Azure, so please forgive my ignorance.

This isn't actually Azure related, but you need to ensure that the identity that your website is running under has write access to the App_Data folder. Either give the IIS user access, or change the application pool identity in IIS to Network Service. When Orchard starts for the first time, it writes a whole bunch of stuff to folders below App_Data.
Bear this in mind if you need to install fresh at any time. Simply deleting the contents of that folder and creating a new, blank database (or using the compact option) will start afresh.

Related

Visual Studio ClickOnce Web Deployment

I would be most grateful if anyone could help me solve this problem with ClickOnce Web deployment.
I have read all the threads on this subject and I have also read through all the Microsoft documentation on the subject. They seem to say a lot without actually being direct or providing helpful examples. However, perhaps I am wrong and I have not looked in the right places.
I have already used ClickOnce successfully to deploy an application on the local area network.
It works well and really isn't that complicated. However, my goal is to deploy this application to customers, who are not connected to my local network.
I have set up a web site (www.mydomain.co.za), which I can access directly or via the ftp protocol.
I have created a sub directory off the root where I intend to publish the files created by the publish function. The publish function of the application requires a Publishing Folder Location and a Installation Folder URL I don't really understand the functional difference between these two locations. If I set the Publishing Location to ftp://www.mydomain.co.za/MyProductName and the Installation Folder URL to http://www.mydomain.co.za/MyProductName, then the publish process succeeds and when I check on the web server, the files have been published successfully it would seem. A further Application Files/MyProductName subdiectory with the version number information appended was created where all the output was placed.
My next step is to then grab the URL of the setup.exe file and to run it from a browser. This downloads the setup.exe file to my downloads folder which I then try to run but I get an error
Deployment and application do not have matching security zones.>
I have seen this come up in other threads but These threads don't seem to relate directly to what I am trying to do. These threads make mention of using Internet Explorer to achieve some degree of success, but all the browser did was to download the file.
I have also noted with interest that a web page is created in the root with a button that prompts the user to install the application. This does not work either.
Does anyone know of an article that I can read on this subject which is more helpful or if anyone can offer more insights into this I would be very grateful.

I have copied files via FileZilla to Azure but the index page doesn't show

I shall try not to be subjective so as not be closed.
This is my first foray into Azure and it really is NOT like my dedicated server on another hosting company. Suffice it to say, what takes me minutes to deploy a site via FTP, then to IIS to set it up, has taken me WEEKS!
I don't want to set up any of the "pre-packaged" Quickstart solutions. I simply want my INDEX.HTML file to DISPLAY.
I copied all the files via Filezilla to Azure, quite easily, but yet, when I go to the URL, I keep getting:
Your App Service app has been created
Go to your app's Quick Start guide in the Azure portal to get started or read our deployment documentation.
Everything is set up on Azure perfectly.
Here's what it looks like under the appSettings Tab:
**Virtual applications and directories**
/ site\wwwroot Application …
/wwwroot site\wwwroot\mynewsite Application …
The directory, site\wwwroot\mynewsite has an index.html but it will not display when I type in the URL.
I already built the site and the company I'm working for wants it on AZURE.
A dedicated server takes under 15 min. This has taken weeks.
UPDATE:
Thiago, thank you... so here's the file structure below...
Reveals EXACTLY what my directory looks like. Under /thingblugrow is where "the fake name" mynewsite exists. I thought it'd be easier to just show you what I really have.
So, /thingblugrow has an index.html file....
If your want to visit http://yoursitename.azurewebsites.net/mynewsite/index.html,
The appsetting we need config it as following in your case:
Virtual applications and directories
/ site\wwwroot Application …
/mynewsite site\wwwroot\thingblugrow Application …
You also can refer to another SO Thread to get more info about creating Virtual applications and directories
You're adding an extra level, so in your case you'll be able to see the index through:
http://yoursitename.azurewebsites.net/mynewsite/index.html
Just move all the content from "mynewsite" folder to the parent directory (wwwroot).

Using MsDeploy to create web site or virtual directory

We're trying to figure out how to automate our website deployment. We've picked an existing project, and started playing around.
First, I used the Publish wizard from with VS2012 to create a Web Deploy Package. We then tried deploying the package as a website, through the IIS Manager, and that succeeded without a problem. We thought we were nearly there.
What was next was to learn how to run this from the command-line, so we could script it. And that's caused us no end of headaches.
We've been playing around with msdeploy.exe, and with the .cmd file that the publish wizard created, and while both methods seem to install the package as a virtual directory just fine, neither will install the package as a root website.
Browsing around on the web, I've run across this:
Web Deploy iisApp Provider
In a sync operation, the iisApp provider copies content to a folder under the destination site that you designate and marks the destination folder as an application. The iisApp provider cannot create a site. The iisApp provider will not create applications under sites that do not exist.
And
If you want to synchronize a Web site and its related configuration, use the appHostConfig provider.
At this point, we don't know beans about iisApp, or appHostConfig, or whatever. We didn't create a package that used one or the other, VS2012 did. We haven't a clue, at this point, how to convince VS2012's web publish to create an appHostConfig package, and for that matter, I don't know if we want to.
Here's the thing - whether a given website is installed as a root application or as a virtual directory is not something the developers control - it's a decision made by the implementation team. Or testing team usually installs any given website both ways, to ensure that both work.
And since IIS seems to be able to manage to install this package as a root site, there must be a way to get msdeploy to do it.
But how?

IIS Shared config - applicationHost.config Error: Cannot write configuration file due to insufficient permissions

I've setup a UNC share for IIS shared config using a specific AD service account and set to FULL CONTROL. I've also exported the config from one IIS server and set-up an additional IIS server to point to the share. When I open the applicationhost.config for example on the UNC share and remove an application pool, I can see the entry also remove in both IIS servers.
So I know:
1) I can export to the share with the specific service account
2) Both IIS servers can read the config when I edit manually
3) However when I remove an app pool from one of the IIS servers through the manager I get the above error.
I've tried using the process monitor utility to see what account is being used to write to the config and it seems it is my own AD user account rather than the shared service account. I know IIS Manager has my username e.g. ROOT\MYNAME logged on, but I wouldn't have thought it would use this to write changes to the shared config. Surely it would use the service account?
Does anyone know how to prevent this error? Why does the shared config and tied service account not come into play when making changes on one of the servers?
So, IMHO, this error is a red herring. I was publishing to a server and got a message saying I was out of space. So, I logged in, realized there was a bit of cruft in extra apps published in IIS, we didn't need. I right clicked and tried to remove one. I got the same error as you.
Having done some manual changes to applicationHost, I thought it "might be me" but it seemed very odd that editing this file would cause such a thing. However, I had recently learned that windows does some funky 32 vs 64bit machinations with this file (google it).
Deciding I had better things to do, I asked our IT to add space to the VM and guess what? I am no able to remove these apps. My guess is that I was at the end of the line on space and the backend management of these special files was not completing and throwing this not-so-helpful exception.
I'm not a 100% about this. For full disclosure, I will add that updates had been applied recently, but I'm pretty confident that this is a possible solution.

Directory Listing Denied in Orchard

I have a new Orchard site which successfully runs the setup and database configuration when running locally. But when I tried to deploy it to the actual server and point a browser to the site, I get a "Directory Listing Denied" error.
Anyone seen this and fixed it?
I figured it out. Running on a shared web server, if IIS is configured for my site to use the default app pool, Orchard is precluded from reading its own files. (Remember that Orchard uses libraries and needs deep read/write access to subdirectories).
So the solution was simply to configure the site to run in its own isolated application pool.
Looks like this on my site's control panel:
Hope this solution helps someone down the line.
My guess is that you deployed the whole source code instead of src/orchard.web.

Resources