I have a webservice and I am getting the following error only from production server when I am trying to make a post call. It works well on development server!
500 (Internal Server Error)
Here are the headers from web service
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
[System.Web.Script.Services.ScriptService]
public class Getavailability : System.Web.Services.WebService {
.
.
}
and here is the client side code
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: 'WebServices/ServiceName.asmx/Method',
data: "{" +
"'fromDate': 'data'," +
"'fromTime': 'data'," +
"'toDate': 'data'," +
"'toTime': 'data'," +
"'flyingFrom': 'data'" +
"}",
cache: false,
success: function (data) {
//do something
}
});
The server has an iis6 and .net 4
Does anyone know what could cause this?
I'll appreciate any comment
Thanks
EDIT
this is the whole message
{"Message":"Unable to connect to the remote server","StackTrace":"
atSystem.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at BLL.AbstractXML.GetXmlSR(String strURL, String queryStr)
at AvailabilityRQ.Get(DateTime fromDate, DateTime fromTime, DateTime toDate, DateTime toTime, String flyingFrom)
at Web.WebServices.Getavailability.Get(String fromDate, String fromTime, String toDate, String toTime, String flyingFrom)","ExceptionType":"System.Net.WebException"}