ASP.NET MVC 4和Azure的网络API - 没有HTTP资源被发现 [英] ASP.NET MVC 4 and Web API in Azure - No HTTP resource was found

查看:191
本文介绍了ASP.NET MVC 4和Azure的网络API - 没有HTTP资源被发现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Visual Studio 2012年,我创建了一个简单的Windows Azure项目(云项目),为其中包含了ASP.NET MVC 4的网站。我什么也没有改变的模板,我只是尝试使用的天青网站。我从进口的Windows Azure仪表板中的发布配置文件到我的项目和部署(使用Visual Studio)。

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).

在部署过程中我收到以下消息的末尾:无法打开http://mysite.azurewebsite.net'例外:类没有注册。我只能点击确定的对话框。任何想法,为什么我看到这条消息?

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?

当我看输出窗口,我看到部署succedded。我去了一个Web API URL和我得到没有HTTP资源发现,请求URIhttp://mysite.azurewebsites.net/api/values​​匹配。什么困扰我的是,我可以访问我的本地环境的同一网址。

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.

我在想什么?谢谢!

推荐答案

请确保您在您的项目中引用了最新版本的WindowsAzure相关组件。

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)

这篇关于ASP.NET MVC 4和Azure的网络API - 没有HTTP资源被发现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆