【问题标题】:Getting error while hosting WCF service when add <trust level="Full" />添加 <trust level="Full" /> 时托管 WCF 服务时出错
【发布时间】:2016-08-04 05:40:12
【问题描述】:

我正在尝试在“hostgator”中托管 WCF 服务。我想设置信任级别,因为我收到安全权限错误。

当我在web.config 中设置Trust Level 时,出现错误。

web.config:

<location allowOverride="true">
    <system.web>
        <compilation debug="true" targetFramework="4.5.2"/>
        <identity impersonate="false" />
        <authentication mode="None" />
        <httpRuntime maxUrlLength="1024" relaxedUrlToFileSystemMapping="true"/>

        <customErrors mode="Off"></customErrors>
        <securityPolicy>
            <trustLevel name="Full" policyFile="internal"/>
        </securityPolicy>
    </system.web>
</location> 

错误:

服务器上出现应用程序错误。当前的自定义错误 此应用程序的设置会阻止应用程序的详细信息 远程查看错误(出于安全原因)。它可能, 但是,可以通过在本地服务器计算机上运行的浏览器查看。

谁能提出解决这个问题的方法?

enter image description here

【问题讨论】:

    标签: c# wcf dynamics-crm


    【解决方案1】:

    根据HostGator FAQ,您必须使用他们的共享主机以部分信任的方式运行:

    没有。应用程序必须在 Medium Trust 中发布才能运行 在 Windows 共享服务器上。

    根据我所阅读的内容,您将无法在中等信任环境中使用 SDK。随着 Dynamics CRM 2016 扩展其对 REST API 的支持,这可能会成为您的一种选择。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-14
      • 2011-05-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多