none
【求助】MSCRM 2011中自定义web service的运行异常问题 RRS feed

  • 问题

  • 大家好,

    我自己编写了一个自定义的Web Service用来执行一些用户的需求,自定义的web service中有用到crm web service的create方法来创建一条新记录,我用的是管理员的权限来验证的,发现有异常发生,不能创建对应的新纪录,我想知道是不是mscrm2011对自定义的web service有什么限制。希望能够得到大家的帮助,先谢谢大家了。

     


    crm4.0学步

    2011年11月6日 21:26

全部回复

  • 用来什么环境?plugin?isv?

    最好贴下代码,报错信息是什么

     


    微软CRM
    2011年11月7日 2:39
    版主
  • 异常的内容是什么?
    daemon lin
    2011年11月7日 5:47
  • 你好,是自己编写了一个web service, 报错信息是:

     

    The server was unable to process the request due to an internal error.  For more information about the error, either turn on
     IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> 
    configuration behavior) on the server in order to send the exception information back to the client, 
    or turn on tracing as per the Microsoft .NET Framework 3.5 SDK documentation and inspect the server trace logs.
    

     

       public class ContratsWs : System.Web.Services.WebService
        {
    
            [WebMethod]
            public void PutContratToCrm(string type, string nucontrat, int aliment)
            {
                ContratServices.Instance.ContratToCrm(type, nucontrat, aliment);
            }
            [WebMethod]
            public void PutAllContratToCrm()
            {
                ContratServices.Instance.ContratsToCrm();
            }
        }
    }


    crm4.0学步
    2011年11月7日 10:09
  • 用来什么环境?plugin?isv?

    最好贴下代码,报错信息是什么

     


    微软CRM


    我今天用web application又测试了一下,发现也是一样的报错信息,代码如下,

    Entity testAccount=new Entity("account");

    testAccount.Attribute["name"]="test info";

    service.create(testAccount);

    希望能够得到大家的帮助,先谢谢大家了。

    异常报错:

    The server was unable to process the request due to an internal error.  For more information about the error, either turn on
     IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> 
    configuration behavior) on the server in order to send the exception information back to the client, 
    or turn on tracing as per the Microsoft .NET Framework 3.5 SDK documentation and inspect the server trace logs.
    

    crm4.0学步
    2011年11月7日 23:19
  • what is the internal error info?

    具体的错误信息是什么?是否是OrganizationServiceFault?


    daemon lin
    2011年11月8日 9:47
  • what is the internal error info?

    具体的错误信息是什么?是否是OrganizationServiceFault?


    daemon lin
    你好,先谢谢了,目前我遇到的问题就是我不知道如何才能看到 the internal error info,即使我激活了IncludeExceptionDetailInFaults=true, 我还是得到一样的报错信息,我觉得可能是由于crm的IOrganization Service(WCF)由于安全问题禁用了IncludeExceptionDetailInFaults,所以我还看不到具体的 the internal error info。
    crm4.0学步
    2011年11月8日 20:51
  • 我也在自己写一个服务,使用WCF Data Service。没有看到LZ的错误。

    可以加入wcf trace来看看是出了什么问题。

    2011年11月9日 2:28