c# - Constructing my own HttpRequest object -


firstly let me state we not using iis our web server , not intend to, please no answers telling me use iis. application working on's strength not require iis server installed.

secondly, not making request (i'm not client), server , accepting requests via 3rd party embedded lightweight web server.

to keep things .net based , don't have reference 3rd party web server library dynamically loaded modules, use system.web namespace iis uses, it's there in .net.

what having problems cannot create own system.web.httprequest object, nor can extend own (it's sealed) overcome problem.

how build system.web.httprequest object can translate information (such headers, cookies, contenttypes, etc) 3rd party web server's handled requests .net framework version?

you can use constructor internal httprequest(httpworkerrequest wr, httpcontext context). pry open using reflection. have manufactore other objects well.

httpworkerrequest made inherited from. no problem there. httpcontext has constructor well.

you might forced set other members using reflection well. scenario barely supported.

asp.net mvc took route of adding abstractions such httprequestbase. maybe can migrate use that.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -