WCF数据服务引发“操作可能破坏运行时的稳定性”异常

爪子

我的目标是通过IIS将SQL Server 2008表公开为XML / JSON。

我跟随了几(1)个 视频(2)来站立WCF Data Services Web应用程序,并且$ metadata页面工作时,尝试查看实际数据会导致异常:

Operation could destabilize the runtime.
System.Security.VerificationException

屏幕截图

我从带有.NET 4.5.1和Entity Framework 6.1.2的VS2013模板开始-下面是更具体的软件包版本。

如果NuGet程序包引起了VerificationException,我是否应该尝试删除所有NuGet程序包,并仅添加EntityFramework(以及所依赖的对象)?

感谢任何想法,谢谢大家!

Id                             Version              Description/Release Notes                                                                                              
--                             -------              -------------------------                                                                                              
Antlr                          3.5.0.2              ANother Tool for Language Recognition, is a language tool that provides a framework for constructing recognizers, in...
bootstrap                      3.3.2                Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.                 
EntityFramework                6.1.2                Entity Framework is Microsoft's recommended data access technology for new applications.                               
jQuery                         2.1.3                jQuery is a new kind of JavaScript Library....                                                                         
jQuery.Validation              1.13.1               This jQuery plugin makes simple clientside form validation trivial, while offering lots of option for customization....
Microsoft.AspNet.Mvc           5.2.3                This package contains the runtime assemblies for ASP.NET MVC. ASP.NET MVC gives you a powerful, patterns-based way t...
Microsoft.AspNet.Razor         3.2.3                This package contains the runtime assemblies for ASP.NET Web Pages. ASP.NET Web Pages and the new Razor syntax provi...
Microsoft.AspNet.Web.Optimi... 1.1.3                ASP.NET Optimization introduces a way to bundle and optimize CSS and JavaScript files.                                 
Microsoft.AspNet.WebPages      3.2.3                This package contains core runtime assemblies shared between ASP.NET MVC and ASP.NET Web Pages.                        
Microsoft.Data.Edm             5.6.3                Classes to represent, construct, parse, serialize and validate entity data models. Targets .NET 4.0, Silverlight 4. ...
Microsoft.Data.OData           5.6.3                Classes to serialize, deserialize and validate OData payloads. Enables construction of OData producers and consumers...
Microsoft.Data.Services        5.6.3                Fully-featured server API for responding to OData queries and consuming/producing OData payloads. Supports OData v3....
Microsoft.Data.Services.Client 5.6.3                LINQ-enabled client API for issuing OData queries and consuming OData payloads. Supports OData v3. Targets .NET 4.0,...
Microsoft.jQuery.Unobtrusiv... 3.2.3                jQuery plugin that unobtrusively sets up jQuery.Validation.                                                            
Microsoft.Web.Infrastructure   1.0.0.0              This package contains the Microsoft.Web.Infrastructure assembly that lets you dynamically register HTTP modules at r...
Modernizr                      2.8.3                Modernizr adds classes to the <html> element which allow you to target specific browser functionality in your styles...
Newtonsoft.Json                6.0.8                Json.NET is a popular high-performance JSON framework for .NET                                                         
Respond                        1.4.2                The goal of this script is to provide a fast and lightweight (3kb minified / 1kb gzipped) script to enable responsiv...
System.Spatial                 5.6.3                Contains classes and methods that facilitate geography and geometry spatial operations. Targets .NET 4.0, Silverligh...
WebGrease                      1.6.0                Web Grease is a suite of tools for optimizing javascript, css files and images.                                        
马可·莫罗西尼(Marco Morosini)

我安装了相同的程序包并安装了该更新,但是出现了相同的错误。我已经解决了这种方式:

1.按照该页面上的指南安装最新的Nuget程序包Microsoft.OData.EntityFrameworkProvider;

2.用EntityFrameworkDataService替换DataService,例如在WcfDataService1.svc中:

公共类WcfDataService1:EntityFrameworkDataService

但是我不知道这是否是最好的选择,因为某些ms教程没有讲任何关于EntityFrameworkDataService的信息。

其他人则这样做:http : //blogs.msdn.com/b/odatateam/archive/2013/10/02/using-wcf-data-services-5-6-0-with-entity-framework-6.aspx

http://blogs.msdn.com/b/odatateam/archive/2014/08/18/wcf-data-services-entity-framework-provider-is-updated-with-wcf-data-service-5-6- 2.aspx

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

WCF OData Service存储过程调用使用$ select选项生成“操作可能破坏运行时的稳定性”错误

Structuremap导致StructerMapConfigurationException(“ Operation可能破坏运行时的稳定性”)仅在某些计算机上

Petapoco:操作可能会破坏运行时间

操作可能会破坏StructureMap中的运行时

IDE的Java运行时(1.8u111)已过时-这可能会导致稳定性问题。在Ubuntu 16.10中打开PhpStorm时,请更新至1.8.0u112或更高版本

读取JSON数据会引发运行时异常

WCF数据服务

无法在(WCF数据服务)中创建简单的服务操作

发射操作可能会破坏用于增加字段的运行时间

是否可以通过AppEngine Standard访问Google Cloud元数据服务以进行运行时配置?

在 Java 中分配空引用时是否可能引发运行时异常?

WCF数据服务的VerificationException

消费WCF数据服务

就长期稳定性而言,与Tomcat,Apache相比,去网络服务器的性能稳定性如何?

Ubuntu LTS稳定性

MergeSort实施稳定性

火炬预测稳定性

Quicksort稳定性演示

Composer引发错误“找不到稳定性稳定的程序包”。

在Closable.close()中引发运行时异常

Path变量的分配内存引发运行时异常

WCF服务在本地运行时始终返回发现页面

演示Springboot应用程序连接到Postgres数据库引发运行时嵌套异常

大型查询的WCF数据服务超时

Wcf数据服务客户端

WCF数据服务中的重复动作

异步WCF数据服务/ OData

格式错误的请求(WCF数据服务)

模糊排序算法合并稳定性