Server Error in '/' Application.

___2System.Net.WebException: The remote server returned an error: (400) Bad Request.
  at System.Net.HttpWebRequest.GetResponse()
  at DrWhyWebIT.classiDiSupporto.DRGateway.sendAndReceive[T](String token, String classpath, String method, Dictionary`2 parametri, String domain) in e:\progetti\18_DottorWhy\1_DottorWhyOnline\DrWhyEntity\DrGateway.cs:line 54

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.Exception: ___2System.Net.WebException: The remote server returned an error: (400) Bad Request.
  at System.Net.HttpWebRequest.GetResponse()
  at DrWhyWebIT.classiDiSupporto.DRGateway.sendAndReceive[T](String token, String classpath, String method, Dictionary`2 parametri, String domain) in e:\progetti\18_DottorWhy\1_DottorWhyOnline\DrWhyEntity\DrGateway.cs:line 54

Source Error:


Line 6:  @{
Line 7:      String drwhyapi_developer_key = (String)System.Configuration.ConfigurationManager.AppSettings["drwhyapi_developer_key"];
Line 8:      r_Lingua myResultLingue = DRGateway.sendAndReceive<r_Lingua>(drwhyapi_developer_key, "DrWhyAPI.Security.GestioneLingue", "getTutteLeLingue", null);
Line 9:      i_Lingua myLingua = myResultLingue.result.Where(p => p.codice_iso == ViewBag.lang).Single();
Line 10: 

Source File: c:\inetpub\DrWhyIT\Views\IlGioco\drwhy_news_articolo.cshtml    Line: 8

Stack Trace:


[Exception: ___2System.Net.WebException: The remote server returned an error: (400) Bad Request.
   at System.Net.HttpWebRequest.GetResponse()
   at DrWhyWebIT.classiDiSupporto.DRGateway.sendAndReceive[T](String token, String classpath, String method, Dictionary`2 parametri, String domain) in e:\progetti\18_DottorWhy\1_DottorWhyOnline\DrWhyEntity\DrGateway.cs:line 54]
   DrWhyWebIT.classiDiSupporto.DRGateway.sendAndReceive(String token, String classpath, String method, Dictionary`2 parametri, String domain) in e:\progetti\18_DottorWhy\1_DottorWhyOnline\DrWhyEntity\DrGateway.cs:83
   ASP._Page_Views_ilgioco_drwhy_news_articolo_cshtml.Execute() in c:\inetpub\DrWhyIT\Views\IlGioco\drwhy_news_articolo.cshtml:8
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +123
   System.Web.WebPages.StartPage.ExecutePageHierarchy() +86
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +104
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +375
   System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +31
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +436
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +658
   System.Web.Mvc.Controller.ExecuteCore() +143
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +91
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +57
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +25
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +36
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +602
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +128


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