Re: Problem with opening files from http://localhost - Win XP
From: David Wang [Msft] (someone_at_online.microsoft.com)
Date: 09/10/04
- Next message: David Wang [Msft]: "Re: Virtual Directory - Permission Denied with fso CopyFile"
- Previous message: David Wang [Msft]: "Re: Client HTTP Status 12031. Server IIS Log 400 w/ Win32 status 121"
- In reply to: jib: "Problem with opening files from http://localhost - Win XP"
- Next in thread: jib: "Re: Problem with opening files from http://localhost - Win XP"
- Reply: jib: "Re: Problem with opening files from http://localhost - Win XP"
- Reply: jib: "Re: Problem with opening files from http://localhost - Win XP"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 10 Sep 2004 00:44:08 -0700
First, this is not a roblem with Windows XP nor IIS. This is purely a
configuration problem that you should solve so that the client behaves the
way you want.
Now, creating a web page with links that look like file:/// -- i.e. local
file links -- is pretty useless because only you can browse the link
successfully. Such links presume that the remote user visiting your site
already has your site's contents downloaded locally to their machine --
which is unlikely to be the case. To fix this, please make sure that the
href points to something that is always accessible to the remote user --
like a valid URL.
Next, when you click a link, you are telling the browser "please download
the contents of this link to my local machine". Note: no one is "executing"
this link, or "opening the link in you editor", etc -- the browser is merely
making an HTTP request to the server for that resource, and the web server
is simply returning the contents of the resource as-is.
Modern browsers, after they obtain the contents of the link, will parse the
Content-Type header that was sent with the link's contents and then decide
what to do with it. If the content-type is "text/html", the browser will
merely display the downloaded file as HTML -- regardless of the file's
extension. Similarly, .WAV files have a content-type of "audio/wav", which
causes the browser to look up its local definition of
MIMEMap-to-Handler-Application mapping and decide what to do with it.
Finally, browsers have security features that do not automatically "execute"
content downloaded from servers -- that is, even though .EXE files have a
content-type of ".exe,application/octet-stream", once a browser downloads it
all, it isn't going to automatically execute it on the client. Instead, the
browser will ask you "should I save it, open it, or do nothing?"
Getting back to your question -- from a shell's perspective, the same
webpage (index.html), opened from your desktop (a folder) and
C:\inetpub\wwwroot (another folder) is no different. Since you claim that
the same page has different behavior, I think you are not "Loading" the file
identically. The UI may look the same, but one is probably handled by the
shell without going through a web server, while the other one is going
through the web server somehow. The latter case will require a valid
Content-Type (you have to have the correct MIMEType registered) and likely
won't behave identically to the local shell case.
ALso, what SP of W2K and WXP are we talking about?
-- //David IIS This posting is provided "AS IS" with no warranties, and confers no rights. // "jib" <jib@discussions.microsoft.com> wrote in message news:772C65DD-D0ED-4963-8659-B951BE24F04B@microsoft.com... Hi I have a webpage with links along the lines of <A href="file:///c:/test.wav">test.wav</A> if i save the webpage (index.html) on my desktop and load it from there and click the link the file opens in my chosen editor - soundforge if i save the webpage in c:/inetpub/wwwroot and load it from there and click the link nothing happens i have this running under Win2k and am looking to make it work on Windows XP. can anyone help?? many thanks jib
- Next message: David Wang [Msft]: "Re: Virtual Directory - Permission Denied with fso CopyFile"
- Previous message: David Wang [Msft]: "Re: Client HTTP Status 12031. Server IIS Log 400 w/ Win32 status 121"
- In reply to: jib: "Problem with opening files from http://localhost - Win XP"
- Next in thread: jib: "Re: Problem with opening files from http://localhost - Win XP"
- Reply: jib: "Re: Problem with opening files from http://localhost - Win XP"
- Reply: jib: "Re: Problem with opening files from http://localhost - Win XP"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|