Thursday, February 23, 2012

HostingEnvironment, Where Have You Been All My Life?

Son of a bitch!

Here'd I'd been schlepping around instances of the HttpContext in my MVC app so that I could use Server.MapPath() -- when all this time I could have been using the static method System.Web.Hosting.HostingEnvironment.MapPath().

Learn something new every day, I guess.

No comments:

Post a Comment