C# 在ASP.NET4.0 Web服务中调用ASP1.1 Web方法获取错误
下面是我想从SQL作业(存储过程)调用ASP1.1 web方法的场景 但我得到了内部服务器错误(500)。 但是它成功地调用了ASP.NET4.0URL(调用webservice) 所以现在我从ASP.NEt4.0Web服务调用1.1Web方法 ASP.NET4.0C# 在ASP.NET4.0 Web服务中调用ASP1.1 Web方法获取错误,c#,asp.net,vb.net,web-services,C#,Asp.net,Vb.net,Web Services,下面是我想从SQL作业(存储过程)调用ASP1.1 web方法的场景 但我得到了内部服务器错误(500)。 但是它成功地调用了ASP.NET4.0URL(调用webservice) 所以现在我从ASP.NEt4.0Web服务调用1.1Web方法 ASP.NET4.0 [WebMethod] public void CALLEV() { EVAutoService.POSEVAutomation wsEVAuto = new EVAutoS
[WebMethod]
public void CALLEV()
{
EVAutoService.POSEVAutomation wsEVAuto = new EVAutoService.POSEVAutomation();
wsEVAuto.AutomateEVForTodaySchPatient();
}
ASP1.1 WEB方法代码
<WebMethod(EnableSession:=True)> _
Public Function AutomateEVForTodaySchPatient()
CheckPhySchPatEV(getStaffId())
End Function
我还使用ASP.NET4.0 webservice中的webrequest来调用1.1 web方法
WebRequest request = HttpWebRequest.Create(GetHWServiceURL());
using (WebResponse response = request.GetResponse())
{
using (StreamReader reader = new StreamReader(response.GetResponseStream()))
{
string urlText = reader.ReadToEnd();
//Do whatever you need to do
}
}
但它不起作用,只是得到了Net.WebException
System.Net.WebException: The remote server returned an error: (500) Internal Server Error. at System.Net.HttpWebRequest.GetResponse() at
我怀疑这是由于某些安全异常造成的,因为两个usel都在同一台服务器上,但都是本地主机上的独立项目。I ahev已经添加了两个项目的web配置,这应该是一个数据错误。这意味着您在请求消息中提供了一些错误的输入数据,这就是服务器无法生成响应的原因。要知道确切的字段错误,请在客户端捕获异常或参考服务器日志。@user309009没错。我怀疑我现在已经修好了,它工作正常。
System.Net.WebException: The remote server returned an error: (500) Internal Server Error. at System.Net.HttpWebRequest.GetResponse() at