Intermittent azure 403.14 - azure

I have a web app in azure hosting a MVC 5 website.
Everything is fine for a week or 2 then everything stops and returns 403.14.
I'm hosted on an Azure Standard 1: medium subscription. So there should be no issues with quotas. Running .Net 4.7
If it were consistent then i could get somewhere but this is fine until it suddenly isn't. Happens at random times on any day.
Restarting the app in the admin panel doesn't work.
The only way i can get this back up is to open the web.config within the 'app service editor' add/remove a blank line then save it.
Anyone seen this issue before?

So, after much a fiddle.
I upgraded my visual studio to latest minor version.
installed .net framework 4.7.2
upgraded all projects to this
Added a global.asax Application_Error method and logged all unhandled errors (should have been doing this all along i know)
rebuilt and redeployed.
So far so good.

Related

cloud project iis express 8 Static compression is being disabled

Here's my setup:
An MVC web project that is hosted in azure
VS2012 and VS2013
Windows Azure SDK 2.2
IIS Express 8 - 8.0.1557
The MVC project is using castle windsor, and there are performance counters being created during application start up.
When I run the project locally (via emulator) I am find that during the performance counters creation an exception is being thrown however the performance counters are created and copied across to azure table storage.
Exception:
The directory specified for caching compressed content C:\Users\danielc\AppData\Local\dftmp\Resources\c2fd1c9b-d6c5-49af-942d-715c8f1ccc1c\temp\temp\RoleTemp\iisexpress\IIS Temporary Compressed Files\767ba5ae-0038-4c32-a70c-3d2f671e37ed is invalid. Static compression is being disabled.
When I try and find this location, it does not exist, which implies to be that it maybe a permission issue, but I dont know how to change the permissions for the emulator.
To add to my headache, I am in a team of 6, all of which are not experiencing this issue. Furthermore when it is deployed to azure it works fine as well.
My question therefore is, has anyone experienced this issue before and know a solution?
Steps taken so far:
Uninstall and install azure sdk 2.2
Install azure sdk 2.3
Install azure sdk 2.4
Uninstall and install IIS Express 8
Uninstall IIS Express 8 and install IIS Express 7.5 (which turned out did work as not supported but just clutching at straws really)
Thanks
So I believe I have got to the bottom of it. It would appear the instance count in the ServiceConfiguration.cscfg is 4, but when set to 1 it runs fine.
It is very odd that my colleagues who work with this other configuration are not experiencing the issue.

The Windows Azure SDK for .NET must be installed

I'm trying to publish my app to Azure which I have done several times before. For some reason I'm now getting the following error:
The Windows Azure SDK for .Net must be installed to enable publishing
to Windows Azure. LightSwitch will load a web page to begin
installation.
It loads a web page, downloads V11AzurePack_1_8_1.exe which in turn runs the Web Platform Installer 4.6 which in turn installs Windows Azure SDK Tools 1.8.1 for Visual Studio 2012. All of this succeeds. But going back and attempting to Publish results in the same error.
I noticed that there is a Windows Azure SDK for .Net (VS 2012) - 2.2 in the WPI. So I installed that manually, tried to publish, same result.
The SDK is clearly installed:
So why can't I publish to Azure? The only thing that looks like it might be a problem is that I have LightSwtich Azure Publishing 1.1 add-on for Visual Studio 2012 installed and I know there is a newer version of that available. But I can't find a direct download nor can I find a way to uninstall that package or force WPI to suggest an update.
Uninstalling everything Azure related (except the LightSwitch add-on as that seems to be unremovable and un-upgradeable), rebooting, and installing only the latest SDK produces the same problem.
After following a moderator's advice to repair Visual Studio on the forum, I was no longer able to open my project at all. I waited for a response but got none. So I decided to reinstall Visual Studio all together.
I followed this and this in order to remove as much of Visual Studio as possible and then reinstalled. I then installed Update 4 and was again able to open my project.
However, upon trying to publish, the same error was encountered.
I decided to upgrade my project to VS2013. That all seemed to go well. Wnet o Publish to Azure and it claimed that it succeeded. However going to Azure and launching the app's site brought up the previous version.
I deleted my Azure cloud service and started a new project in VS2013. I copied over one of my screens to have something to run. I then tried to publish to Azure. It again told me it succeeded but the site did not exist in the Azure Management portal. However, it did realize that I had created a new self-signed certificate so there was some type of communication there. Just not an actual Publish.
Then I did something really stupid. I uninstalled the Azure SDK and tried to reinstall it thinking that was the problem. Now I'm back to where I was before. An endless loop asking me to install the Azure SDK.
I wiped out all of my Azure services. Did a system restore to a month ago. Reinstalled the Azure SDK. This then allowed me to "Publish".
Not really.
Visual Studio claimed that the Publish Succeeded. The services were created and the certificate uploaded but nothing was deployed. I then did a manual deploy and the Production instance began to be deployed.
Everything seems to be running but I cannot access my app's site. I receive a 403 Forbidden error message. With or without HTTPS required. But this seems to be a different issue so I'm going to open another question on it.
Why these extreme measures were required is beyond me. This continual breaking of LightSwitch to Azure publishing is getting to be absurd though.

Debugger can't connect when starting local azure project

Ok, first of; here's what I did:
Install AZURE tools
Reboot
Start Visual Studio - new Azure project
Add web role (asp.net MVC 4 beta web role)
Hit F5 (debug)
It starts up the storage emulator and the compute emulator and starts to load in runtimes, and then I get a popup saying that the debugger couldn't connect.
Then after some googeling I'm suggested to try to run the application without running the debugger to see if I can acces the application. When I do I get this:
So I figure that IIS does not have permissions to access some file/directory. So I go to IIS and look up the application pool running the app, and it tells me that the identity in use is NetworkService, then I go give NetworkService full permissions to the entirety of the folder IIS has set for the application (which also happens to be the path to the project dir). Still I get the same error. Now I'm more or less out of ideas, but I try one last thing, which is to also give IUSR full permissions to the same dir, but this did not help either.
How can I go about resolving this problem? I haven't tried actually launching my project to Azure yet, cause if I can't even get it to work in development I don't see much point. Any and all help would be appreciated.
I ran into the same error today after uninstalling .NET 4.5/Visual Studio 11 Dev Preview, then installing ASP.NET MVC 4 Beta (this is before Feb 29th when the updated VS 2011 Preview drops).
Since I uninstalled .net 4.5, you just need to do an "aspnet_regiis -i" to ensure the .net framework (4.0) is set up with IIS 7.x this worked for me.
Edit: This will work if you uninstall/then manually install Visual Studio 2012 RTM as well.
I had a similar error yesterday. For me the problem was that the output of the build was empty in the target folder.
I tried to answer a similar question https://stackoverflow.com/a/9411422/182371:
Check %UserProfile%\AppData\Local\dftmp\IISConfiguratorLogs\IISConfigurator.log
file for the error messages. Mode details at
https://stackoverflow.com/a/8432621/182371
Make sure that the build output of your project is not empty. You can do this by going to IIS, find the site with the name similar to
'deployment16(6).WindowsAzureProject2.WebApplication3_IN_0', right
click --> Explore.... Make sure that this folder is not empty and
contains all the files required to start a web project successfully.
As for the Access Denied error:
it could be just an IIS default setting to disable browsing. To resolve that, just navigate to that web site in IIS, find Directory Browsing icon, and press Enable. You will at least see the files inside that directory.
Also try not only 127.0.0.1:81, buta specific document inside that folder, like 127.0.0.1:81/Default.aspx
Take into account the fact that there's sometimes some mess with the ports. You see that in the error message it's port 82, but in your browser it's port 81. So make sure you're using the right port. Or, even better, in your service definition try to use some non-standard port for this to avoid remapping.
I've met the same issue. In the end, I had to reinstall IIS 7.
I got this exact same error and tried a re-install of IIS and the Azure SDK - nothing worked.
Eventually tracked it down to the "IIS URL Rewrite Module 2". I went to the Control Panel and chose Repair and it resolved it. If you have a section in your web.config then this might be the cause.
Follow step 11 from http://www.microsoft.com/en-us/download/details.aspx?id=35448. Worked for me on Windows 8 with Oct 2012 SDk when upgraded from 2011.

Debugging Azure: Error attaching the debugger to the IIS worker process

I have a web application asp.net to deploy to Windows Azure. I try to run it on local first. But when debugging, I catch this error from VS2010:
"There was an error attaching the debugger to the IIS worker process
for URL 'http://127.255.0.0:82/' for role instance
'deployment16(6).WindowsAzureProject2.WebApplication3_IN_0'.
Unable to start debugging on the web server ......."
I've search so hard to find the solution for this problem but there's nothing seems work for me. I'm a newbie in Windows Azure, it's really a big trouble with me.
I had similar problem with Windows 8, debuging a cloud application with Visual Studio 2012 RTM and Azure SDK 1.71, when trying to launch the application into the compute emulator. It was a very simple app, but I used Azure diagnostics. At the end these are two things I have changed that have work for me, both turning on Windows 8 features (so go to Win8 and open 'Turn Windows Features On/Off'.
Activate the checkboxes for:
Internet Information Services Hostable Web Core
Internet Information Services > World Wide Web Services > Application Development Features > ASP.NET 4.5
Internet Information Services > World Wide Web Services > Health and Diagnostics > Tracing
Internet Information Services > Web Management Tools > IIS Management Scripts and Tools
That worked for me, it makes sense, as I'm using Visual Studio 2012 and trying to get some trace information using diagnostics in Azure.
I hope this will work for you or give some tip about the problem. In the case of being useful information, remember to vote as response or as value tip.
Thanks,
Mike
This usually happens when there's a problem with the project to be deployed to the emulator (WindowsAzureProject2 in your case).
Try the following:
Check %UserProfile%\AppData\Local\dftmp\IISConfiguratorLogs\IISConfigurator.log file for the error messages. See more details in this answer.
Make sure your project can be started without the emulator. It's a web project, so just try to start it as a regular web project. Or publish it to the separate folder and try to create a website in IIS of it.
Check your *.csdef and *.cscfg files to make sure all the configuration is correct.
Make sure that the build output of your project is not empty. You can do this by going to IIS, find the site with the name similar to deployment16(6).WindowsAzureProject2.WebApplication3_IN_0, right click --> Explore.... Make sure that this folder is not empty and contains all the files required to start a web project successfully.
BTW, there's a similar question: Debugger can't connect when starting local azure project
Follow step 11 from http://www.microsoft.com/en-us/download/details.aspx?id=35448. Worked for me on Windows 8 with Oct 2012 SDk
I just have today the same problem trying to Debug locally with Azure Storage Emulator in Windows 7. So in the Azure project properties, in Web tab, I checked the radio button 'Use IIS Express' and it debugged without problem. I hope this helps someone.
I encountered this exact same problem when I upgraded an existing Azure solution to the Azure SDK 2.1. After some hunting around I uncovered that the upgrade had automatically set the "Local Development Server" setting to "Use IIS Web Server".
Changing the "Local Development Server" setting to "Use IIS Express" fixed the problem immediately.
To access this setting right-click the Azure cloud project file in your solution, select the "Properties" option, tab down to "Web" and you'll see the following setup.
Also, make sure you run Visual Studio as administrator
Please check the version of emulator you have installed. If your code is created in older sdk and you have a new emulator installed it will give you this error.
Check the version of Azure APIs in your project, go to Project > references and right click on Azure dlls to check the version, same sdk version must be installed on the system, higher are optional as azure 2.x are not backward compatible.

Azure - error on starting with multiple web role projects

If I have more than one webroles(projects, not instances) in my application, I get this error: (I only get it if I attach a web role. It works fine wit as many worker roles projects as I want)
Microsoft Visual Studio
Windows Azure Tools for Microsoft Visual Studio
There was an error attaching the debugger to the IIS worker process for URL 'http://127.0.0.1:5100/' for role instance 'deployment(21).CloudPOC.WebRoleToHostDataService.0'. Unable to start debugging on the web server. The web server is not configured correctly. See help for common configuration errors. Running the web page outside of the debugger may provide further information.
Click Help for more information.
OK
What is wrong here? I can't understand it and I need a webservice project!
Make sure you are starting the Azure project rather than the Web Project itself. You might have set the Web Role as the startup project, and if you do that you'll find that IIS runs the Web App rather than the Azure Dev Fabric, meaning any Dev Fabric specific stuff (like config settings per role) aren't available causing problems.
What you're meant to do is let the Azure Dev Fabric (Compute Simulator) fire up all your roles for you, and it'll also work out if it needs to open a web browser etc.
So right click on the Azure Cloud project, set that as the Startup Project, and try again.
Hope that helps,
Andy
EDIT thought of something else!
Make sure your web.config is compiling to allow debug="true". If you have added a new WebSite to your solution, it won't be so by default:
<system.web>
<compilation debug="true" targetFramework="4.0" />
I had similar issue which got resolved with following steps.
Make sure you have correct version of .net framework 4.0 is intalled. (.Net Framework 4.0.30319 is the latest version)
Uninstall if there isany other .Net 4.0 framework in present on your system by going to Add And Remove programs.
Go to %windir%\Microsoft.NET\Framework64 physical location and remove unwanted .Net framework 4.0 folder
I've also had this problem and it happened when I upgraded my app to 4.0... I ran without debugging and got the following error:
There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
and after researching that error, I found this:
http://forums.asp.net/t/1571308.aspx/1
which says there's currently a bug w/ vs2010 and 4.0... I took the answers recommendation and commented out the extensions section and it worked for me... Another possible solution.

Resources