0

我正在使用 Intuit.Ipp 访问 QuickBooks 桌面数据。我在本地工作得很好,但是,在将我的代码部署到我们的服务器后,我在尝试实例化 OAuthRequestValidator 时开始收到 TypeLoadException。我相信这可能与我们的服务器配置为使用不允许序列化发生的 MediumTrust 的事实有关。是否已知 OAuthRequestValidator 不支持 MediumTrust?我能做些什么来让它工作吗?

这是一个例外:

    System.TypeLoadException: Inheritance security rules violated while overriding member: 
        'Intuit.Ipp.Exception.IdsException.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)'. 
        Security accessibility of the overriding method must match the security accessibility of the method being overriden.   
        at Intuit.Ipp.Security.OAuthRequestValidator..ctor(String accessToken, String accessTokenSecret, String consumerKey, String consumerSecret)
4

1 回答 1

1

I have a suspicion it has to do with the fact that the XML Serializer requires a temporary directory for it's temporary files, and you can't access it. There's a way to set that directory explicitly, I wonder if you can tinker with that and find one that works. See Safest place for the XmlSerializer to save temp files

于 2013-06-10T18:11:09.880 回答