c# - How to Debug a Post to an OWIN Service? -


i have owin self host service.

another service (which dont have access to) posting data on local network ip address (though computer name gives same results).

the problem have value 'null' in controller.

i've tried fiddler, cannot see traffic. know sending correct data, service (which cannot see) getting something.

from appbuilder.use() statement, know service being hit , navigate controller.

how can find out what's wrong or know going wrong please?

setup

public void owinwebserverconfiguration(iappbuilder appbuilder)         {             appbuilder.use(async (environment, next) =>             {                 //note: post hit can't find content of message                  debug.writeline(environment.request.uri);                 await next();                 debug.writeline(environment.response.statuscode);             });              // configure web api self-host.              httpconfiguration config = new httpconfiguration();              // important - enable unity take control on di             config.dependencyresolver = new helpers.unityresolver(_unitycontainer);               config.routes.maphttproute(                 name: "defaultapi",                 routetemplate: "api/{controller}/{content}",                 defaults: new { content = routeparameter.optional }             );              var cors = new enablecorsattribute(owinconfig.allowedaccessurls, "*", "*");         //config.enablecors(new enablecorsattribute("*", "*", "get, post, options, put, delete"));         config.enablecors(cors);          appbuilder.usewebapi(config);         } 

controller

[httppost] public httpresponsemessage post(formcollection fc) {      //fc, null. changing signature means controller not hit.     httpresponsemessage response;     // if (value != null)     //    system.diagnostics.debugger.log(0, "id:", value);      response = request.createresponse(httpstatuscode.ok, "ok");      return response; } 

screenshots

enter image description here

enter image description here


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -