Windows 8 OutputPanel behavior - hyperlinks not opening
I recently picked up a new Windows 8 machine. Running some of my scripts on the new box, I have observed that any hyperlinks that I dump to the outputpanel do not open the links when I click on them. In particular, I am seeing this occur with file:// links. If I export the OutputPanel results to a html file and open that file in a browser, the links open fine. I suspect some sort of UAC limitation, but I'll be darned if I can locate a setting. Anyone see this behavior too?
this script exhibits the behavior
void Main()
{
Util.RawHtml("http link to LINQPad.net works from outputpanel").Dump();
Util.RawHtml(@"file link to C:\Users does not work from outputpanel").Dump();
}
this script exhibits the behavior
void Main()
{
Util.RawHtml("http link to LINQPad.net works from outputpanel").Dump();
Util.RawHtml(@"file link to C:\Users does not work from outputpanel").Dump();
}
Comments
-
sorry... pasting script did not produce anticipated result.
-
Correction to my description of the behavior of links dumped to the outputpanel. It is only the file:// links that are displaying the behavior where the links are not opening an explorer window ( as they did on win7 or winxp ).
-
More information..... running in windows 8 pro..... LinqPad v 4.43.02
-
If you right-click the results window and choose properties, what does it say under 'Zone'?
-
Under 'Zone' ....... Internet | Protected Mode: Off
Also noticed that Util.RawHtml takes my href=file:// and emits href:file:///
Adds a forward slash.
Also... updated to latest beta.. same behavior (v 4.43.05) -
Starting to think this is definitely environmental. Using exact same script on my XP machine NOW does not upenthe file lnks.... suspect some sort of security oriented win update. Still seems odd that exporting the output panel to html and then opening that html file in browser... the file links work. Head scratcher.
-
Another thing I intend to check.... Now that I am seeing the same behavior in OS versions other than Win 8..... Since I tend to grab the LP betas and run the most current version, it occurs to me that this may have been introduced to LP some time over the past month or two. I will go back to an older version of LP to see if this behavior is exhibited there.
-
Tested v4.42.1.0 ... which was created back in the May/2012 timeframe. Same behavior exhibited.
I KNOW this behavior did not occur back then. Further, I am using scripts that have been unchanged since then as well.
This would seem to further support my assertion.suspicion that this is an environment issue... some update to IE or something. -
May have identified a workaround. After saving results to html.... I can load up the file via Util.DisplayWebPage(string PathToFile). Interesting what the behavior is.... behaves more like a file explorer pane.
In order for this workaround to work... I would need to automate the saving to html step... so I need to get a hold of the results html that is dumped to the outputpanel. Is there a way I can do that? -
Another thing I noticed.... In Win 8 file explorer.... displaying the html files with the preview pane feature.... same behavior exhibited... file links do not open..... http links do.
-
Another thing I noticed... when the exported result pages in IE10... I am notified that IE is restricting the page because of scripts or ActiveX.
-
Joe - Are you seeing the same behavior?
-
I notice that there is a different zone value when showing the properties of the saved html page.... output panel properties shows Internet | Protected Mode: Off.... while the saved page shows My Computer | Protected Mode: Off
-
joe... I would like to try to debug this by trying to replicate the problem in a design environment. can you tell me what control is used to present the html output? thanks.
-
LINQPad uses the Windows Forms WebBrowser control. It puts data in there by assigning the DocumentStream property.
-
Thanks Joe.
Good news is that I am able to reproduce the behavior in a design environment. As I have only VS2012 installed on my new machine, I am using the later version of the WebBrowser control. In this newer version, the DocumentStream property is no longer available. However, there is a NavigateToStream method that takes the stream as an argument.
That is a start. I will try some things and will be sure to post new information if/when I come across something. -
Found a hack.... may provide some insight. I must admit to not having much understanding of the inner workings of the webbrowser control. So more reading will be needed.
HACK : alter the URI specified by the file:// links.
instead of file://c:/whatever
make it file://127.0.0.1/c$/whatever -
That makes sense as the web browser control isn't fully featured like a Firefox or IE. they know how to handle a file:// protocol and the minimal web browser control doesn't. Don't know if there's a way to extend the control to handle it, but then you wouldn't probably be able to get it into LinqPad anyway.
-
CL- thing is with the same version of LINQPad, the web browser control works fine on Win7.... so I am more suspicious of something having changed in the Win8 environment.
With regard to this vexing issue... my to do list top item currently has investigating this as the root cause...... security based settings.... http://technet.microsoft.com/en-us/library/cc782928.aspx
If anyone that is already familiar with this lockdown stuff can pipe in here with some guidance... that would be wonderful.