Taewon Lee, links to a good code base that does what you want
From: jOs (rocksolidrobot_at_yahoo.com)
Date: 07/14/04
- Previous message: Jason Cone: "Re: onclick handler and automation"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 15 Jul 2004 03:48:27 +1000
JOB: Adjust security for C# App hosting WebBrowser
I have taken the code from Chapter 8 of Ted Faison's book
"Component-based Development with Visual C#" and now have a
.NET Windows Forms Application WebBrowser Written in C#.
Here is a description of the app so far...
1. The C# App returns properties, methods, and strings to the
html pages via window.external.somemethod("etc")
2. 100% of the useable Form area displays the WebBrowser contol
3. Graphical User Interface will be done using html pages+script
Here are 3 tasks that need to be done...
1. Lower the Security setting to the Level of a HyperText Application (HTA)
so that that we don't get any more "An ActiveX control on this page might
be unsafe to interact with other parts of the page. Do you want to allow
this interaction?" pop-ups.
2. Surpress Script Errors and log the Time, FileName, LineNumber, and Error
Message to an xml file.
3. Helper functions/references to marshall the Custom method return values
into JScript types. Make it so C# can send all the different kinds of
JScript objects :: Arrays, Automation, XML docs, Dates, Objects (strings,
boolens, and numbers already work ok) via the window.external.whatever()
Links for this project:
email me for a zip conatining the C# App.
The code base for this project was obtained from:
http://www.faisoncomputing.com/samples/programming_samples.htm
http://www.faisoncomputing.com/samples/CSharp/MyCustomWebBrowser_3.zip
The topic for this project is "WebBrowser Customization".
I have not yet found a working C# implementation of
URL Security Zones, IInternetHostSecurityManager,
GetOverrideKeyPath, or what ever it is, that allows
ActiveX alerts, and script Error Dialogs to be turned off.
Newsgroup searches suggest that several people have found a
way to do it, but they have gone incommunicado.
If there is a better (more inclusive, or concise) code base than Ted's
(for a C# mshtml WebBrowser) that meets the requirements in point (1)
then I would be happy to switch over and move on with the many other
(more interesting) things that need to be added to the App.
Thanks for considering this work request, I am willing to pay for work
done and would like to hear from people who can do it.
rocksolidrobot@yahoo.com
Joshua Donnelly,
Brisbane Australia
- Previous message: Jason Cone: "Re: onclick handler and automation"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|