I've got a webbrowser control in a winforms application which automates a tedious form completion process involving hundrends of records each time.
My problem is that I get an unspecified javascript error (code:0) only when I run the application.
The script won't crash when I use IE11.
I've implemented the required registry changes (FEATURE_BROWSER_EMULATION - I use 11000 for IE11).
The application used to work error free with IE9 (9000) and IE10 (left it with 9000 which worked).
I've read elsewhere that there may be a problem with asp.net recognizing IE11 but I can't find a fix for my system (Windows 7 64bit) and I don't want to just supress the script error because it also causes huge delays (it's probably the error since I had no such problems with the older IE versions).
I've read similar questions on the internet but no answer that fits my case was sufficient. For the time being I've set the ScriptErrorsSuppression to true but I'm not happy with that. Any ideas?
Related
I create a sipphone using CefSharp and WPF. Until some time everything worked, but today I got the error "TrackStartError", although I did not change anything in the code. I checked to see if this works in "CefSharp.MinimalExample.Wpf" and it does not work there either. However, in the browser Chrome still works.
For verification, I performed in the console CefSharp Devtools:
enter image description here
In this question it is said that "at the level of the operating system, browser or web page, there was a hardware error that prevented access to the device." What could be the reason for this? And how to fix it?
If this is due to the fact that some application has seized control of the microphone, how I can determine this application?
P.S. Sorry for my bad English
I found the source of the problem. In my case, the microphone was blocked by an antivirus (Kaspersky endpoint security).After disabling it, the error disappeared.
If I pass a website into the browser constructor like:
ChromiumWebBrowser MyBrowser = new ChromiumWebBrowser("www.google.com");
Google will load. However, after initializing the browser, calling
MyBrowser.Load("Example.com");
Gives a blank screen. I have events tied to FrameLoadEnd, which fire when google finishes loading, but don't fire at all after the call to Load, which means that the webpages are not even being loaded offscreen.
I've spent a long time working on the issue but I can't find a solution. I've downloaded the packages through NuGet, installed VC 2012 Redistributable, initialized CefSettings, switched to x86, etc. I'm not sure what I'm doing wrong other than possibly misunderstanding the way this method is meant to be used. It's also possible that I'm not copying the right files to my output directory, but I do have CopyLocal = True on all of my references.
It might be important to note that my browsers are implemented programatticaly, as opposed to being dragged and dropped into the WinForms Designer. This is pretty necessary for my code, as I have a large number of browsers sort of crawling the web and showing pages to the user, hence the need for a reliable load method.
Here is a sample of my debug.log from my release folder, edited to remove too many duplicates:
[0826/130205:WARNING:resource_bundle.cc(304)] locale_file_path.empty()
...
[0826/131439:WARNING:resource_bundle.cc(304)] locale_file_path.empty()
[0826/134434:ERROR:renderer_main.cc(212)] Running without renderer sandbox
...
[0826/135650:ERROR:renderer_main.cc(212)] Running without renderer sandbox
[0826/135658:ERROR:ipc_channel_win.cc(136)] pipe error: 109
[0826/135921:ERROR:renderer_main.cc(212)] Running without renderer sandbox
...
[0826/135921:ERROR:renderer_main.cc(212)] Running without renderer sandbox
[0826/135933:ERROR:ipc_channel_win.cc(378)] pipe error: 109
[0826/135933:ERROR:ipc_channel_win.cc(412)] pipe error: 232
[0826/140141:ERROR:renderer_main.cc(212)] Running without renderer sandbox
...
[0826/140141:ERROR:renderer_main.cc(212)] Running without renderer sandbox
[0826/140148:ERROR:ipc_channel_win.cc(412)] pipe error: 232
Unfortunately Load fails silently if the browser isn't initialized. The next version is a major rewrite, which will throw an exception, so you'll know immediately what's going on. If you hook the IsBrowserInitializedChanged event you should be able to safely call Load after it fires.
https://github.com/cefsharp/CefSharp/blob/cefsharp/41/CefSharp.WinForms/ChromiumWebBrowser.cs#L233
The current version as at writing is 41.0.1.
Next version will be 43.0.0 (There is already a -pre release on nuget.org, though it's not quite ready for prime time yet)
I've got a very bizarre situation. It appears that, when I load a webpage to my browser,
multiple threads (at least 2) are starting up. The app loads and runs fine on a
Windows XP box, but when I try to run it on my Windows 8 laptop it would seem that
more than one startup event is taking place and causing all kinds of collisions. This
is happening with both Firefox and IE.
To verify this behaviour, I placed a static int within a class, checked it to see if its
value is greater than zero, throw an exception if it is, then increment the int.
Of course, the exception is thrown.
What's very weird about this is that there is no multi-threading/multi-tasking involved
within my app.
When I "touch" the DLL for the webpage (rebuild it), it renders the webpage properly,
but the source for the webpage ("right click" > "View Page Source") has the source
for the unhandled exception webpage, with the message for the exception that my code
throws when the thread count is greater than zero.
I've tried creating a new project, then linking the code to it (Add Item ... Ad As Link),
then building it. It didn't do any good.
The Win XP system has IIS 6 with .NET 4.0, and the Win 8 laptop has IIS 7 with .NET 4.0.
Language is C#.
The truth is that I'm pretty much clueless about IIS.
I hope someone smarter than I am (which isn't saying much) has an idea as to what
is going on.
It appears that, when I load a webpage to my browser, multiple threads (at least 2) are starting up
Maybe onetime initializations. I doubt that every request causes an additional two threads to stay around.
it would seem that more than one startup event is taking place
That's normal This event fires for each instance of HttpApplication being created. This is basically a design error in ASP.NET. They thought that pooling HttpApplication instances and assigning one of them for each request was a good idea. It would have been better to have a singleton per AppDomain. Write this yourself. Like that:
class MyGlobalAppState { ... }
static Lazy<MyGlobalAppState> state = new Lazy<...>(StateFactory);
Be aware, that Lazy<T> stores any exception and just rethrows it. This causes your app to be permanently broken in case StateFactory throws. It will never recover without pool restart. This is a design error in Lazy<T>. Find a way to deal with that.
but the source for the webpage ("right click" > "View Page Source") has the source for the unhandled exception webpage
Some browsers re-GET the page to view the source. This can be annoying or handy.
It is hard to tell what is causing this behavior but as others suggested try to use Fiddler or any other http tracing tool to see what requests are sent.
Also, Win XP should be running IIS5.x while Win8 should be running IIS8.
By default IIS8 AppPool should be running with the integrated pipeline, which may behave differently. I would try changing the AppPool to use the Classic pipeline to see if it makes a difference.
I'm working on a .NET 4 WPF application, and just the other day, came across a very peculiar bug. I have three Windows 7 Pro machines involved: laptop (1366x768), desktop (1680x1050, multi-monitor), and the remote machine (resolution unknown). Our application is installed on the remote machine.
Consider the following events: I remote desktop into the remote machine from my laptop, start our application, and launch a particular feature (an mdi child) within the application. If I connect to the same remote session from my desktop (thus closing the session on my laptop), this feature within my application becomes completely unusable. By unusable, I mean combo box drop downs are showing in the top/left corner (much like what's described here), other controls aren't laid out correctly, and some controls don't even show at all. Mouse coordinates appear to be off in that clicking certain controls no longer invokes the appropriate actions. It's the strangest thing I've ever seen.
If I close the application and launch a new instance on my desktop, things work great. Also, it only seems to happen when I launch the feature on my laptop, then move to the desktop. Never the other way around.
I wish I could show some code, but I don't really even know where to start or what to show. I can say that it only happens on certain features. Some features handle the resolution change perfectly.
Has anyone else seen these types of symptoms? Or know what could cause them or how they could be fixed?
This is a little embarrassing. After a few hours of "process of elimination", I found that another developer had added some unmanaged code to automatically maximize the window. The approach they followed is documented here. This approach does not work through remote desktop sessions. Lol.
I have build an app which shows two direct show graphs in parallel. This application uses WPF, therefore I evaluated different solutions, like WPFMediaKit (http://wpfmediakit.codeplex.com/) and AVCapWPF(https://wpfcap.codeplex.com/).
Both solutions normally works fine. But sometimes i get a grey error window (which looks a lot like Windows 2000) with some information about CPU (but old CPU information, seems like the actual CPU was not known, when this error message was designed) and loaded Dlls, but no error message at all. The title of the window is simply "Error".
The problem is the error occurs sporadically, so I am not sure, whether I know all occurrences, but the following error cases are known:
Error occurs somewhere when building the direct show graph which results in only one graph loaded and displays
Error occurs before both graphs were built, which results in both graphs loaded and displayed
Error does not depend of the used filter in the graph. For rendering the frameworks uses different renderer and the source filter where switched as well, mostly using Montivision DemoSource.
I could only produce the error when both graphs were rendered but could also not find a possibility to produce it regularly.
When the error window is closed, the whole application is finished (crashed). It is impossible to catch the error in .Net. It seems like it comes from a system library.
Error Window Text:
OS: Workstation, SP1
CPU: GenuineIntel, Intel Pentium III Xeon, MMX # 2490 MHz
Module name: D:\[...]\bin\Debug\TestApp.exe
Application data:
VmVyc2lvbjogV2t4dGJIZHFVbTEyYkdsb0oxRmhiR3htS2xwaWUya3N
TMlJpZW1wOVRUd3hTaU0rTXlJNE5DTTVOaVpLT3pnVkUwSXJOQzRxUE
... (a base64 encoded list of loaded dlls)
I hope someone knows that error and a good solution for avoiding it.
Did you tried to run app on clean Windows installation and without Montivision etc. usage?
Also, please show list of used DLL's and graph screenshot.