Server Error in '/' Application.

You must provide a request body if you set ContentLength>0 or SendChunked==true.  Do this by calling [Begin]GetRequestStream before [Begin]GetResponse.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.ProtocolViolationException: You must provide a request body if you set ContentLength>0 or SendChunked==true.  Do this by calling [Begin]GetRequestStream before [Begin]GetResponse.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[ProtocolViolationException: You must provide a request body if you set ContentLength>0 or SendChunked==true.  Do this by calling [Begin]GetRequestStream before [Begin]GetResponse.]
   System.Net.HttpWebRequest.GetResponse() +1150
   VacationHiltonHead.RM4Service.ApiCall(String function, String parameters) in H:\Development\www.vacationhiltonhead.com\RM4Classes\RM4Service.cs:253
   VacationHiltonHead.RM4Service.UnitSearch(Dictionary`2 parameters) in H:\Development\www.vacationhiltonhead.com\RM4Classes\RM4Service.cs:82
   VacationHiltonHead.Search_Results.DoSearch(String sortBy) in H:\Development\www.vacationhiltonhead.com\Search-Results.aspx.cs:139
   VacationHiltonHead.Search_Results.Page_Load(Object sender, EventArgs e) in H:\Development\www.vacationhiltonhead.com\Search-Results.aspx.cs:66
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4076.0