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
最满意答案
Steve,返回“不允许”错误,因为您的登录请求违反了浏览器的同源策略 (实际上它声明所有XhrHttpRequests必须转到最初加载页面的同一域)。
有些浏览器提供了暂时禁用此错误的方法(这可能适用于短期开发目的),但从长远来看,您需要将应用程序托管在与后端服务器相同的域中,或者考虑使用CORS或JSONP满足您的要求。
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- ...
-
测试Sencha触控应用程序(Testing Sencha touch apps)[2023-05-13]
您可以使用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 ... -
Sencha Touch 2 Vs.(Sencha Touch 2 Vs. Phonegap)[2024-01-24]
主要区别在于PhoneGap是一个不包含内置UI框架的框架。 相反,它只是作为本机API的跨平台包装器,向您展示基于Javascript的API以访问本机功能。 使用PhoneGap,您可以选择使用纯HTML5,或使用UI框架,如Sencha Touch 2本身,jQueryMobile,jQTouch,Kendo UI等。另一方面,Sencha Touch是一个UI框架,但它没有开箱即用的功能,可以为本机功能公开跨平台JavaScript API。 从您的以下声明中,我认为您不打算访问应用程序中的任何本机 ... -
压缩Sencha Touch App(Compressing Sencha Touch App)[2023-11-19]
根据错误消息很难判断出错误是什么/哪里,但是如果我不得不猜测你错过了某个地方的逗号。 堆栈跟踪说: [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语法(Understand Sencha Touch syntax)[2022-08-16]
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(它不是线程安全的) 窗 ...