You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im getting the below exception when calling the proxies endpoint. This happens if I enable the XML documentation output in my project. I have hundreds of XML comments so I cant be specific on which one is failing. Please can WebAPIProxy catch this exception and silently ignore it? Or provide a parameter to disable documentation output for cases like this. Or even just provide a better error message, so I know which comment is freaking it out?
Many regards
Iain
{"Message":"An error has occurred.","ExceptionMessage":"Unable to cast object of type 'System.Xml.XmlComment' to type 'System.Xml.XmlElement'.","ExceptionType":"System.InvalidCastException","StackTrace":" at DocsByReflection.DocsTypeService.GetXmlFromName(Type type, Char prefix, String name, Boolean throwError)\r\n at DocsByReflection.DocsService.GetXmlFromType(Type type, Boolean throwError)\r\n at WebApiProxy.Server.MetadataProvider.GetDescription(Type type)\r\n at WebApiProxy.Server.MetadataProvider.AddModelDefinition(Type classToDef)\r\n at WebApiProxy.Server.MetadataProvider.ParseType(Type type, ModelDefinition model)\r\n at WebApiProxy.Server.MetadataProvider.<>c__DisplayClass17.b__c(ApiParameterDescription b)\r\n at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext()\r\n at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source)\r\n at WebApiProxy.Server.MetadataProvider.<>c__DisplayClass17.b__a(ApiDescription a)\r\n at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext()\r\n at WebApiProxy.Server.Templates.JsProxyTemplate.TransformText()\r\n at WebApiProxy.Server.ProxyHandler.<>c__DisplayClass3.b__1()\r\n at System.Threading.Tasks.Task1.InnerInvoke()\r\n at System.Threading.Tasks.Task.Execute()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at WebApiProxy.Server.ProxyHandler.d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at Mybox.Server.Web.MyboxAPI.Providers.LogRequestAndResponseHandler.d__3.MoveNext() in C:\Stuff\Code\LaundryboxFreshSVN\mybox\branches\mobileapi\Franchise\Web\MyboxAPI\Providers\Logging.cs:line 102\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Owin.PassiveAuthenticationMessageHandler.d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.HttpServer.d__0.MoveNext()"}
The text was updated successfully, but these errors were encountered:
Hi there
Im getting the below exception when calling the proxies endpoint. This happens if I enable the XML documentation output in my project. I have hundreds of XML comments so I cant be specific on which one is failing. Please can WebAPIProxy catch this exception and silently ignore it? Or provide a parameter to disable documentation output for cases like this. Or even just provide a better error message, so I know which comment is freaking it out?
Many regards
Iain
{"Message":"An error has occurred.","ExceptionMessage":"Unable to cast object of type 'System.Xml.XmlComment' to type 'System.Xml.XmlElement'.","ExceptionType":"System.InvalidCastException","StackTrace":" at DocsByReflection.DocsTypeService.GetXmlFromName(Type type, Char prefix, String name, Boolean throwError)\r\n at DocsByReflection.DocsService.GetXmlFromType(Type type, Boolean throwError)\r\n at WebApiProxy.Server.MetadataProvider.GetDescription(Type type)\r\n at WebApiProxy.Server.MetadataProvider.AddModelDefinition(Type classToDef)\r\n at WebApiProxy.Server.MetadataProvider.ParseType(Type type, ModelDefinition model)\r\n at WebApiProxy.Server.MetadataProvider.<>c__DisplayClass17.b__c(ApiParameterDescription b)\r\n at System.Linq.Enumerable.WhereSelectEnumerableIterator
2.MoveNext()\r\n at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable
1 source)\r\n at WebApiProxy.Server.MetadataProvider.<>c__DisplayClass17.b__a(ApiDescription a)\r\n at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext()\r\n at WebApiProxy.Server.Templates.JsProxyTemplate.TransformText()\r\n at WebApiProxy.Server.ProxyHandler.<>c__DisplayClass3.b__1()\r\n at System.Threading.Tasks.Task
1.InnerInvoke()\r\n at System.Threading.Tasks.Task.Execute()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at WebApiProxy.Server.ProxyHandler.d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at Mybox.Server.Web.MyboxAPI.Providers.LogRequestAndResponseHandler.d__3.MoveNext() in C:\Stuff\Code\LaundryboxFreshSVN\mybox\branches\mobileapi\Franchise\Web\MyboxAPI\Providers\Logging.cs:line 102\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Owin.PassiveAuthenticationMessageHandler.d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.HttpServer.d__0.MoveNext()"}The text was updated successfully, but these errors were encountered: