2

Using Visual Studio 2012, I created a simple Windows Azure Project (Cloud project) for which contains a ASP.NET MVC 4 website. I didn't change anything to the template and I simply try to deploy it using Azure Website. I imported the "publishing profile" from Windows Azure Dashboard into my project and deployed (using Visual Studio).

At the very end of the deployment process I am getting the following message: "failed to open 'http://mysite.azurewebsite.net'. Exception:Class not registered". I can only click "Ok" on that dialog. Any idea why I am seeing this message?

When I look at the Output Window, I see that the deployment succedded. I go the a Web API url and I am getting "No HTTP resource was found that matches the request URI 'http://mysite.azurewebsites.net/api/values'". What puzzle me is that I can access that same url on my local environment.

What am I missing? Thanks!

Martin
  • 39,309
  • 62
  • 192
  • 278
  • I'm getting this exact same error publishing a WebForms project from VS 2012 to an Azure web app. However, it *is* publishing my changes. Wierdly, it's only happening on one machine - if I publish from another machine, identical solution, identical publish settings - no error. Might be worth confirming your changes have actually been published (use FTP if necessary) and if they are, perhaps it's nothing to worry about ? – sh1rts Apr 08 '15 at 00:15

3 Answers3

0

I could access using my Azure website using ASP.NET Web API. If you use default MVC4 Web API template, please access "http://[yoursite].azurewebsites.net/api/Values/".

My Environment is below. - Visual Studio 2012 - ASP.NET MVC4

normalian
  • 55
  • 3
  • That's exactly what I did an I get that message: "failed to open 'http://mysite.azurewebsite.net'. Exception:Class not registered". – Martin Dec 03 '12 at 18:16
  • Yeah, having the same issue with Web Api app deployed to AWS. On local machine and cloud service web role it works fine though. – Grief Coder Jun 18 '13 at 10:42
0

You don't need to create a cloud project to use Azure Websites. You can simply create an MVC app and then use git deploy or even FTP to push the site to Azure

levelnis
  • 7,665
  • 6
  • 37
  • 61
  • I just tried to create a project without Azure. I went through the publish dialog and I get the same error: "failed to open 'http://mysite.azurewebsite.net'. Exception:Class not registered". This was a brand new project with nothing modified except the deployment information. – Martin Dec 03 '12 at 18:16
  • Do you use Git for source control? If you don't I would recommend it. Either way, if you create a BitBucket account you can host a private git repository there. Once that's set up you can enable git deploy on your azure website and then configure Azure to watch your BitBucket repository for changes and automatically deploy them. Enable git deployment from the dashboard and BitBucket integration from the deployment tab. You may find that easier than using the publish service within visual studio. For starters it takes about 20 seconds to deploy... – levelnis Dec 03 '12 at 22:16
0

Make sure that you referenced the latest version of WindowsAzure related assemblies in your project.

Microsoft.WindowsAzure.Diagnostics 2.0 (and not 1.8)
Microsoft.WindowsAzure.ServiceRuntime 2.0 (and not 1.8)
Grief Coder
  • 6,508
  • 9
  • 38
  • 51