How do I know the the complete virtual path that my application is currently hosted? For example:
http://www.mysite.com/myApp
or
Url.Content("~") worked great for me and is nice and simple. I used it in the view like this:
Here my attachment is a path like "/Content/Documents/Blah.PDF".
When my app is published to a IIS site that uses a virtual directory, Url.Content("~") resolves to just the virtual directory name like, "/app-test", for example.