[ASP .NET] How to access Request data when HttpContext.Current.Request is unavailable

What happened if you need to access the HttpRequest object whitin the event Application_Start of an ASP .NET Web Application ?

Response: you end up with an exception.

Someone might observe that such event is not a valid place for a task like that, but sometimes things are simply different from those that appear at first sight.

So, if you want to get for example the virtual path or the physical path of a web application before the HttpRequest object is constructed  this is a valid solution:


Simply use HttpRuntime instead of HttpContext.Current.Request!

Technorati Tags: ,

168 thoughts on “[ASP .NET] How to access Request data when HttpContext.Current.Request is unavailable

  1. Pingback: canada pharmacy
  2. Pingback: fwervs.gumroad.com
  3. Pingback: buy cials online
  4. Pingback: kertyun.flazio.com
  5. Pingback: canada drug
  6. Pingback: canadian pharmacy
  7. Pingback: madridbet
  8. Pingback: meritroyalbet
  9. Pingback: meritroyalbet
  10. Pingback: eurocasino
  11. Pingback: online pharmacy
  12. Pingback: dkyubn.bizwebs.com
  13. Pingback: meritroyalbet
  14. Pingback: drugstore online
  15. Pingback: Gz92uNNH
  16. Pingback: online pharmacies
  17. Pingback: sdtyli.zombeek.cz
  18. Pingback: pharmacy canada
  19. Pingback: 1burdensome
  20. Pingback: meritking
  21. Pingback: confeitofilm
  22. Pingback: stromectol pill
  23. Pingback: buy viagra 25mg
  24. Pingback: pharmacy canada
  25. Pingback: canada medication
  26. Pingback: canadian pharmacys
  27. Pingback: stromectol price

Comments are closed.