Async Pluggable Protocol vs. WebRequest Pluggable Protocol

Async Pluggable Protocol vs. WebRequest Pluggable Protocol

Post by Pete Davi » Mon, 12 Jan 2004 06:55:34


I have a C# app that needs to work with its own uri scheme. Instead of
http:,
I'm going to use wwkb:

I will register my uri prefix to run my app, and it only needs to be
available when my app is running.

Here's where it gets tricky. wwkb: will retrieve HTML from a database. I'm
going to have a web browser control in a window and I want to retrieve the
HTML from the database and then display it in the web browser. The links in
the HTML will be converted to wwkb: links instead of http links, so the web
browser needs to be able to accept that.

Will overriding WebRequest do this and if so, is there any sample code
anyone can recommend? The MSDN docs haven't been great on this.

I'd rather not go with the Async Pluggable Protocols architecture, if
possible since it looks like there are some issues implementing the COM
components properly in managed code.

Thanks.

Pete
 
 
 

Async Pluggable Protocol vs. WebRequest Pluggable Protocol

Post by Christoph » Tue, 13 Jan 2004 00:02:11

Hi Pete,

in
web

I guess the question is how sophisticated the patched WebBrowser needs to
be. If it is only displaying HTML w/o user interaction, then you're fine off
feeding DB HTML content into the browser. However, if you need advanced
features like pictures, frames, cross-domain links, etc. you might be better
off with an App.

If you're interested, I successfully created a C# Namespace handler, which I
could send you. In that case you would not even have to use your own prefix
(for example if you store HTML pages that are saved from a webserver). Just
intercept any download requests and replace them with HTML content.

CU Christoph

 
 
 

Async Pluggable Protocol vs. WebRequest Pluggable Protocol

Post by Pete Davi » Tue, 13 Jan 2004 00:55:45

Christoph,

Thanks for the help.

Actually, I ended up having to go with an Async Pluggable Protocol. I'm
writing it in C++ for now just to avoid any interop issues that might come
up. In the future I'll endeavor to rewrite it in C#, but for now this should
do the trick.

There were several problems that came up that Asyc Pluggable Protocols
fixed. On was that I was wrong, and I do need it to function when my app
isn't running. That was the big one.

Anyway, I'm writing it now and it's coming along pretty well. If I run
into problems, I'll post 'em here.

Pete


I'm
the
off
better
I
prefix
Just