웹 서비스를 테스트하는 진단 도구가 있습니다.WebClient 오류를 문자열로 가져 오기
문제점이있을 때 도구가보고되기를 원합니다. 따라서 테스트를 위해 계약서에 문제가있는 서비스를 배치했습니다.
An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.InvalidOperationException: An exception was thrown in a call to a WSDL export extension:
System.ServiceModel.Description.DataContractSerializerOperationBehavior contract: DataContract for type XXX cannot be added to DataContractSet since type XXX with the same data contract name XXX in namespace XXX is already present and the contracts are not equivalent etc..
내가 원하는 것은 전화를 할 수있다 :
myErrorMsg = WebClient.DownloadString("MyBadService.svc");
을하고이 유용한 오류 나는 그것을 탐색 할 때
나는 매우 설명과 같은 메시지가있는 페이지를 얻을 수 저도 같은 오류 혼란을 얻을 수있는 방법
The remote server returned an error: (500) Internal Server Error.
: 문자열로 메시지가 그러나 나는 다음 WebException이를 얻을 수 브라우저에서받은 나이가 예외없이 문자열로 반환 되었습니까?
감사합니다.
500 오류는 웹 사이트가 예기치 않게 종료되었음을 의미합니다. – Zenwalker