Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ApplicationPath on Application_Start

Tags:

c#

asp.net

I've been trying to get the application path for my project on the Application_Start event in the global asax I can use server.mappath on pages that aren't routed but when i am on a routed page i get the new virtual path is there a way of getting the application path on startup i can't use Request or session or HttpContext.items[key] at that level does anyone know what to do

like image 978
ONYX Avatar asked Dec 28 '11 12:12

ONYX


1 Answers

This is the solution: http://msdn.microsoft.com/en-us/library/system.web.hosting.hostingenvironment.aspx

like image 125
Roberto Conte Rosito Avatar answered Oct 19 '22 22:10

Roberto Conte Rosito