我做了一个简单的程序,一个asp.net网站中,我增加了一个web服务IIS CRM 2011 Web服务调用的问题,
其中一个Web方法访问的CRM`
[WebMethod]
public bool RecordExists (String projectName)
{
var service = GetService("http://localhost/EventoCorp/");
Entity project = new Entity("new_project");
/*PROJECT DETAILS*/
project.Attributes["new_name"] = projectName;
var request = new RetrieveDuplicatesRequest
{
BusinessEntity = project,
MatchingEntityName = "new_project",
PagingInfo = new PagingInfo() { PageNumber = 1, Count = 50 }
};
Console.WriteLine("Retrieving duplicates");
var response = service.Execute(request);
EntityCollection collection = (EntityCollection)response.Results["DuplicateCollection"];
return collection.Entities.Count > 1 ? true : false;
}
当我按下F5。该项目运行良好。我调用这个记录存在的方法,它正确地从CRM 2011带来的数据然而,当我在IIS 7.5上部署此应用程序时。
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
我是一个CRM 2011小白:我得到这个可怕的无信息例外
System.ServiceModel.FaultException: 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.0 SDK documentation and inspect the server trace logs.
服务器堆栈跟踪迎接。不知道发生了什么事。请帮助我
您可以在Web.config文件中启用'IncludeExceptionDetailInFaults',然后在浏览器中打开您的服务应用程序?这将显示确切的错误并澄清问题。或者您可以在事件查看器中查看异常详细信息。 – amartine