Click here to Skip to main content
15,390,740 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

In my aspx page
I wrote code
C#
DataContractJsonSerializer serial = new DataContractJsonSerializer(typeof(CreateDoctorProfileArg));
MemoryStream memory = new MemoryStream();
serial.WriteObject(memory, doctorArgs);
string data = Encoding.UTF8.GetString(memory.ToArray(), 0, (int)memory.Length);

WebClient webClient = new WebClient();
webClient.Headers[HttpRequestHeader.ContentType] = "application/json";
webClient.Encoding = Encoding.UTF8;

webClient.UploadString(url + "/CreateDoctorProfile", "POST", data)


At the end I am getting the following error.
HTML
"The remote server returned an error: (500) Internal Server Error."


Please explain me how to reduce the problem
Posted
v3
Comments
   
Please use Developer Tool to see what is the Data sent and received.
Also check if the Service URL is correct or not.
Jameel VM 7-Jan-14 0:32am
   
I think the inside the service has exception.Please try to debug it.
Nanda Kumar Chintam 7-Jan-14 6:22am
   
Ensure that the WCF service is browsing fine.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900