Serious Issue/Bug - Can't login using Internet Explorer!!

Topics: ASP.NET 2.0
Feb 23, 2010 at 2:20 PM

I thought I was done and ready to move on when I found out the login doesn't work in Internet Explorer 6 & 7! Works on Mac Safari 4 & Firefox 3.5 and PC Firefox 3.5, Safari 4.0, and Google Chrome!!! This is a "Windows" application and the only browsers it doesn't work in are Windows browsers!!! Are you kidding me!! I thought I have seen it all but this seriously takes the cake!

Has anybody else experienced this problem and know how to correct it. The client that will be using the application will be using IE to do their editing (figures).

Any help on this would be greatly appreciated. I still can't believe this is happening, I'm still in a state of shock!

Feb 23, 2010 at 2:30 PM

Maybe try IE 7 in compatibility mode and IE 8 and see what happens, a lot of themes do not support IE 6 anymore.

Feb 23, 2010 at 2:40 PM

I haven't installed IE 8 yet due to the fact that I need 6 & 7 for testing purposes on projects. Since Microsoft announcing that they're supporting IE 6 until 2014, I have no choice but to keep my current set up. I don't understand how a theme would have anything to do with the login functionality of the site though. Can you please explain to me as to why you suggested that it is a theme issue and not a code issue or browser issue. I would appreciate it greatly. Thanks.

 

Feb 23, 2010 at 3:10 PM

I upgraded to 1.6 from 1.5 and can login in ie6 no problem.

Try another theme just to be sure it's not that

Feb 23, 2010 at 3:20 PM

Alright, now this is troubling, it does work when I put it back to the "Standard" theme. Why would it be doing this? And why would it work fine in every other browser than a Microsoft browser? I really have to figure this out. The theme I'm using for the client is one I created around their website and has to be used. Do you know what would cause this problem?

 

Feb 23, 2010 at 3:25 PM

Not being a coder or programmer I always use the process of elimination to sort out issues.

To my way of thinking there are several variables here to deal with, the IE issue, the theme, the version of BE and the version of ASP.net you are using with BE.

First I try the easiest to deal with, change themes and see if the issue persists,  if so try IE 8  and see if it works. if the issue persists, use the latest version of BE with ASP.net version 2.

After all that is the issue still persists yell for help.

Feb 23, 2010 at 3:25 PM

I wouldn't know to be honest. What I would do is compare your modified theme to the "Standard" one and see if you can spot anything

Feb 23, 2010 at 3:33 PM

To give you more info to deal with, I think you should try your theme with IE 8 at this time.

Feb 23, 2010 at 3:53 PM

I am using ASP.NET 2.0 and the latest build of Blogengine.net. It was a fresh install and I used all the elements from the "Standard" theme to make my own. There wasn't much I changed other than page elements. Although I just noticed that it is throwing an error in IE:

 

Line: 217

Char: 1

Error: Object expected

Code: 0

URL: blah blah blah/login.aspx

I am not getting any other errors in any browser. And I don't have the resources to test in IE 8 either, and I know for a fact that the client doesn't have it, in fact I think they are still on IE 6.

 

Feb 23, 2010 at 7:59 PM

Does anybody know what would be throwing that error code? It doesn't make sense that it'll work in every browser except Internet Explorer!

Feb 23, 2010 at 8:13 PM

You have a javascript error. Open the page in firefox, go to Tools -> Error Console, and let us know if you see any javascript errors there (and what they are, if any)

Feb 23, 2010 at 9:19 PM

Ok, here is what the error console is saying from firebug:

function anonymous does not always return a value

WebForm_AutoFocus(Object { name="focusId"})WebRes...0261250 (line 46) login.aspx()login.aspx (line 217) if (!ValidatedTextBoxOnKeyPress(event)...t.stopPropagation(); return false; }
The line from login.aspx (line 217) is this:

<!--
WebForm_AutoFocus('ctl00_cphBody_Login1_UserName');
-->
The line from WebResource.axd (line 46) is referring to this:

if (window.__smartNav) {
window.__smartNav.ae = focused.id;
 } 

Still trying to figure this out.

Feb 23, 2010 at 9:26 PM

To quickly check if the problem is what I think it is, go to login.aspx and change the following:

WebForm_AutoFocus('ctl00_cphBody_Login1_UserName');

To

//WebForm_AutoFocus('ctl00_cphBody_Login1_UserName');

(Basically, put 2 forward slashes in front of the line)

See if that fixes the problem.
Feb 23, 2010 at 9:38 PM

Oops... I wasn't really thinking when I posted my previous comment.  To disable that code, go to login.aspx.cs and change the following line:

Login1.FindControl("username").Focus();

to:

//Login1.FindControl("username").Focus();

That is located on line 47 in that file, assuming you haven't changed the file.

Feb 24, 2010 at 1:37 PM
Edited Feb 24, 2010 at 1:50 PM

Well, I figured it out and it was just a matter of switching a block of code up in my site.master page. Here's what the issue was:

In my site.master I had this inside my <form> tag:

 

<div id="admin_panel">
<blog:WidgetZone runat="server" ZoneName="be_WIDGET_ZONE" />
<%--
<% if (Page.User.Identity.IsAuthenticated){ %>
<h1>Administration</h1>
<uc1:menu ID="Menu1" runat="server" />
<%} %>
--%>
<div class="clearfix"></div>
</div>

<!--#include file="header.html" -->

Once I moved this block outside of the form tag and put it above it, everything works perfectly now with no errors!!

Although, after doing some research I have found that every Blogengine site I came across, I saw that there were common Javascript warnings coming from this file: js.axd

Here is a list of warnings:

function anonymous does not always return a value
reference to undefined property window.__smartNav
assignment to undeclared variable BlogEngine
reference to undefined property window.onload

Why are these warnings common place across the board and is the developers working on cleaning those issues up? Just curious.

I would like to say thank you so much for taking the time to help me on this, it is truly appreciated. Maybe now I'll start making themes for Blogengine.net and maybe a tutorial on how to turn it into just a CMS  and post it on my personal blog (Wordpress......lol).

 

Mar 3, 2010 at 10:33 PM

 - "Serious Issue/Bug - Can't login using Internet Explorer!!"

I have similar issue ( on local PC, IE 8.0 ) when use v1.5 or v1.6.. but if I use it on hosted server - all is fine :s.. Next what I tried it was Firefox - all worked like a charm.. so.. I have no idea what it can be, but previous time blog was developed under XP with IE 7.0 whithout any issues.