如何在Azure上设置breeze,检查breezecontroller是否正在运行

时间:2014-03-23 21:46:29

标签: azure breeze

我正在使用带有微风和EF6的hottowel角。在我的本地机器上,它在dev和release中工作正常。我已经配置并部署到Azure网站,它启动但在第一个查询中我在chrome中得到以下错误

获取... cloudapp.net/breeze/Breeze/Metadata 500(内部服务器错误)angular.js:7997 ReferenceError:未定义config     在_queryFailed .... cloudapp.net/app/services/datacontext.js:51:23)     在wrappedErrback(.... cloudapp.net/scripts/angular.js:10958:78)

请求是正确的,网站/ breeze / Breeze / MetaData意味着至少BreezeWebApiConfig.cs正在加载,我在浏览器中手动输入了http,我仍然得到500错误。如何检查breezecontroller是否运行?

1 个答案:

答案 0 :(得分:0)

好的我做了一个调试版本并再次运行网站,在IE中我看到了以下的栈跟踪,它告诉我EF无法设置。问题是必须将EF添加到Web应用程序中,即使它是使用EF实际连接到数据库的dataaccess项目(在我的情况下)。所以我这样做了,问题解决了,现在我有一个超时问题,连接到数据库但是向上和向上。

{" $ id":" 1"," $ type":" System.Web.Http.HttpError,System.Web.Http& #34;,"消息":"发生错误。"," ExceptionMessage":"调用目标抛出了异常"" ExceptionType":" System.Reflection.TargetInvocationException""堆栈跟踪":"在System.Web.Http.ApiController.d_ 1.MoveNext()\ r \ n ---从抛出异常的上一个位置开始的堆栈跟踪结束---在System.Runtime.CompilerServices上的\ r \ n。 SystemAweiter.ThrowForNonSuccess(任务任务)\ r \ n在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)\ r \ n在System.Web.Http.Dispatcher.HttpControllerDispatcher.d _0.MoveNext() ""的InnerException" {" $ ID":" 2"" $类型":"系统。 Web.Http.HttpError,System.Web.Http"," Message":"发生错误。"," ExceptionMessage":&#34 ;实体框架提供程序类型' System.Data.Entity.SqlServer.SqlProviderServices,EntityFramework.SqlServer'在具有不变名称&System; System.SData.SqlClient&无法加载。确保使用了程序集限定名称,并且程序集可供正在运行的应用程序使用。有关详细信息,请参阅http://go.microsoft.com/fwlink/?LinkId=260882。"," ExceptionType":" System.InvalidOperationException"," StackTrace":"在System.Data.Entity.Infrastructure.DependencyResolution.ProviderServicesFactory.GetInstance(String providerTypeName,String providerInvariantName)\ r \ n在System.Data.Entity.Internal.AppConfig。< .ctor> b_ 2(ProviderElement e) \ r \ n在System.Linq.Enumerable.WhereSelectEnumerableIterator 2.MoveNext()\r\n at System.Collections.Generic.List 1..ctor(IEnumerable 1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable 1 source)\ r \ n在System.Data.Entity.Internal.AppConfig。< .ctor&gt ; b _1()\ r \ n在System.Lazy 1.CreateValue()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Data.Entity.Internal.AppConfig.get_DbProviderServices()\r\n at System.Data.Entity.Infrastructure.DependencyResolution.AppConfigDependencyResolver.RegisterDbProviderServices()\r\n at System.Data.Entity.Infrastructure.DependencyResolution.AppConfigDependencyResolver.GetServiceFactory(Type type, String name)\r\n at System.Collections.Concurrent.ConcurrentDictionary 2.GetOrAdd(TKey键,Func 2 valueFactory)\r\n at System.Data.Entity.Infrastructure.DependencyResolution.AppConfigDependencyResolver.GetService(Type type, Object key)\r\n at System.Linq.Enumerable.WhereSelectArrayIterator 2.MoveNext()\ r \ n在System.Linq.Enumerable .FirstOrDefault [TSource](IEnumerable 1 source, Func 2谓词)\ r \ n在System.Data.Entity.Infrastructure.DependencyResolution.CompositeResolver`2.GetService(Type type,Object key)\ r \ n在System.Data .Entity.Infrastructure.DependencyResolution.DbDependencyResolverExtensions.GetService [T](IDbDependencyResolver解析器)\ r \ n在System.Data.Entity.DbContext.InitializeLazyInternalContext(IInternalConnection internalConnection,DbCompiledModel model)\ r \ n at KC.Data.Context .. ctor中的ctor():用户\ gramm ie \ Source \ Repos \ kcsec \ KCData \ Context.cs:第52行"}}