There was an error attaching the debugger to the IIS worker process - azure

I am new to Azure. I am trying to start my application in VS2012 (debugging). I am getting the error below:
There was an error attaching the debugger to the IIS worker process for URL 'http://learning.cloudapp.net:82' for role instance 'deployment18(13)......'. Unable to start debugging on the web server. The underlying connection was closed: An unexpected error occurred on a receive.
My application is working fine when I hosted it in IIS. It worked fine when I set the website project as the start up project. But when I set the azure project as start up project and start debugging I am getting the error. I have tried almost everything I could find on the internet. Can anyone please help?
Thanks,
Mahesh

One time I got this by loading an older Azure solution on a newer machine, another time after I upgraded to Azure SDK 2.0.
I was using IIS Express instead of regular IIS.
Each time the only thing that fixed was:
Install Azure SDK 2 via Web Platform Installer
Install Azure Powershell tools via Web Platform Installer
Create a new Azure Project -- do not use your old azure cloud project. Do not try to get it to work-- start fresh.
Foreach web/worker role that you use to have in your previous azure projects, create new web/worker roles for those as well. Do not try to get the old ones to work-- start fresh. Copy the content/files from your old ones into the new projects.
So basically, install the latest tools and then create new assemblies/packages/projects to replace the old ones.

Related

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.

Lightswitch IIS 7.5 Deployment - GetAuthenticationInfo

I am having an absolute nightmare with the "Load operation failed for query 'GetAuthenticationInfo'. [HttpWebRequest_WebException_RemoteServer]" error when deploying my applications to a new server.
The apps I have are working and have been running for a while on another server. I have now got to move them to a new one, and I cannot get anything to work!
I have been through all of the posts on this error and have tried almost everything to get this deployment working.
Old Server: Win 2008 R2
New Server: Win 2008 R2
At first I thought it had something to do with Devexpress Xtra reports but I have disproved that by creating a bare bones app with one screen and one table and no extentions. And it still fails. I have also tried this with every combination of authentication. I have also deployed this test app to the old server and it all works fine, so I am sure there must be something wrong with my IIS settings. Visual studio is publishing the app with no errors. I only get it on runtime. I have tried to use fiddler to get a clue as to what is going on but I cant find anything useful.
I have also tried:
• removing and adding the web server role on the new server to try and reset configurations.
• Deploying several known working LS applications
• Every combination of Authentication on the IIS server for the app, website and server level
• Tried syncing the IIS configuration with the old server using MSdeploy.exe cmd line
• Repairing the .NET Framework 4 Client prile & extended
• restarting the server
• Installing updates
• re installing web deploy
• Made sure the application pool was .net v4
• made sure the application pool was integrated
• changed the authentication on app pool user to a domain account with known admin rights to the server (and have now put back to apppool identity)
• Creating a new website and deploying the app into there
• restarting web services
• Installing Lightswitch 2012 Server pre-requisites
None of these have worked at all.
The only way I can get my deployed application to load into a screen is to buid as a web type and change the url from
http://server/otm
to
http://server/otm/default.htm?IsLaunchedByVS=True&AuthenticationType=None
Something which I think it could be related to is a faulty installation of "Lightswitch Server Configuration" which installed using the Web Platform Installer 4.5
This however is not showing in the Add/Remove programs list, so I cannot uninstall it to see if it is messing things up. I cant seem to uninstall it from the WPI and i also cant find a direct download link from Microsoft.
I am completley out of ideas and in big trouble as these are production applications and the old serve will be shut down within the next two weeks. Any help would be appreciated!
.net framework 4.5 try running the app on .net framework 4 I had the issue and spent 40 hours on it .net 4 framework works

Debugging Azure: window popup says The web browser can not be started

I have a web application asp.net to deploy to Windows Azure. This application contains one web role. I try to run it on local first. But when debugging, I catch this error from VS2010: "Window Azure Tools for Microsoft Visual Studio
The Web Browser can not be started. To resolve this problem, you must restart Windows."
I have restarted windows several times, but there was no luck.![enter image description here][1]
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. Please help me! Thanks a lot. Best Regards.
There could be two problems:
Problem with your IIS settings: It is possible that there is a problem with your IIS in your machine which could not be restarted when VS2010, wants to run it.
To verify it what you can do it launch your Web Role using "View in Browser" setting and see if your Web Role can run in IIS, you will see the web role started in a URL as http:\localhost:XXXXX and that would be the first step to resolved.
Problem will your Windows Azure SDK which could not launch the WebBrowser to run in IIS
If you don't have problem in this step #1, then it is possible that Windows Azure SDK has some problem trying to start your IIS from external process and this could be caused by corrupted SDK installation or any other reason.
If that is the case try:
remove all Windows Azure SDK components from your machine.
Restart the machine, Install Azure SDK from here for VS2010
After SDK install, restart the VS2010 in admin mode and try created a hello world webrole and see what happens.

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