Roman Pelepei gives smart answers on questions about C# .Net, ASP .Net, WPF and Silverlight programming with examples and source code.
суббота, 23 апреля 2011 г.
Webbrowser Control Screenshot works in ASP.Net Dev Server but not IIS
Quick Overview: Webbrowser control that takes a screenshot of a website and converts it to a bitmap works in ASP.Net Development Server but not when deployed to IIS 7. When in IIS, the bitmap will display "Navigation to the page was canceled."
IIS server (Win Server 2k8 R2) is on corporate domain (firewall cannot be disabled as it is controlled by Group Policy)
I inherited the app from another developer so the below code is not my own
The screen capture works on a different server (Win Server 2k8) with identical settings (as far as I can tell) in IE, IIS, Firewall, User Account Permissions, and Folder Access
No events are thrown (through Event Viewer)
App pool - v2.0, Integrated, Network Service (account needed as an SSRS report is generated (using the screenshoot) using the same account)
I feel this has to be a permission's issue on IIS as I am able to grab a legit screenshot from my ASP.NET Dev Server or when clicking a hyperlink (with the same web address) within the app but I do not know what other settings to check. Any help or suggestions would be greatly appreciated
Code (most) to capture screenshot and convert to bitmap: