473,396 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Absolute url from relative path

How do I get the absolute url for a file from c#-code?

I have the path "~/file.aspx" and I want
"http://www.mydomain.xyz/myapp/file.aspx"

Basically I want to get the complete app-path url including the domain from
the current app, but I have only found ways of getting the physical path and
the virtual path ???

/Andreas
Dec 31 '05 #1
1 2105
Andreas,

This might help: http://west-wind.com/weblog/posts/269.aspx
"Andreas Zita" <an**********@gmail.com> wrote in message
news:uD**************@TK2MSFTNGP12.phx.gbl...
How do I get the absolute url for a file from c#-code?

I have the path "~/file.aspx" and I want
"http://www.mydomain.xyz/myapp/file.aspx"

Basically I want to get the complete app-path url including the domain
from the current app, but I have only found ways of getting the physical
path and the virtual path ???

/Andreas

Dec 31 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Richard | last post by:
We are distributing a VS2003 solution to our customers that includes a .NET assembly (dll file) and a sample project for how to use the dll. The customer can then customize the sample or add a new...
7
by: Rizaan Jappie | last post by:
is it possible to get the relative path based on a absolute path in c#? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
0
by: Ffelagund | last post by:
There are any Path or Directory function to convert an absolute path to a relative path using a choiced directory as base to calculate the origin of the relative path?
6
by: openleren | last post by:
Hi all, how can I use a relative path in my web.config file for an Access db?: Instead of using <configuration> <appSettings> <add key="conAccess" value="microsoft.jet.oledb.4.0;data...
0
by: matthias s. | last post by:
Hi there, Say I have a domain called www.mydomain.com. In my virtual directory I've created subfolders called 'sub1' and 'sub2'. Now in 'sub1 resides the file 'file1.aspx' and in 'sub2' resides...
4
by: Boni | last post by:
Is there something already done to get absolute path from relative path, and relative path from absolute path: Example: BasePath="c:\a\b\c" RelativePath="..\e\f\g\..\m"...
0
by: Nick | last post by:
Hi, I need to strong name my application and thus have to specify the sn key path in the <Assembly: AssemblyKeyFile("strongNameKey.snk")> parameter. Observations: If I specify the hardcoded...
2
by: =?Utf-8?B?ZmFpcnl2b2ljZQ==?= | last post by:
hi, i just want to know when i new a Uri instance using the UriKind.Relative para in construtor, where is the root path, for example, a local file Uri u=new Uri("a.txt",UriKind.Relative); then...
13
by: lawpoop | last post by:
Hello all - I have a two part question. First of all, I have a website under /home/user/www/. The index.php and all the other website pages are under /home/user/www/. For functions that are...
2
by: BD | last post by:
Hi there. Using 8.2 on Windows. I have a situation where I have a db backup, which I want to deploy to a group of developer workstations. The target directory for the database files will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.