Re: Network path name
- From: jc <jc@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 8 Feb 2009 08:24:03 -0800
Joe,
Thank you for your response.
I apologize for wasting everyone's time with this issue.
I answered my own question, when I realized that
the application should run the same (from anywhere)
with a hardcoded path. So, I went back and checked
my code and found a "stupid" programming error with
path name. I guess, that's why I was suprised with the
application's behaviour.
Now, after the code fix, the program runs OK from a
HTTP link or from the run command line.
My apologies,
-jc
"Joseph M. Newcomer" wrote:
The parth would not be.
\\192.68.0.7\appname\appname.exe
unless appname is a network share you are exporting, and appname.exe is in the root of
that share. Or, if you are using http:, if the executable is in your default HTTP folder.
But that's because of how HTTP: expands the path. A CreateFile does not apply the same
rules to expanding the path. You are comparing what a Web server does to what the file
system does underneath it, without asking how the Web server finds the file. You would
have to apply on the client side the same transformation the Web server applies on the
server side. Why should you be surprised that they are incompatible?
joe
On Sat, 7 Feb 2009 20:38:01 -0800, jc <jc@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Joe,Joseph M. Newcomer [MVP]
Thank you for your response.
I am unfamiliar, with trying to programmatically access network files.
But, this is kind of strange to me.
If I execute the application from the "Start" "Run" command, then
the program finds the configuration file OK (without the share name).
run: \\192.68.0.7\\appname\appname.exe
But, If I try to execute the program from a browser
http://192.168.0.7/appname/appname.exe. The application runs,
but it does not find the configuration file??
I hardcoded the configuration file path \\192.168.0.7\\appname\appname.cfg.
So, the application is using the same path, regardless if it was started from
the "Run" command or from a browser.
Any ideas?
Thanks,
-jc
.
Bu
"Joseph M. Newcomer" wrote:
Is the C: drive shared out as "C"? Is it shared at all? I tried a few experiments here,
and it only works when I use the proper sharename (for example, one of my machines shares
its C: drive as Q:, so \\192.168.168.4\c\*.* does not work, but \\192.168.168.4\q\*.*
works as expected).
joe
On Sat, 7 Feb 2009 19:02:01 -0800, jc <jc@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hello,Joseph M. Newcomer [MVP]
I am having trouble accessing a file through our intranet.
I specify, in the application, the following path:
\\\\192.168.0.7\\c\\appname\\appname.cfg
The actual path on the 192.168.0.7 server is:
c:\appname\appname.cfg
What am I not including, in my application, for the path?
TIA,
-jc
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
- References:
- Network path name
- From: jc
- Re: Network path name
- From: Joseph M . Newcomer
- Re: Network path name
- From: jc
- Re: Network path name
- From: Joseph M . Newcomer
- Network path name
- Prev by Date: Re: Network path name
- Next by Date: Re: CStdioFile::ReadString in a Unicode build
- Previous by thread: Re: Network path name
- Next by thread: CStdioFile::ReadString in a Unicode build
- Index(es):
Relevant Pages
|