I have a website, which on DEV env. I use virtual directory, while in LIVE env. I don’t.
I want to distinguish between virtual directory & none virtual, in runtime.
How can I acheive this?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Go to the Web tab in Project Properties and change
Virtual pathto/.This will make the debugging server use the root.
To answer the question, you’re looking for the
HttpRuntime.AppDomainAppVirtualPath, which gets the virtual path to the application root.