如何禁用CRM 2011 Xrm缓存? [英] How to disable CRM 2011 Xrm caching?

查看:121
本文介绍了如何禁用CRM 2011 Xrm缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对crm 2011缓存有问题.我不需要它,但我不知道如何禁用它.

I have problem with crm 2011 caching. I don't need it, but I don't know how to disable it.

首先,我生成了这个:

CrmSvcUtil.exe /codeCustomization:Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration"/out:Outputcs /url:https://crmaddress/XRMServices/2011/Organization.svc /用户名:usr/密码:pw /namespace:ns/serviceContextName:XrmServiceContext

CrmSvcUtil.exe /codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration" /out:Outputcs /url:https://crmaddress/XRMServices/2011/Organization.svc /username:usr/password:pw /namespace:ns/serviceContextName:XrmServiceContext

然后我有以下代码:

   private XrmServiceContext _crmService;

    public CrmWS()
    {
        CrmConnection _connection = new CrmConnection();
        _connection.ServiceUri = new Uri("https://url");

        ClientCredentials credentials = new ClientCredentials();
        credentials.Windows.ClientCredential = new NetworkCredential("1","2","3"); 
        _connection.ClientCredentials = credentials;
        _connection.ClientCredentials.UserName.UserName = "1";
        _connection.ClientCredentials.UserName.Password = "2";
        _crmService = new XrmServiceContext(_connection);

       var l = _crmService.EntitySet.where(m => m.name == "a").ToList();
    }

我该怎么做才能关闭缓存?

What should I do to turn off caching?

推荐答案

在配置文件中指定服务:

Specify the service in your configuration file:

  <microsoft.xrm.client>   
    <services>
      <add name="Xrm" type="Microsoft.Xrm.Client.Services.OrganizationService, Microsoft.Xrm.Client"/>
    </services>
  </microsoft.xrm.client>

这篇关于如何禁用CRM 2011 Xrm缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆