Umbraco 6 on Azure: UmbracoModule Service Unavailable - asp.net-mvc

I'm deploying a new Umbraco 6 installation to Azure, and I've run into a problem I can't seem to diagnose.
Here are the steps I took to get the site deployed:
Created new MVC 4 project in VS2012
Installed UmbracoCms 6.0.0 via NuGet
Tested locally: SUCCESS
Set up correct connection string for Azure in Web.config (via transform)
Deployed to Azure using Web Deploy
Unfortunately, when I navigated to the Azure instance, I get a blank page with "The service is unavailable." I enabled detailed logging in Azure, and looked at the log files. There wasn't much that suggested a solution to me. This is what the detailed error says:
Module: UmbracoModule
Notification: ResolveRequestCache
Handler: PageHandlerFactory-Integrated-4.0
Error Code: 0x00000000
I'm out of ideas at this point...any ideas?

I've just gone through the steps of what you describe. I created a MVC4 project and downloaded Umbraco 6 via Nuget. What I did notice was that I had to 'include' a fair number of file into the project structure in the VS solution explorer.
I ran the website locally and ran an install just using SQL CE.
I created a website on Azure and I downloaded the .PublishSettings file and imported this into the Web Deploy options in VS. I then published the site 'as is' just to see what happened. I didn't expect the database to work but I just wanted to make sure that the application ran ok and I could at least access the Umbraco login screen.
When I accessed the site, it worked as expected and I could access the login screen at /umbraco/
Given the problems you are having, although this sounds simple, did you 'include' all the files in the solution explorer before deploying?
If you are still having issues, I would doing what I have done and just setting up another very simple site to test your deployment process. I have to be honest, I was surprised how easy it is.

I've just been through the same steps with the simple blog and it was quite hard. I didn't include anything into Visual Studio (except it's 2010 and I downloaded the publish profile) and the site ran fine locally.
On uploading Umbraco 6 to azure I got 'Could not load file or assembly MySql.Data, ' etc. .net error. Of course, it was there.
On repeating my deployment steps, swapping between Visual Studio, Web Matrix and Sql Azure Migration Wizard, checking it was release config on build etc. (not that it should need building) I got various 'The page cannot be displayed because an internal server error has occurred' on a blank white screen, and 'Could not load My.Sql' errors.
Coming back to it the next day, I deployed again, and my user had lost its role membership in the database. I ran the EXEC sp_addrolemembers again, and lo, the site now works. I wish I could be more specific on what went wrong and what got fixed, but it's all a bit voodoo.
I second what Digby said - make sure all your includes are, well, included and keep on deploying. I think azure is having a bit of a do lately, there was an outage last week on 23rd Feb.

Related

Windows Server 2019: IIS 10: HTTP Error 403.14 - Forbidden: The Web server is configured to not list the contents of this directory

All,
I am migrating a working .Net Framework Website from IIS 8.5 on a Microsoft Windows Server 2012 to IIS 10 on a Microsoft Windows Server 2019.
The new web site is showing the error
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
As far as I can see the website on the new server is configured the same as on the existing.
Neither have directory Browsing enabled nor a default file set as is recommended by most of the posts which exist discussing this error.
I have run the following which is also recommended.
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir
The problem still exists.
I came across a post saying there might be an issue if paths referenced in the web.config are not correct but they look fine.
Has anyone got any insight into what else might cause this issue?
Are there any differences between IIS 8.5 and IIS 10 or between windows servers 2012 and 2019 which might cause this issue?
Thanks
This problem occurs because the website doesn't have the Directory Browsing feature enabled. Also, the default document isn't configured. To resolve this problem, use one of the following methods:
Method 1: Enable the Directory Browsing feature in IIS
To resolve this problem, follow these steps:
Start IIS Manager. To do it, select Start, select Run, type inetmgr.exe, and then select OK.
In IIS Manager, expand server name, expand Web sites, and then select the website that you want to change.
In the Features view, double-click Directory Browsing.
In the Actions pane, select Enable.
Method 2: Add a default document
To resolve this problem, follow these steps:
Start IIS Manager. To do it, select Start, select Run, type inetmgr.exe, and then select OK.
In IIS Manager, expand server name, expand Web sites, and then select the website that you want to change.
In the Features view, double-click Default Document.
In the Actions pane, select Enable.
In the File Name box, type the name of the default document, and then select OK.
More information you can refer to this link: HTTP Error 403.14 - Forbidden when you open an IIS webpage.
All those clowns glibly posting that "HTTP Error 403.14 - Forbidden: The Web server is configured to not list the contents of this directory" can be fixed by configuring the web site by either enabling the Directory Browsing feature or adding a default document are really not understanding what they are talking about. Anyone can copy a solution from one post and paste to another.
I'm not going to pretend I know what I am talking about but I have fixed my issue and will share what I did here to see in the hope it helps others.
I created a project (of the same type as the application I was trying to deploy) using my IDE (MSVS) in the same .Net version of the application I was trying to deploy. In this case it was creation of an MVC project in .Net Framework 4.5.
I did nothing to it. All I wanted was a skeleton.
I replaced all the files in the home directory of the web site I had an issue with, with the files of this skeleton project.
I attempted to browse to the web site and it worked successfully. Note the directory browsing was not enabled nor was a default directory set.
This proved to me that those settings were irrelevant.
Having googled around, some sites point to paths in config files causing an issue if they do not exist, eg a logging path to d:\logs where that directory was missing. It didn't fix my issue but there's no harm checking.
I stumbled across a post which talked about the roles and features enabled on the server. In Web Server (IIS)/Web Server/Application Development they had selected "Application Initialisation" and "ASP".
The Windows Sever 2012 server I was moving the application from, where it work without a hitch, did not have those selected so had not selected them on the Windows Server 2019 I was moving them to when I set that server up.
It made no sense that this would be the solution but having tried everything else I activated those two options.
Stone me if the issue was resolved.
As a check I removed those two options and the problem came back and when I reselected them it went away again.
This struck me as pretty conclusive only having thought I'd found the cause of the problem I built the website from scratch and the problem came back again.
It took a number of iterations but eventually I got there, more by luck than judgement and whatever the cause was it was due to an issue in the application which wasn't being logged in event viewer so focus on permissions to files being written to: not only that the app pool account is set up on the directories it needs access to but also that it has modify or even full control.
All those muppets robotically posting advice on configuring the web site by either enabling the Directory Browsing feature or adding a default document will no doubt copy this and paste it into their posts to claim the credit but c'est la vie.
I hope this post is of use to someone, apart from those muppets.

What do I need to do to get MVC to work on IIS7? Does not show page, just shows directory

I've just file system deployed an intranet site to one of our internal servers. The site is configured with it's own application pool w/.net 4. The site is configured to allow anonymous access. The NetworkServices account has read access to the directory/s. For trouble shooting purposes I have directory listing enabled.
When I hit the site I get the directory listing, why does the home/index page not come up as expected? Other servers that I have deployed to have just worked. I can not seem to find a difference here.
Also I have the site configured to come up as http: //myip:8081/
I've already run aspnet_regiis -I and checked to make sure the pool was the correct version.
I rolled back my .Net version from 4.5.1 to 4 and reinstalled all the nugget packages.
I have copied local all the DLLs just to be sure.
The original project was targeted to .Net 4.5 and I had down-converted to 4. I thought I had changed all references and configuration items but I must have missed something.
I created a new project targeting .Net 4 and copied my code files into the new project.
Compiled and deployed and all worked correctly.
Not sure what item in the web.config wasn't changed (or maybe something else in the project) but this worked and was fairly quick.

W2K8 server running IIS7 VS Express Web Deployment

(EDIT) - I decided to make this page more like instructions since i have figured this out.
Deploy my VS Express 2013 Web Application to an MS Server on my LAN running:
Windows Server 2008 Standard
IIS 7.0
MS SQL Express
This is some information to help anyone with a similar situation.
I can access the Web Application locally (from VS Express) when I click Debug - Start Debugging. ALSO - At this point it is connected to the MS SQL Express Server on my LAN and not a local database.
Time to publish the Web Application to my IIS 7 Server!!!
NOTE - The method below WORKS FOR ME. There might be better ways to do it but I found any info on this exact setup very limited.
VS Express 2013 Web Deploy pre-reqs:
(on IIS 7 Server)
-Web Deploy is installed, http://www.iis.net/downloads/microsoft/web-deploy
-Set Up Security on Web Deploy, this site helps:
http://www.iis.net/learn/install/installing-publishing-technologies/installing-and-configuring-web-deploy
In Project:
Right Click your project name, choose PUBLISH...
PROFILE - Name or import your profile
CONNECTION
-Server: LAN address of your IIS server
-Site Name: Name of Site on IIS
-User/Pass: (Credentials you set up earlier in Prerequisites)
-Destination URL: (I leave blank for now)
SETTINGS - Click the arrow below FILE PUBLISH OPTIONS and check the 'Exclude App Data' setting (this is assuming you are running MS SQL on the IIS Server).
Select your Database string, it should be in the drop down list)
PREVIEW - Web Deploy will give you errors when you try to PREVIEW, resolve these errors using MS Websties, Stack Overflow, etc. **WHEN YOU GET THIS ERROR: "#ERROR_FRAMEWORK_VERSIONS_DO_NOT_MATCH" (full Error message below), your Web Deployment is ready
PUBLISH the web deployment, it wont work, thats okay. It creates a publish profile
Right-click the project and choose PUBLISH again, this time use under the CONNECTION tab choose WEB DEPLOYMENT PACKAGE, take note of your folder location (Step 8). All the database/file settings should be the same (doublecheck if you like), PUBLISH the Web Deployment package
Log onto your IIS Administration (on the Server), right click the NAME of the Server (top level) and choose DEPLOY - IMPORT SITE. Navigate to the folder where you saved the package in step 7. (or transfer it with a USB Stick, etc)
IMPORTANT - When importing the profile, at the second screen, UNCHECK the boxes related to .NET 32-Bit etc. (there are two of them)
Leave everything else on defaults and import the site (successfully?).
At this point when I browse the site from IIS I get a 403 Forbidden Error.
I fixed this using code from comment below:
After that my Web App was from the IIS Server. I'm continuing with MVC tutorials found here:
http://www.asp.net/mvc/tutorials/mvc-5
I'm hoping once I understand enough about MVC and EF6 I can connect the Web App to MySQL rather than MS SQL and still build Code First Applications. If anyone has info on that please post it in the comments.
If this post helped you please Vote up top, I'm new to the STACK.
**Full Error Message from post above:
Web deployment task failed. (The versions of the .NET Framework Configuration Provider (rootWebConfig32) are different on the source (4.0) and destination (2.0). Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FRAMEWORK_VERSIONS_DO_NOT_MATCH.)
I think your issue might be permissions. What is your authentication set to? In debug mode, you're typically working as yourself, whereas if you deploy, you are setup as a different user, most likely anonymous. With that in mind, you should be able to correct your problem.
Good luck!
It was a combination of things. I finally got it working.
I created a Deployment package following instructions found on MS site and others.
Before Publishing my deployment package, I ran a "Preview" (PREVIEW section of the wizard). This was bringing up various errors related to Security and other issues I fixed using MS support sites.
WHAT I FOUND ON MY OWN - (Its fairly simple), after you create the Deployment package without issue, go to IIS on the Server side, click the Server Name in IIS (top level) and choose Deploy - Import Package. In the second or thu=ird step there is a screen where you select items to be imoported (mine had everything checked). I UNCHECKED the two related to .NET Config files and imported it. Voila, it worked.
It still wasn't letting me view the site. I had to add this line to the web.config file and it fixed everything.
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
If anyone wants a mored etailed description of what I did let me know and I will try and redo my process/tutorial with more exact instructions.
to get the same publish behaviors with direct publish from VS, you can uncheck following box : properties\Package/PublishWeb\include IIS express settings as configured in ISS express

ASP.NET4.0 MVC4 IIS7.5 Error 403.14 I'm Literally Pulling Out My Hair

I want to get away from developing in PHP but doing that is proving to be a massive headache.
I am trying to set up a website with MVC 4, ASP.NET 4.0, on Win7 Professional (64-bit). The website is just the basic site that is set up with Visual Web Developer 2010 Express selecting New Project > C# > Website > ASP.NET MVC 4 Application.
After setting up the application in IIS7.5 I am getting an HTTP Error 403.14 - Forbidden. I've done a ton of research and tried multiple different suggestions on how to solve the problem but NOTHING is working. Here are some things I tried:
Install/Register v4 of ASP.NET. This has been the most annoying
thing because everyone else's issue is fixed when they do this but
mine is not.
Changing the application pool settings:
Set to classic/integrated mode
Change the user/permissions used by the application pool
Made sure 32-bit applications were enabled
Added security permissions to folders related to the website (on multiple accounts)
I can get a regular html document to show up if I add it to the websites root directory. It seems that the MVC stack is not being called at all. The server wants to display the directory, which I can enable/disable, but the website is not being displayed.
Please can I have more potential fixes before I resort to my last desperate act? A baseball bat.
p.s. I'm more than willing to do a skype conversation or a share screen kind of thing if someone wants to dig in deep. I am beyond frustrated with this.
So it seems, in my indefinite well of stupidity, I was pointing the webserver to the incorrect folder. I needed to point the webserver to the folder with actual files of the application rather than the folder containing the .SLN file. Sorry to waste your time!
try running the aspnet_regiis
http://msdn.microsoft.com/en-us/library/k6h9cz8h.aspx
open the command line in %windir%\Microsoft.NET\Framework64\v4.0.30319 and run
aspnet_regiis -ir
other possible solutions:
quit skype, or any other similar applications

How to publish an ASP.NET MVC website

I've a site that I'd like to publish to a co-located live server. I'm finding this simple task quite hard.
My problems begin with the Web Deploy tool (1.1) giving me a 401 Unauthorized as the adminstrator because port :8172 comes up in the errors and this port is blocked - but the documentation says "The default ListenURL is http://+:80/MsDeployAgentService"!
I'm loathe to open another port and I've little patience these days so I thought bu66er it, I'll create a Web Deploy package and import it into IIS on the server over RDP.
I notice first that Visual Studio doesn't use a dialog box to gather settings, or use my Publish profiles but seems to use a tab in the project properties, although I think these are ignored when importing the package anyway?
I'm now sitting in the import wizard with Application Path and Connection String. I've cleared the conn string as I think this is for some ASP stuff I don't use but when I enter nothing in the Application Path, the wizard barks at me saying that basically I'm a weirdo because most people publish to folders beneath the root site.
Now, I want my site to be site.com/Home/About and not site.com/subfolder/Home/About and I think being an MVC routed site that a subfolder will introduce other headaches. Should I go ahead and use the root?
Finally, I also want to publish a web service to www.site.com/services/soap which I think IIS can handle.
While typing this question, Amazon have delivered my IIS 7 Resource Kit, and I've been scouring the internet but actually I'm getting more confused.
Comment here seems to show consensus opinion that Publish isn't for production sites and that real men roll their own.
ASP.NET website 'Publish' vs Web Deployment Project
...I guess this was pre- Web Deployment Tool era?
I'm going to experiment on a spare box for now but any assistance is welcome.
Luke
UPDATE
The site was imported (to the root) manually with Web Deploy and it worked. If you get the error "There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' " its because your app pool is 4.0 and should be 2.0.
If you are using VS 2010, may I recommend Scott Hanselman's Web Debloyment Made Awesome?
http://www.hanselman.com/blog/WebDeploymentMadeAwesomeIfYoureUsingXCopyYoureDoingItWrong.aspx
Even if you are using VS2008, there are nice concepts there that will probably help.
I've experienced the same frustration and trouble with this as well. Coming from a Java web background where we can package everything as a single WAR and toss it on the server, the deployment process with ASP.NET seems archaic.
I currently have a python script that uses FTP to transfer the needed files to my test instance on the remote server. I have another python script that transfers those files to my live site. These scripts are smart enough to take care of differences between some of the configuration files etc..
I've found it much easier than trying to setup permissions or using the Microsoft deploy tools.
Hi you can use filezilla software to upload

Resources