以下是该服务的 web.config 文件中的设置。
<system.serviceModel>
<services>
<service behaviorConfiguration="Service1Behaviors" name="ITDService.ITDService">
<endpoint address="ITDService" binding="webHttpBinding" contract="ITDService.IITDService" kind="webHttpEndpoint" behaviorConfiguration="webBehavior"/>
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="webBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="Service1Behaviors">
<serviceMetadata httpGetEnabled="true" />
<!--<dataContractSerializer maxItemsInObjectGraph="6553600"/>-->
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<standardEndpoints>
<webHttpEndpoint>
<standardEndpoint helpEnabled="true" automaticFormatSelectionEnabled="true" />
</webHttpEndpoint>
</standardEndpoints>
然后我调用此服务以使用 HttpGetResponse(URL) 获取linkedinconnections。
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(url);
httpWebRequest.ContentType = "application/x-www-form-urlencoded";
HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
Stream responseStream = httpWebResponse.GetResponseStream();
StreamReader streamReader = new StreamReader(responseStream);
string response = streamReader.ReadToEnd();
网址为:
https://127.0.0.1/Services/ITDService.svc/LinkedInConnections/CANDIDATEID/1/Token/598e977e-2e22-4fce-83e7-e59459f3f447/TokenSecret/f859c946-XXXXXXXXXXXXXXX-5b6f42668cf7/Verifier/84251/false
我收到 404 Not found 错误。而且,主要的是我无法调试此服务中的代码,尽管我设置了 includeExceptionDetailInFaults= "true" 。如何调试它?
非常感谢您对此的任何帮助。
谢谢,