首页 \ 问答 \ Dynamics CRM 2013 SDK帮助程序代码未编译(Dynamics CRM 2013 SDK helper code not compiling)

Dynamics CRM 2013 SDK帮助程序代码未编译(Dynamics CRM 2013 SDK helper code not compiling)

Dynamics CRM 2013 SDK附带了一些辅助类(不是解决方案,只是.cs文件),它们引用了Microsoft.IdentityModel和System.IdentityModel等其他内容。 有关使用这些类的CRM 2011指南可以在这里找到( http://msdn.microsoft.com/en-us/library/gg328228.aspx ),还没有2013年的指南。 由于两个不同的IdentityModel引用的模糊性,我无法构建.NET 4.5库项目。

在指南1:1之后我得到的第一个错误是“SecurityToken”找不到。 新的CRM 2013类在顶部using System.IdentityModel.Tokens ,因此我添加了对(参见CRM 2011链接)System.IdentityModel的引用。 然后我得到14个这样的错误

'WSTrustChannelFactory' is an ambiguous reference between 'System.ServiceModel.Security.WSTrustChannelFactory' and 'Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannelFactory'

有没有人能够成功构建和使用CRM 2013的帮助程序? 我决定添加最后一个参考错误吗?


The Dynamics CRM 2013 SDK comes with a few helper classes (not a solution, just .cs files) that reference among other things Microsoft.IdentityModel and System.IdentityModel. The CRM 2011 guide for using these classes can be found here (http://msdn.microsoft.com/en-us/library/gg328228.aspx), no guide for 2013 yet. I am unable to build a .NET 4.5 library project because of the ambiguity of the two different IdentityModel references.

The first error I am getting after following the guide 1:1 is "SecurityToken" could not be found. The new CRM 2013 classes have using System.IdentityModel.Tokens at the top, so I add a reference to (not mentioned in CRM 2011 link) System.IdentityModel. Then I get 14 errors like this

'WSTrustChannelFactory' is an ambiguous reference between 'System.ServiceModel.Security.WSTrustChannelFactory' and 'Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannelFactory'

Has anyone been able to successfuly build and use the helpers for CRM 2013? Was my decision to add the last reference wrong?


原文:https://stackoverflow.com/questions/20349072
更新时间:2022-01-26 15:01

最满意答案

Steve,返回“不允许”错误,因为您的登录请求违反了浏览器的同源策略 (实际上它声明所有XhrHttpRequests必须转到最初加载页面的同一域)。

有些浏览器提供了暂时禁用此错误的方法(这可能适用于短期开发目的),但从长远来看,您需要将应用程序托管在与后端服务器相同的域中,或者考虑使用CORSJSONP满足您的要求。


Steve, the "is not allowed" error is returned because your login request violates the browser's same-origin policy (essentially it states that all XhrHttpRequests must go to the same domain the page was initially loaded from).

Some browsers offer ways of disabling this error temporarily (which might be fine for short-term development purposes), but for the long-term you'll either need to host your application in the same domain as your backend server, or look into using CORS or JSONP for your requests.

相关问答

更多
  • 介绍 与jQuery Mobile不同, Sencha Touch (就像App Framework )专门针对移动平台开发,并且高度优化。 jQuery Mobile在台式机和移动设备上的工作方式一样,并且不像Sencha Touch那样进行优化。 这对jQuery Mobile来说并不坏,但这也意味着jQuery Mobile不是移动混合应用程序的最佳解决方案。 Sencha Touch的好方面 它比jQuery Mobile快几倍,如果你有一点google,你可以找到几个benchamark文章。 根 ...
  • 我一直在使用jQuery手机一段时间。 它在黑莓6,iPhone和Android下运行良好。 我在这里写了一篇文章: jQuery mobile alpha 虽然它是阿尔法,但它们显示出良好的进步。 我一直在研究他们在github的发展,似乎在2011年初将会很酷。 更新2011-12-01 jQuery Mobile放弃版本1.0,终于从alpha。 在这里阅读更多: http : //jquerymobile.com/blog/2011/11/16/announcing-jquery-mobile-1- ...
  • 您可以使用Phonegap / Apache Cordova 。 在我们公司,我们使用sencha build来构建我们的sencha应用程序,使用cordova将其打包为原生应用程序,将其安装在设备(iPhone / iPad / Android手机/ Android平板电脑)中然后进行测试。 要开始使用Android,您可以使用此官方入门指南 。 You can use Phonegap/Apache Cordova for that. At our company we use sencha buil ...
  • 主要区别在于PhoneGap是一个不包含内置UI框架的框架。 相反,它只是作为本机API的跨平台包装器,向您展示基于Javascript的API以访问本机功能。 使用PhoneGap,您可以选择使用纯HTML5,或使用UI框架,如Sencha Touch 2本身,jQueryMobile,jQTouch,Kendo UI等。另一方面,Sencha Touch是一个UI框架,但它没有开箱即用的功能,可以为本机功能公开跨平台JavaScript API。 从您的以下声明中,我认为您不打算访问应用程序中的任何本机 ...
  • 根据错误消息很难判断出错误是什么/哪里,但是如果我不得不猜测你错过了某个地方的逗号。 堆栈跟踪说: [INF] Completed compilation. [INF] Processed remote file touch/sencha-touch.js [INF] Processed local file app.js [ERR] C2000: Rhino Parse Error (invalid property id => float: true,) -- unknown-f ...
  • Steve,返回“不允许”错误,因为您的登录请求违反了浏览器的同源策略 (实际上它声明所有XhrHttpRequests必须转到最初加载页面的同一域)。 有些浏览器提供了暂时禁用此错误的方法(这可能适用于短期开发目的),但从长远来看,您需要将应用程序托管在与后端服务器相同的域中,或者考虑使用CORS或JSONP满足您的要求。 Steve, the "is not allowed" error is returned because your login request violates the browse ...
  • 为了实现这一点,您可以使用Ext.Menu并将其安装在左侧或右侧。 对于此功能,您不需要第三方库,它已包含在Sencha Touch中。 http://docs.sencha.com/touch/2.3.0/#!/api/Ext.Menu In order to achieve this you can use Ext.Menu and mount it on the left or right side. You don't need third party library for this featur ...
  • Sencha Touch是Javascript。 它是用JS编写的,图书馆里没有什么魔力。 如果你了解JS,你应该能够理解Sencha Touch。 Sencha Touch和JQuery是解决相同问题的非常不同的方法。 Sencha Touch使用面向对象的编程概念远远超过jQuery。 同样,有些东西非常相似。 在jQuery中工作了很长时间后,在接近其他Javascript库时需要有一个开放的头脑,因为jQuery没有遵循不同的概念。 图书馆也针对不同的“利基”。 我会说Sencha Touch更像是 ...
  • getRandomInt() 是包含math.random的本地函数。 你应该创建该功能。 getRandomInt() Is a local function which contains the math.random. You should create that function.
  • 我从你的问题中理解的是你想用webworkers来呈现UI,对吗? 我认为这是不可能的,因为网络工作者的范围非常有限。 以下是webworkers可以访问的内容列表: 导航器对象 位置对象(只读) XMLHttpRequest的 setTimeout()/ clearTimeout()和setInterval()/ clearInterval() 应用程序缓存 使用importScripts()方法导入外部脚本 产卵其他网络工作者 这是webworkers无法访问的内容列表: DOM(它不是线程安全的) 窗 ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。