I'm using a WebBrowser control in a Windows .NET form to display a list of
file links that open up local PDF files. Basically I dynamically create the
HTML and load it into the WBC using the DocumentText property. The problem
is that the links don't work.
After some investigation, I've found that my problem is tied to the new
security in IE as a result of SP2 in Windows XP. You can no longer open up
local file links in anything other than the My Computer security zone.
Further, I've researched the "Mark of the Web" (MOTW) stuff, and it looks
like it might have what I need, but I'm trying to figure out if there's a
MOTW syntax that I can use when loading dynamic HTML into the DocumentText
property of the WBC so that it acts as if it's in the My Computer zone...?
For reference, here the basic HTML that I'm creating and loading into the
WBC:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN" >
<!-- saved from url=(0003)C:\ -->
<HTML><HEAD></HEAD>
<BODY>
<A HREF="C:\Temp\Test.pdf" TARGET="_blank">This Doesn't Work</A><BR><BR>
<A HREF="\\ComputerName\C$\Temp\Test.pdf" TARGET="_blank">This Does
Work</A><BR><BR>
</BODY></HTML>
Notice that I have a MOTW on line 2, but I don't think it's working -
probably because I just guessed at what work. Also, the paths that are UNC
type paths work fine, but local paths do not - even when pointing to the
same file. This is a "symptom" of the SP2 stuff.
Any ideas?
Thanks,
Chris