473,407 Members | 2,315 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,407 software developers and data experts.

How to get the web site physical path

Hi all...

How can I get the physical path of a web site from an EXE application? The
Web Site is on the same server as the application.

Thanks in advance
Jaime
Nov 26 '05 #1
8 10737
"Jaime Stuardo" <js******@manquehue.net> wrote in message
news:#0**************@tk2msftngp13.phx.gbl...
Hi all...

How can I get the physical path of a web site from an EXE application? The
Web Site is on the same server as the application.

Thanks in advance
Jaime


Request.ServerVariables("APPL_PHYSICAL_PATH")
or
Request.ServerVariables("PATH_TRANSLATED")
may give you what you want.
Nov 26 '05 #2
But I cannot access server variables when I am in an EXE application since
it is ran in a different context. Or do you know a way how to get a
reference to the Request object from an EXE application?

Thanks
Jaime

"McKirahan" <Ne**@McKirahan.com> wrote in message
news:1J********************@comcast.com...
"Jaime Stuardo" <js******@manquehue.net> wrote in message
news:#0**************@tk2msftngp13.phx.gbl...
Hi all...

How can I get the physical path of a web site from an EXE application?
The
Web Site is on the same server as the application.

Thanks in advance
Jaime


Request.ServerVariables("APPL_PHYSICAL_PATH")
or
Request.ServerVariables("PATH_TRANSLATED")
may give you what you want.

Nov 26 '05 #3
"Jaime Stuardo" <js******@manquehue.net> wrote in message
news:ed**************@TK2MSFTNGP09.phx.gbl...
But I cannot access server variables when I am in an EXE application since
it is ran in a different context. Or do you know a way how to get a
reference to the Request object from an EXE application?


[snip]

Could you be more specific about what you're trying to do and why?
Nov 26 '05 #4
I thought it was clear, sorry..

I have a VB application compiled as an EXE file that is scheduled to ran at
certain time. That EXE file accesses some configuration information from a
web site. That configuration information is, for example, some connection
strings.

That information is present in a file under the web site directory. That's
why I need to get the physical path of it. I want to do that so that I don't
need to hard code the path.

3 things to have in mind :

- The system is already designed. I'm just correcting some errors produced
when my customer moved some directories from one partition to another.
- I cannot use an INI file
- I can hard-code the path, but if for some reason, the customer move the
files again from one partition to another, or from one directory to another,
the system will fail again.

Thanks
Jaime

"McKirahan" <Ne**@McKirahan.com> wrote in message
news:Tt********************@comcast.com...
"Jaime Stuardo" <js******@manquehue.net> wrote in message
news:ed**************@TK2MSFTNGP09.phx.gbl...
But I cannot access server variables when I am in an EXE application
since
it is ran in a different context. Or do you know a way how to get a
reference to the Request object from an EXE application?


[snip]

Could you be more specific about what you're trying to do and why?

Nov 27 '05 #5

http://www.powerasp.com/content/hint...sical-path.asp
"Jaime Stuardo" <js******@manquehue.net> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi all...

How can I get the physical path of a web site from an EXE application? The
Web Site is on the same server as the application.

Thanks in advance
Jaime

Nov 27 '05 #6
"Jaime Stuardo" <js******@manquehue.net> wrote in message
news:#A*************@TK2MSFTNGP12.phx.gbl...
I thought it was clear, sorry..

I have a VB application compiled as an EXE file that is scheduled to ran at certain time. That EXE file accesses some configuration information from a
web site. That configuration information is, for example, some connection
strings.

That information is present in a file under the web site directory. That's
why I need to get the physical path of it. I want to do that so that I don't need to hard code the path.

3 things to have in mind :

- The system is already designed. I'm just correcting some errors produced
when my customer moved some directories from one partition to another.
- I cannot use an INI file
- I can hard-code the path, but if for some reason, the customer move the
files again from one partition to another, or from one directory to another, the system will fail again.


[snip]

Have you tried "App.Path" in your VB application?

(Note -- this is a VB question not an ASP question.)
Nov 27 '05 #7
Your web site will need to have an ASP page that returns the physical path
(via the servervariables, or by using server.mappath).
You VB ap will need to use the XMLHTTPRequest object (it's part of the msxml
parser) to request the page and receive its response.

You can get more details in a VB group.

Bob Barrows
Jaime Stuardo wrote:
I thought it was clear, sorry..

I have a VB application compiled as an EXE file that is scheduled to
ran at certain time. That EXE file accesses some configuration
information from a web site. That configuration information is, for
example, some connection strings.

That information is present in a file under the web site directory.
That's why I need to get the physical path of it. I want to do that
so that I don't need to hard code the path.

3 things to have in mind :

- The system is already designed. I'm just correcting some errors
produced when my customer moved some directories from one partition
to another. - I cannot use an INI file
- I can hard-code the path, but if for some reason, the customer move
the files again from one partition to another, or from one directory
to another, the system will fail again.

Thanks
Jaime

"McKirahan" <Ne**@McKirahan.com> wrote in message
news:Tt********************@comcast.com...
"Jaime Stuardo" <js******@manquehue.net> wrote in message
news:ed**************@TK2MSFTNGP09.phx.gbl...
But I cannot access server variables when I am in an EXE application
since
it is ran in a different context. Or do you know a way how to get a
reference to the Request object from an EXE application?


[snip]

Could you be more specific about what you're trying to do and why?


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Nov 27 '05 #8
Thanks Bob... Your solution worked.

Jaime

"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:eb**************@TK2MSFTNGP12.phx.gbl...
Your web site will need to have an ASP page that returns the physical path
(via the servervariables, or by using server.mappath).
You VB ap will need to use the XMLHTTPRequest object (it's part of the
msxml parser) to request the page and receive its response.

You can get more details in a VB group.

Bob Barrows
Jaime Stuardo wrote:
I thought it was clear, sorry..

I have a VB application compiled as an EXE file that is scheduled to
ran at certain time. That EXE file accesses some configuration
information from a web site. That configuration information is, for
example, some connection strings.

That information is present in a file under the web site directory.
That's why I need to get the physical path of it. I want to do that
so that I don't need to hard code the path.

3 things to have in mind :

- The system is already designed. I'm just correcting some errors
produced when my customer moved some directories from one partition
to another. - I cannot use an INI file
- I can hard-code the path, but if for some reason, the customer move
the files again from one partition to another, or from one directory
to another, the system will fail again.

Thanks
Jaime

"McKirahan" <Ne**@McKirahan.com> wrote in message
news:Tt********************@comcast.com...
"Jaime Stuardo" <js******@manquehue.net> wrote in message
news:ed**************@TK2MSFTNGP09.phx.gbl...
But I cannot access server variables when I am in an EXE application
since
it is ran in a different context. Or do you know a way how to get a
reference to the Request object from an EXE application?

[snip]

Could you be more specific about what you're trying to do and why?


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Nov 27 '05 #9

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

Similar topics

2
by: Scott Tilton | last post by:
We have a field that gets filled into a database that our ASP website pulls from. What we would like to be able to do is to take that path and convert it to a virtual path so the website can...
1
by: Michiel Schaeverbeke | last post by:
Hi, I'm trying to reach an xml file from within a web application. The file is physically on a different server. When I try to reach it using \\servername\path\ style, I get the error...
0
by: Steven | last post by:
Hello In my asp.net app I'm using a xml viewer to display an xml document. I have several xml documents under C:\MyWebS\XMLDocs folder. Depending on the user selection I will be passing the...
2
by: Sakharam | last post by:
Hi All, I am developing a scheduler object for my web application. I am starting new thread on Application_Start event. Everything works fine except following issue. I am using following...
0
by: DagoFlores | last post by:
Hi, Im trying to get programmaticly the physical path of each directory displayed on IIS Console. If the SchemaClassName is "IIsWebVirtualDir" then I can get it (i.e.: "C:\..."). Trying with...
1
by: bilalmk | last post by:
may i get the physical path of any page hosted on other server
4
by: =?Utf-8?B?SmVmZiBCZWVt?= | last post by:
Best way I can think to describe this is through an example. I have a virtual directory, let's call it "MyVirtualDirectory" that maps to \\MyServer\Shared. I have a path that is...
5
by: marss | last post by:
Server.MapPath("~/page.aspx") returns the physical file path based on the specified virtual path. Is there any reverse method to get the virtual path based on the physical path (both pathes belong...
0
by: Ahmedhussain | last post by:
Hi everyone, I am totally new to IIS. I somehow configured IIS and now whenever I try to add a website, on testing it gives me the error of authorization, i.e. "Cannot verify access to path :...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.