virtual-path

How can I trick MVC into rendering links based on a different virtual path?

I'm running a bunch of apps on discountasp.net with the subdomain addon. Since with shared hosting I can't have multiple IIS sites, I've also written an HTTP module that allows sites in subfolders to operate as if they are running in the root directory. So for example, instead of hosting my blog at dandoes.net/blog, I can host it at blog...

How do you convert a url to a virtual path in asp.net without manual string parsing?

I've seen similar questions and answers regarding conversions from virtual to absolute and url, but how can I convert a url to a virtual path without manual string parsing? Example: I want "http://myserver/home.aspx" converted to: "~/home.aspx" I realize the above example would be an easy string parsing routine, but I'm looking for a...

Get virtual path for a full path in asp classic

How can I get the virtual path for a full path in ASP classic. Note that the full path may be under a virtual directory and therefore the simplistic virtPath = Replace(fullPath, Server.MapPath("/"), "") method will not work. Edit: To clarify, an example follows Full Windows File Path (known): \\MyServer\MyShare\Web\Site\Logs\Test...

asp.net - Is my path virtual?

Is there a built-in asp.net method for checking the "virtualness" of a path? The only way I've been able to do it so far is with the following try block: public void Foo(String path){ try { path = Server.MapPath(path); } catch(HttpException){} // do stuff with path } ...

ASP.NET: IsVirtualPath?

Is there a function to determine whether a URI is a valid virtual path? I'm given a string and need to use Server.MapPath() on it without throwing an Exception when the string is not a valid virtual path. Vote to close my question. Answer is @ http://stackoverflow.com/questions/1308723/asp-net-is-my-path-virtual. ...

How to OpenWebConfiguration with physical path?

hi, I have a win form that creates a site in IIS7. One function needs to open the web.config file and make a few updates. (connection string, smtp, impersonation) However I do not have the virtual path, just the physical path. Is there any way I can still use WebConfigurationManager? I need to use it's ability to find section and read...