myapplication://filepath

  • Thread starter Thread starter jamesjanke
  • Start date Start date
J

jamesjanke

Hello everyone,

I need to write an application that listens for file request on a local
machine that is totally independant of IIS. I need to do some
processing on every file request in an application simliarly to the way
that MSDN works. They have a path setup as so: ms-help://folder/file.

Here is the overall structure of the app:

My .NET app starts a new process, could be HTML, SWF, or an EXE. When
another file is called from an HTML file with a relative path, I want
it to default to the previous requested path (myapplication://filepath)

So for example if i start a new process on "index.html" in a root
directory, and index.html has a link to page1.html I want it to appear
that it goes to myapplication://page1.html

I not asking for a full blown answer, just for someone to point me in
the right direction. I'm not sure what this technique is called to do
some research on it.

Thanks for your help,

James
 
Hi, Vadym

Thanks for the reply.

This is getting closer. I also need the Listener to capture paths
directed to the filesystem such as:

d:/folder/somefile.swf:2352

I'm assuming that creating an HTTP Listener will only intercept
requestion like so:

http://localhost:2352/folder/somefile.swf

Please tell me I'm wrong.

Thanks, James
 
Hello, (e-mail address removed)!

j> Thanks for the reply.

j> This is getting closer. I also need the Listener to capture paths
j> directed to the filesystem such as:

j> d:/folder/somefile.swf:2352

j> I'm assuming that creating an HTTP Listener will only intercept
j> requestion like so:

j> http://localhost:2352/folder/somefile.swf

j> Please tell me I'm wrong.

Nope, IIRC HttpListener works only with http:// or https://

For arbitrary paths you can try to write BHO or shell extension for the explorer,
however I do not think this will work.

also you can write your own web server that will handle othere schemes like "my-file://" etc.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
Very interesting lewis,

Looks like I have alot of reading to do.

Would creating an application based protocol solve both problems?

The 2 problems being intercepting requests on localhost and regular
file requests from the file system.

James
 
Looks like I have alot of reading to do.
Here is a better place to read -
http://msdn.microsoft.com/workshop/networking/pluggable/overview/appendix_a.asp...

I used this with the suggested note.cmd file an got it working by
Start->Run(notepad:X:\hello.txt) and IE address bar(notepad:X:\hello.txt)...
The 2 problems being intercepting requests on localhost and regular
file requests from the file system.
I see this as the same thing except there is an localhost extra mapping step
that should be done for you by the LAN/INET networking part of Windows which
then resolves to right CMD on the right LAN/INET system. "localhost" is a
build replacement for the IP address of 127.0.0.1 or yours & my computers
loopback adapator...

[note: next I refer back to your([email protected]) 1st msg of your NG
thread - note the ">> [YourTextHere]"]...
Does IE open here for the HTML file if so then IE will already map relative
paths you could map a protocal say "myhtml" to open IE with the path to a
HTML file and IE may map the mynextpage.html link to
myhtml:<samepath>/mynextpage.html.

I don't know shockwave so no help there and EXE depends on the EXE but
VS.NET does work the same as above link cause you can Start->Run the same
ms-help://folder/file command that is in the VS.NET help address bar and IE
pops up the page(must allow the ActiveX controls first) and you can click
links on page and View->Source(in IE) show these are relative links(using
ms-help://) to the local content...
 
Back
Top