Link to .NET 4.0 ClickOnce Install broken in newer Internet Explorer (on Windows 8.1)

I had a link to the Publish.htm page that is created when you publish a ClickOnce application with Visual Studio 2010.

Just, <a href="file://///StoreServ/common/WorkforceOneSignature/Publish.htm" target="_blank"><img src="images\signature248.gif" width="248" alt="" /></a>

That would open the page with the "Install Button" to install the VB.Net application.  Everything worked fine in Internet Explorer on Windows XP and still worked on Windows 7.  On Windows 8.1 with Internet Explorer 11, the link no longer works... not even with the five forward slashes.  

It does still work on Win 7/IE 10.

The page I need this link on has a <asp:Content> block and a MasterPageFile.  Just so you know.

This bare bones Publish.htm page launches the application just fine even in the new browser, but I can't figure out how to get the button to work when I try to put the button .js and markup code directly in my page (since the link to the Publish.htm doesn't work).  I think the issue with this approach is that my page doesn't have a <Body> tag (that's in the master.page) to put the <Body ONLOAD ="InitializeButton()"> in.

<HTML>
  <HEAD>
    <TITLE>Email Signature Editor</TITLE>
  

<SCRIPT LANGUAGE="JavaScript">
<!--
runtimeVersion = "3.5.30729";
checkClient = false;
directLink = "CareerSourceBrowardSignature.application";


function InitializeButton()
{
  if (HasRuntimeVersion(runtimeVersion, false) || (checkClient && HasRuntimeVersion(runtimeVersion, checkClient)))
  {
    InstallButton.href = directLink;
    BootstrapperSection.style.display = "none";
  }
}
function HasRuntimeVersion(v, c)
{
  var va = GetVersion(v);
  var i;
  var a = navigator.userAgent.match(/\.NET CLR [0-9.]+/g);
  if(va[0]==4)
    a = navigator.userAgent.match(/\.NET[0-9.]+E/g);
  if (c)
  {
    a = navigator.userAgent.match(/\.NET Client [0-9.]+/g);
    if (va[0]==4)
       a = navigator.userAgent.match(/\.NET[0-9.]+C/g);
  }
  if (a != null)
    for (i = 0; i < a.length; ++i)
      if (CompareVersions(va, GetVersion(a[i])) <= 0)
                                return true;
  return false;
}
function GetVersion(v)
{
  var a = v.match(/([0-9]+)\.([0-9]+)\.([0-9]+)/i);
  if(a==null)
     a = v.match(/([0-9]+)\.([0-9]+)/i);
  return a.slice(1);
}
function CompareVersions(v1, v2)
{
   if(v1.length>v2.length)
   {
      v2[v2.length]=0;
   }  
   else if(v1.length<v2.length)
   {
      v1[v1.length]=0;
   }

  for (i = 0; i < v1.length; ++i)
  {
    var n1 = new Number(v1[i]);
    var n2 = new Number(v2[i]);
    if (n1 < n2)
      return -1;
    if (n1 > n2)
      return 1;
  }
  return 0;
}

-->
</SCRIPT>

</HEAD>
  <BODY ONLOAD="InitializeButton()">

<!-- Begin Buttons -->


<TABLE CELLPADDING="2" CELLSPACING="0" BORDER="0" WIDTH="540" STYLE="cursor:hand" ONCLICK="window.navigate(InstallButton.href)">
  <TR>
    <TD ALIGN="LEFT">
      <TABLE CELLPADDING="1" BGCOLOR="#333333" CELLSPACING="0" BORDER="0">
        <TR>
          <TD>
            <TABLE CELLPADDING="1" BGCOLOR="#cecece" CELLSPACING="0" BORDER="0">
              <TR>
                <TD>
                  <TABLE CELLPADDING="1" BGCOLOR="#efefef" CELLSPACING="0" BORDER="0">
                    <TR>
                      <TD WIDTH="20">
                        <SPACER TYPE="block" WIDTH="20" HEIGHT="1" />
                      </TD>
                      <TD>
                        
                        <A ID="InstallButton" HREF="setup.exe">
                          Install
                        </A>
                        
                      </TD>
                      <TD width="20">
                        <SPACER TYPE="block" WIDTH="20" HEIGHT="1" />
                      </TD>
                    </TR>
                  </TABLE>
                </TD>
              </TR>
            </TABLE>
          </TD>
        </TR>
      </TABLE>
    </TD>
    <TD WIDTH="15%" ALIGN="right" />
  </TR>
</TABLE>

  </BODY>
</HTML>

Open in new window


So, what I'm looking for is either how to get a hyperlink to the Publish.htm or even the MyClickOnceApplication.application or Setup.exe file (all located on a network share, \\StorServ\) to work,

or

how to get the JavaScript function "initialized" in my page with no "<Body>" tag.

I have tried putting the JavaScript on the page and tried putting this at the top of the page and tried it at the bottom of the page.  Neither worked...

<script language="javascript" type="text/javascript">
       document.body.onload = InitializeButton();
</script>            

Ultimately, I just need to launch the application from our Intranet main page.  The link used to work, When you click on it in IE 11 it doesn't do anything.  The link never worked in Google Chrome, just IE.            

P.S.  I've already tried what I've found using Google.  That's why I'm turning to the Experts-Exchange.

Thanks.
LVL 1
megninAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jacques Bourgeois (James Burger)PresidentCommented:
What error message do you get?

Why 5 slashes? You usually use 2 to reference a server or a remote computer. It might be that older versions of Internet Explorer corrected that mistake and version 11 does not.

Your Win 8.1 computer might not have the proper rights on the server.
megninAuthor Commented:
No error messages.  Clicking on the link just does nothing.  I stated that.

5 slashes is new(ish).  I think the three slashes tell that it's a UNC path and the other two for the normal http://.  With 5 slashes, what's displayed in the status bar at the bottom of is a normal http:// link with 2 slashes.  It all (all) works on Windows 7 machines.  Only on Windows 8.1 (IE11) is anything broken.

I'm the admin on all our servers.  I'm not sure how that would even affect a web page for general staff use.  Most staff are still using Windows 7 and everything works fine for them.  Only on the Windows 8.1 machines is anything broken.
gheistCommented:
You require .NET 3.5 SP1 in metadata
As here: https://msdn.microsoft.com/en-us/library/hh506443(v=vs.110).aspx
Windows 8.1 comes with .NET v4.5
Powerful Yet Easy-to-Use Network Monitoring

Identify excessive bandwidth utilization or unexpected application traffic with SolarWinds Bandwidth Analyzer Pack.

megninAuthor Commented:
Sorry for the delayed response, I was out of the office on Friday.

Thank you.  I'll give that a try on my PC.  I guess we only need to install .NET 3.5 SP1 on the PCs with Windows 8.1.  Most of our PCs currently have Windows 7 but we are starting to roll out new computers and they come with Windows 8.1.
megninAuthor Commented:
I installed .NET Framework 3.5 (includes .NET 2.0 and 3.0) from the Control Panel, “Turn Windows features on or off” on one of my PCs.  It did not prompt for a restart, but did not resolve the link not working.
gheistCommented:
Because your "linl" requires .NET 3.5, SP1 or better.
megninAuthor Commented:
Why has it worked from Windows 7 computers for several years now, then?  It works fine on from my co-workers computer on Windows 7 now.

I think I'm misunderstanding something.

What do you mean, my "link" required .NET 3.5 or better?  In the markup of the .aspx page?  

The link works from Windows 7 computers... always has.  It just doesn't work on Windows 8.1 computers.  Just talking about Internet Explorer here.  It's never worked in Google Chrome.  We use IE so that's never been a serious issue.  This is on an in-house / internal Intranet page not a public website.
gheistCommented:
runtimeVersion = "3.5.30729";

AKA .NET 3.5 SP1
megninAuthor Commented:
I'm sorry, could you please explain what you mean. I am new to this so your guidance would be really appreciated.
megninAuthor Commented:
Do you mean that this text should be placed somewhere?

'  runtimeVersion = "3.5.30729";  '

If so, where?  In the head of the .aspx page?  In the web.config?  If so, where and what's the rest of the syntax?
gheistCommented:
Is person keeping on the discussion same as posted the question?
megninAuthor Commented:
Yes.  I'm the one who posted the question.  I would be happy to provide any additional information or try to restate the problem if I did not explain it well in the original question post.
gheistCommented:
Have a good look into your .NET project. It sounds very strange you post HTML fragment checking for .NET 3.5 SP1 and tell you have .NET 4.0.
Gautham JanardhanCommented:
Try to put an alert in HasRuntimeVersion to show the navigator.UserAgent and see whats different in 7 and 8.1. From wht i understand from your code the href is set only if this method passes and in 8.1 it may not be setting the href.
megninAuthor Commented:
I'll put an alert in HasRuntimeVersion to see what the difference is.  

All of that JavaScript is directly out of the Publish.htm page that VisualStudio creates when I build/publish the application page.  But then, of course, all this... VisualStudio 2012, "OneClick" installs, etc. were created before Windows 8.1.
gheistCommented:
At least update .NET 3.5 to SP1.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.