Вопрос

I'm writing ASP.Net WebApi 2 (5.0) application and I have some problems with custom XML serialisation - a POST request hangs after successful deserialisation of request body (a controller is not called). I was trying to debug this but as soon as I exit the deserialisation method debugger doesn't show me any code. The request itself hangs in nowhere (and display 504 in Fiddler after IIS Express process termination).

Further investigation showed there are no pdbs included with WebApi NuGet packages. I searched several debug symbol sources and I've managed to find debug symbols for all WebApi libraries except System.Net.Http.Formatting, which is missing:

Assembly title: System.Net.Http.Formatting (88a1bd8d3344b5df289577425c0314e7f521e88a)
Assembly file version: 5.0.11001.0
Assembly version: 5.0.0.0
SymSrv: http://referencesource.microsoft.com/symbols/System.Net.Http.Formatting.pdb/2F953AE40BC041E5AD078905E6D532FB1/System.Net.Http.Formatting.pdb (not found)
SymSrv: http://msdl.microsoft.com/download/symbols/System.Net.Http.Formatting.pdb/2F953AE40BC041E5AD078905E6D532FB1/System.Net.Http.Formatting.pdb (not found)
SymSrv: http://srv.symbolsource.org/pdb/Public/System.Net.Http.Formatting.pdb/2F953AE40BC041E5AD078905E6D532FB1/System.Net.Http.Formatting.pdb (not found)

It looks like pdb for the library is not available at all. If I run the same code under self host, it works perfect (but still not fully debuggable). I switched off all handlers in web.config (under web host), except the one:

<handlers>
  <clear />
  <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>

and the problem is still there.

Is there any way to debug/trace WebApi serialisation code to understand what's the problem?

Это было полезно?

Решение

You can try the Microsoft Reference Source Code Center and see if they're available there yet.

The symbol server is http://referencesource.microsoft.com/symbols

Follow the instructions to step through the source code of the .Net Framework, and not just your code.

You can also download local copies of the source code for various releases.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top