Silverlight application crashes browser refresh - silverlight

I just upgraded application to VS2012. Same SL5, just upgraded to async/await.
Everything seem to be working, but I can't restart application by refreshing browser. It goes white screen which I assume indication that it crashes. But how do I figure out why it is doing it?
EDIT: Very very stange. I just noticed if I click on address line in IE10 and hit enter - it refreshes just fine. If I hit refresh button (round arrow) - it goes blank.
I assume this is different "refresh types" in IE?!

It is a bug in IE and silverlight plugin
You can refere to this website: (https://connect.microsoft.com/VisualStudio/feedback/details/789004/ie10-shows-blank-page-upon-refreshing-silverlight-app)
Cheers

Related

Black screen appears when the CEF Winform Browser loads for the 1st time

I am using CEF Sharp - V86
I am getting this strange issue and our users have starting complaining about it.
When the cefsharp winform browser loads for the first time, it shows the black window for few mili-seconds and then it disappears.
If we reload or refresh the webpage, it does not happens.
We have recently upgraded from V79 to V86 and we did not had any issue in earlier version.
What i have tried so far is, tried setting below command line arguements but it didn't work.
settings.CefCommandLineArgs.Add("disable-gpu");
settings.CefCommandLineArgs.Add("disable-gpu-compositing");
I have also tried setting
Cef.EnableHighDPISupport()
But it didn't work.
Additional Info :
Checked with Latest Version - CefSharp V88
When we load CefSharp winform browser in wpf application using winform host, a black screen appears on load for the first time for few miliseconds and then disappears.
This was not happening in earlier version.(i checked with V79 till V83).
Steps to reproduce.
Create a sample wpf application ,use windowsformhost to load cefsharp winform browser.
In constructor of winform browser, use any url. I tested with www.google.com.
Run the application.
Notice the initial black screen appears for few miliseconds and then disappears.
Please note this happens only for the first time when the chrome winform load.
his seems to have broken from CEFSharp v84.
Any help will be appreciated. :)
I was able to get rid of the black flash. Once I removed it from the VS Form Designer, things got better. Define it as a form level object:
private ChromiumWebBrowser cwbPage;
Then in the form constructor, instantiate it and add it to a panel in the form:
cwbPage= new ChromiumWebBrowser("");
cwbPage.Dock = DockStyle.Fill;
this.pnlPanel.Controls.Add(cwbPage);
cwbPage.BringToFront();
//...add any event handlers
Finally, pass it the string of Html or navigate to the url:
cwbPage.LoadHtml("<html><body>This is a test.</body></html>");
//OR
cwbPage.LoadUrlAsync("https://www.google.com");
Notes:
It still takes about 3 seconds to load the content, but at least there is no black flash.
I experimented and tried going back to using the VS Form Designer, and the black flash came back. I stripped almost all of the properties away from it in the VS Form generated code, but it still flashed blackly. So it does not like using the Form Designer.

angularjs site works only with developer tools is open

I have develop a web site using angular.
My surprise is when I access the site in Chrome without the inspector.
The page seems be frozen. nothing works.
The problem was about the screen resolution. Not about the chrome inspector.
When the chrome inspector was down, so the screen get bigger and the problem arises.

Silverlight copy dialog makes IE11 freeze

We are having problem with a Silverlight 5 app and IE11.
Suddenly, it's no longer possible to copy-and-paste from a Silverlight application to the clipboard, after upgrading to IE11.
When the Silverlight dialog that asks you for the right to access the clip-board appears, then IE11 freezes. This behaviour has also been verified on IE11 och two different Win 8.1 computers.
We have also tried to add the site to trusted sites, and 'Allow programatic access to clipboard" to Enabled. But it dosnt help.
Any suggestions?
Anyone knowing if this is something Microsoft is addressing?
/Erik
Ran into the same issue, running IE as administrator ended up clearing up the freezing issue.
From there you can then check the box to [remember my answer], click [yes] to allow clipboard access for this site, then restart IE (non-admin) and it won't freeze when accessing the clipboard.

How to tell if IE9 is forcing a page reload

Is there any circumstance that would cause IE9 to force an unrequested page reload? If so how can I tell that this is occurring? Is there a log I can look at or custom event I should be looking for in event viewer?
I am troubleshooting an issue with an AngularJS web application that only exists in IE9, it works fine in newer version of IE and works on FF, Safari, Chrome. When testing in IE9 I see no errors in the console but I am getting redirected to my applications login page. This redirection always happens on a page reload, hence why I think IE9 is forcing a page reload.
You can track navigation events, and the subsystems that invoke them, using the Network tool in Internet Explorer 9's F12 developer suite. Press F12, switch to the Network tab, and press "Start Capturing". From this point on, any further navigation events will be logged for your inspection.
Internet Explorer 9 uses an older version of the F12 developer tools, but you can still access the historical documentation for those on the Microsoft Developer Network.
The modern documentation for IE 11 is also available online, and much of what is shared about the Network tool in particular is still helpful even if you happen to be using Internet Explorer 9.

Silverlight app disappears on page refresh in IE10

UPDATE: There is a workaround to the problem. It is to force IE10 into compatibility mode by including one of the following meta tags:
<meta http-equiv="x-ua-compatible" content="IE=7" />
<meta http-equiv="x-ua-compatible" content="IE=8" />
This is not really a perfect solution for various reasons, but it eliminates the problem at least.
ORIGINAL QUESTION:
I realised a couple of months ago that there is a problem with our Silverlight application in IE10 on Windows 8 (I have not tried the IE10 preview for Windows 7). When the asp.net page hosting our SL app first loads everything works fine and the application loads as expected. If I refresh the page immediately, it also reloads as expected. But: If I focus the Silverlight application by clicking in it and THEN hit F5, it just goes blank. It is like the plugin disappears completely. If I trace the requests using Fiddler I can see that no request is issued for the xap file. I have been hoping that this would be fixed in a patch release for IE10, but so far nothing has changed. I cannot find any information about this when I try googling it. It seems highly unlikely that I should be the first person to discovered it and I am quite surprised that I am not finding more information. To reproduce the issue:
Create a new Silverlight application
Add some sort of content to MainPage.xaml, like a Button or whatever
Run the app in IE10 (on Win8)
Click anywhere within the Silverlight application. This is just to focus the plugin.
Refresh the page (F5)
Result: The Silverlight application does not load and the page is blank.
A few observations:
After the steps above, no amount of refreshing will bring the application back.
After the steps above, if I re-enter the url into the address bar and hit Enter, the application loads as expected.
If I enable Compatibility View in IE, the app also loads as expected. Nothing I do will reproduce the bug when compatibility view is enabled.
Now to my questions:
Has anyone else observed this behaviour?
If so, have you found a workaround?
I'm seeing the same issue with my Silverlight application in IE 10.
I've tried adding the IE 8 compatibility meta tag suggested above, but this does not resolve the problem consistently. It seems to work only intermittently, after say every 5th refresh attempt?!
The only way I can see to work around this consistently is to force the Browser Mode into "IE 10 Compatibility View", and I don't think this can be done via page content (meta tag, etc.)? I've had to remove the IE 8 compatibility meta tag so that the "Compatibility View" button is available in the address bar, and then ask users to click the compatibility button, which is then remembered for the site. This results in the browser entering Browser Mode: "IE 10 Compat View" and Document Mode: "IE7 Standards". The refresh behaviour then works consistently as expected and as it used to.
This is a big problem for us. We've built our Silverlight app such that the browser refresh button is used to refresh pages/content within the app (the users stays logged in, etc.). It's really bad that we have to ask users to set our site to run in compatibility mode for the refresh functionality to work as expected.
Note that this still works as expected in Chrome. It seems silly that we might need to recommend that our users use Chrome because of this issue!
UPDATE:
A workaround for this seems to be to always load the Silverlight object into its hosting page dynamically using JavaScript.
E.g.
function onLoad() {
var silverlightControlHost = document.getElementById("silverlightControlHost");
silverlightControlHost.innerHTML = "<object ...
UPDATE 2:
Here is the latest code I use to work around this issue:
...
function unloadSilverlight() {
document.getElementById("silverlightControlHost").innerHTML = "";
}
function focusOnSilverlight() {
document.getElementById("silverlightObject").focus();
}
function onLoad() {
window.onbeforeunload = unloadSilverlight;
setTimeout(focusOnSilverlight);
}
</script>
</head>
<body onload=" onLoad() ">
...
I still had issues with the solution presented by Chris.
This works perfectly for me though:
window.onbeforeunload = function () {
var silverlightControlHost = document.getElementById("silverlightControlHost");
silverlightControlHost.innerHTML = "";
}
I solved the problem in a very easy way. I Wrote a javascript code at the end of the page (or after the object tag in where is your silverlight app) and set the focus to another element, for example, a link. Example:
<object id="silverlightHostControl">...bla bla bla</object>
<script type="text/javascript" language="javascript">
var shc = document.getElementById("silverlightHostControl");
document.getElementById("myLink").focus();
</script>
The shc var is useless, I put just for clarify. Remember: your javascript code must set the focus to another (but focusable) object AFTER the silverlight app object tag was parsed, which means your js code is writen after silverlight app object.
In answer to your question #1, this is happening with our Silverlight apps as well. The only workarounds are 1) restart the browser or 2) switch to compatibiity mode.
It apparently is a bug in ie10.
Thanks for all workarounds solution but this is obviously a bug with Silverlight plugin.
We have raised few tickets directly with Internet explorer development team and they said the issue is from an external problem. It is not a good answer from Microsoft.
Anyway, this time our developers raised ticket through Silverlight development team which still waiting for their response. To get a good response from them, we need to get more people who are facing this issue.
You can vote this issue from Connect website which is Microsoft's official bug reporting platform.
The link to our ticket is: http://connect.microsoft.com/VisualStudio/feedback/details/789004/ie10-shows-blank-page-upon-refreshing-silverlight-app
Cheers
Moh
Yeah i am also facing same issue with one my application. If i opens help of my application in IE 10 then i have to refresh the page each time to view the contents.
I have two workaround for this issue:
1. Press ALT key once
2. Open IE in compatible mode

Resources