Questions tagged [virtual-path]
54 questions
37
votes
5 answers
How to OpenWebConfiguration with physical path?
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…

aron
- 2,856
- 11
- 49
- 79
9
votes
2 answers
How to get server path of physical path ?
I want to convert this physical path "C:\bla\bla\Content\Upload\image.jpg" to server path like "/Content/Upload/image.jpg".
How can i do that ?

Freshblood
- 6,285
- 10
- 59
- 96
8
votes
6 answers
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…

C. Ross
- 31,137
- 42
- 147
- 238
8
votes
2 answers
How to resolve issue with image path when testing HtmlHelper?
I came across an issue when I was testing my HTML Helper. Basically I'm creating a grid with loads of rows, columns and different types of data in it. In the header there is also a image to notify the user what column the data is sorted by. However,…

MrW
- 1,210
- 2
- 16
- 27
6
votes
2 answers
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…

Kilhoffer
- 32,375
- 22
- 97
- 124
5
votes
1 answer
ASP.NET MVC3 Root-relative path to virtual path in Controller or Model
This sounds like a simple enough question, but can't find the answer for the life of me. How does one convert a root-relative url (~/my/path) to a virtual path (/mywebsite/my/path) in the Controller and/or Model?
On a view it's easy enough to do,…

death_au
- 1,282
- 2
- 20
- 41
5
votes
0 answers
IIS7 change an application's virtual path to be at domain root
Under sites in IIS I have made a new node that binds to port 80 and stopped all the other websites nodes/pools that would otherwise bind to that port.
Under the new node I created an application baz1, so the path the website is on is…

Josh R
- 1,970
- 3
- 27
- 45
4
votes
0 answers
How to set the Site-Root Relative Path (for localhost) on IIS on my web application
I create a new Web Site, in localhost, called Example1, on Visual Studio (2008); than if I wrote :
the "path" that IIS should consider of should be localhost/Example1/private_images/club.png, but in fact it…


markzzz
- 47,390
- 120
- 299
- 507
4
votes
1 answer
Virtual path duplicated in Response.Redirect in ASP.NET under Visual Studio 2010
I'm having a problem with one of my VS 2010 problems.
Lets say I have a page, MyPage.aspx, in web site, MyWebSite ,with virtual path of ,MyWebSitePath.
When I redirect call to another page, MyPage1.aspx, my virtual path doubles and I get HTTP Error…

lavuy
- 191
- 1
- 12
3
votes
1 answer
Is there a "symbol" on .NET that identify virtual-path?
Suppose this scenario. On my Default.aspx, I insert a context (WebForms), called MyContext.ascx, that load an image. So the path would be :
Well. Now, I'd like to insert the same context on another .aspx page, that…


markzzz
- 47,390
- 120
- 299
- 507
3
votes
2 answers
Joint different Bundles Virtual Path into single one
I have several Bundles Virtual Paths defined on the BundleConfig.config where each one have associated several javascript path files.
What I want is to join all this virtual paths in a single one.
For instance, I have the following…

Ricardo Rocha
- 14,612
- 20
- 74
- 130
2
votes
1 answer
xxx is not a valid virtual path?
I use XmlDataSource like this :
as a datasource to my rotater control.
but i get the following exception all the time :
https://myurl.xml…

Anyname Donotcare
- 11,113
- 66
- 219
- 392
2
votes
1 answer
Use virtual pageviews for Facebook Pixel code
I want to use facebook pixel code for remarketing purposes and I am intend to remarket to only who did not complete it to thank you page.
However, in the booking engine pages, page url is all same, from the first page to thank you page.
Is there a…

cool_kid
- 337
- 1
- 3
- 13
2
votes
2 answers
Accessing folder outside website's root folder in asp.net
I have a around 15 websites on a server, i have built a tool which is common across all the sites.
Now instead of keeping the same files inside individual site's folder, i decided to keep the folder common, and keep it outside the website's folder,…

Abbas
- 4,948
- 31
- 95
- 161
2
votes
1 answer
Check the IIS virtual path in IIS 7.5
I am trying to encrypt some sections of the web.config file of one of my applications by using RSA encryption at user level.
So I followed all the steps listed in here and I succesfully created the provider and granted access to my application.…

CiccioMiami
- 8,028
- 32
- 90
- 151