views:

341

answers:

2

Anyone know of a good sample implementation of a Pluggable MIME Filter for IE, preferably implemented in C#? Or of a pluggable protocol handler?

thanks!

So far I have found

+1  A: 

http://www.codeproject.com/aspnet/AspxProtocol.asp is my favorite. Note, however, that using .NET for a protocol handler is generally going to incur a pretty significant performance cost, and there may be a versioning problem if there are other .NET-based components attempting to run in the browser that require a different version of the CLR.

http://www.codeproject.com/KB/IP/DataProtocol.aspx is another option.

EricLaw -MSFT-
+1  A: 

After working with Microsoft support for a couple of weeks, we determined that MIME filters written in .NET do not work correctly. There appear to be a number of thread-safety issues in the interop layers that cause random crashes of IE.

I've reimplemented my MIME filter in C++ following the same sample you linked to above, and it works fine.

Greg
Thanks for the tip! Any chance you could post or email a sample?
Rory
The Microsoft sample is as good as anything I could provide. I'm pretty much just using different code in the IInternetProtocol::Read() method that does what I need my filter to do.
Greg