Mentre si chiama un servizio Web ospitato in un server da una pagina di aspx viene visualizzato l'errore "Richiesta non riuscita con una risposta vuota"."Richiesta non riuscita con risposta vuota" quando si chiama un servizio Web
codicenella mia pagina
try {
HttpWebRequest request1 = (HttpWebRequest)WebRequest.Create("https://login.erp.com/rodeprovisioning/provisioning.asmx");
request1.Accept = "text/xml";
request1.Method = "POST";
WebProxy proxyObject = new System.Net.WebProxy("http://10.0.0.1:8080/", true);
request1.Proxy.Credentials = CredentialCache.DefaultCredentials;
string sReturnValue = null;
if (string.IsNullOrEmpty(Session["Test"])) {
sReturnValue = callservice();
if (sReturnValue == "Success") {
ErrorLabel.Text = sReturnValue;
Session["Test"] = "True";
} else {
ErrorLabel.Text = sReturnValue;
}
}
} catch (Exception ex) {
}
e nel web.config
<system.net>
<authenticationModules>
<add type = "System.Net.DigestClient" />
<add type = "System.Net.NegotiateClient" />
<add type = "System.Net.KerberosClient" />
<add type = "System.Net.NtlmClient" />
<add type = "System.Net.BasicClient" />
</authenticationModules>
<connectionManagement>
<add address = "*" maxconnection = "2" />
</connectionManagement>
<defaultProxy>
<proxy usesystemdefault="True" bypassonlocal = "True" />
</defaultProxy>
<webRequestModules>
<add prefix = "http" type = "System.Net.HttpRequestCreator" />
<add prefix = "https" type = "System.Net.HttpRequestCreator" />
<add prefix = "file" type = "System.Net.FileWebRequestCreator" />
</webRequestModules>
</system.net>
E 'un firewall problem.Any suggerimento?
Hai provato a utilizzare Wireshark per scoprire cosa sta accadendo a livello HTTP? –
No jon non ho ... – bala3569
Quindi suggerisco che dovrebbe essere il tuo prossimo passo. Non ha senso provare a eseguire il debug del client se si tratta di un problema lato server o viceversa. –