Visual Basic .NET » Web Forms
AJAX on Konqueror -- John --


Hi, have just started to use AJAX Pro on a project and am very impressed with the results - until I started testing on other browsers.

Everything seems to work fine on all browsers except Konqueror 3.5.3.
I have even set up the GetTime demo to ensure I wasn't trying anything to ambitious but cannot get this to work.

This is annoying as I can see the demos on
http://www.ajaxpro.info 
/
which all work fine on Konqueror.

I am using ASP.NET v2 and here is my code:

Gettime.aspx
--------------------

<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="GetTime.aspx.vb" Inherits="GetTimeSpace.GetTime" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd 
">

<html xmlns="
http://www.w3.org/1999/xhtml 
" >
<head runat="server">
<title>SAY HELLO</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<input id="Button1" type="button" value="button"
onclick="return Button1_onclick()" />
</div>
</form>

<script type="text/javascript" defer="defer">
function getServerTime_callback(res)
{
if (res.error) {alert(res.error);} else {alert(res.value);}
}

function Button1_onclick() {
GetTimeSpace.GetTime.GetServerTime("BOO!",
getServerTime_callback);
}
</script>

</body>
</html>
Gettime.aspx.vb
------------------------

Imports AjaxPro

Namespace GetTimeSpace

Class GetTime
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
AjaxPro.Utility.RegisterTypeForAjax(GetType(GetTime), Me.Page)
End Sub

<AjaxPro.AjaxMethod()> _
Public Function GetServerTime(ByVal dummy As String) As String
Return Date.Now.ToString("dd MMM yyyy hh:mm:ss")
End Function

End Class

End Namespace
In web.config have added

<httpHandlers>
<add verb="POST,GET" path="ajaxpro/*.ashx"
type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/>
</httpHandlers>

-- MichaelSchwarz --


Hi,

is your page working in IE? As I can see you are returning a string and not a DateTime, but this should not be the problem.

Regards,
Michael

On 7/19/06, John <jhewitt> wrote:

Hi, have just started to use AJAX Pro on a project and am very
impressed with the results - until I started testing on other browsers.

Everything seems to work fine on all browsers except Konqueror 3.5.3.
I have even set up the GetTime demo to ensure I wasn't trying anything
to ambitious but cannot get this to work.

This is annoying as I can see the demos on
http://www.ajaxpro.info 
/
which all work fine on Konqueror.

I am using ASP.NET v2 and here is my code:

Gettime.aspx
--------------------

<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="GetTime.aspx.vb" Inherits="GetTimeSpace.GetTime" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd 
">

<html xmlns="
http://www.w3.org/1999/xhtml 
" >
<head runat="server">
<title>SAY HELLO</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<input id="Button1" type="button" value="button"
onclick="return Button1_onclick()" />
</div>
</form>

<script type="text/javascript" defer="defer">
function getServerTime_callback(res)
{
if (res.error) {alert(res.error);} else {alert(res.value);}
}

function Button1_onclick() {
GetTimeSpace.GetTime.GetServerTime("BOO!",
getServerTime_callback);
}
</script>

</body>
</html>
Gettime.aspx.vb
------------------------

Imports AjaxPro

Namespace GetTimeSpace

Class GetTime
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
AjaxPro.Utility.RegisterTypeForAjax(GetType(GetTime), Me.Page)
End Sub

<AjaxPro.AjaxMethod()> _
Public Function GetServerTime(ByVal dummy As String) As String
Return Date.Now.ToString("dd MMM yyyy hh:mm:ss")
End Function

End Class

End Namespace
In web.config have added

<httpHandlers>
<add verb="POST,GET" path="ajaxpro/*.ashx"
type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/>
</httpHandlers>
>

--  

Best regards | Schöne Grüße Michael

Microsoft MVP - Most Valuable Professional Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz 
/
http://www.schwarz-interactive.de 
/

Skype: callto:schwarz-interactive MSN IM: passport
-- John --


Michael

This works in IE, Firefox (both under windows and linux) but not on Konqueror.

John

-- John --


Quick update - noticed version of Konqueror is 3.5.2

-- MichaelSchwarz --


Hi John,

do you have any chance to get remote access to your Konquerer? I have no Konquerer here in Windows environment...

Regards,
Michael
On 7/19/06, John <jhewitt> wrote:

Quick update - noticed version of Konqueror is 3.5.2
>

--  

Best regards | Schöne Grüße Michael

Microsoft MVP - Most Valuable Professional Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz 
/
http://www.schwarz-interactive.de 
/

Skype: callto:schwarz-interactive MSN IM: passport
-- John --


Michael

Am running Slax Linux (
www.slax.org 
) under Virtual PC as have no dedicated Linux machine here, so not able to share it on the web.

I did read somewhere that there was a bug in the way Konqueror created the XMLHTTP object as was adding extra header information, but that may not help as the demo pages function - have noticed some don't work completly as expected but in the whole AJAX is working.

John

-- MichaelSchwarz --


Ok, I've downloaded the ISO LiveCD and will play with it...
On 7/19/06, John <jhewitt> wrote:

Michael

Am running Slax Linux (
www.slax.org 
) under Virtual PC as have no
dedicated Linux machine here, so not able to share it on the web.

I did read somewhere that there was a bug in the way Konqueror created
the XMLHTTP object as was adding extra header information, but that may
not help as the demo pages function - have noticed some don't work
completly as expected but in the whole AJAX is working.

John
>

--  

Best regards | Schöne Grüße Michael

Microsoft MVP - Most Valuable Professional Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz 
/
http://www.schwarz-interactive.de 
/

Skype: callto:schwarz-interactive MSN IM: passport
-- MichaelSchwarz --


The strange this is if I use Fiddler or any other proxy it is working... I have to go more in detail to see where the problem is.

Regards,
Michael
On 7/19/06, Michael Schwarz <michael.schwarz> wrote:
Ok, I've downloaded the ISO LiveCD and will play with it...
On 7/19/06, John <jhewitt> wrote:
>
> Michael
>
> Am running Slax Linux (
www.slax.org 
) under Virtual PC as have no
> dedicated Linux machine here, so not able to share it on the web.
>
> I did read somewhere that there was a bug in the way Konqueror created
> the XMLHTTP object as was adding extra header information, but that may
> not help as the demo pages function - have noticed some don't work
> completly as expected but in the whole AJAX is working.
>
> John
>
>
> > >
>
--
Best regards | Schöne Grüße
Michael

Microsoft MVP - Most Valuable Professional
Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz 
/
http://www.schwarz-interactive.de 
/

Skype: callto:schwarz-interactive
MSN IM: passport

--  

Best regards | Schöne Grüße Michael

Microsoft MVP - Most Valuable Professional Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz 
/
http://www.schwarz-interactive.de 
/

Skype: callto:schwarz-interactive MSN IM: passport
-- MichaelSchwarz --


Ok, I see that it is the "HTTP/1.1 100 Continue" bug. If you have a look at
http://www.w3.org/TR/XMLHttpRequest 
/ you will see that the clients (the XMLHttpRequest implementation) has to work with this correctly. Because it is using HTTP 1.1 I would say it is a bug in Konqueror (use Google and you will find discussions about this bug).

I had a look at the http.sys and IIS implementation of http status code 100, and Microsoft is telling that when a client is using HTTP/1.1 it should be able to handle this. There is no way to add a filter or plugin for IIS to handle this.

Sorry, but maybe there is already a fix availble. Has anyone more details?

Regards,
Michael

On 7/19/06, Michael Schwarz <michael.schwarz> wrote:
The strange this is if I use Fiddler or any other proxy it is
working... I have to go more in detail to see where the problem is.

Regards,
Michael
On 7/19/06, Michael Schwarz <michael.schwarz> wrote:
> Ok, I've downloaded the ISO LiveCD and will play with it...
>
>
> On 7/19/06, John <jhewitt> wrote:
> >
> > Michael
> >
> > Am running Slax Linux (
www.slax.org 
) under Virtual PC as have no
> > dedicated Linux machine here, so not able to share it on the web.
> >
> > I did read somewhere that there was a bug in the way Konqueror created
> > the XMLHTTP object as was adding extra header information, but that may
> > not help as the demo pages function - have noticed some don't work
> > completly as expected but in the whole AJAX is working.
> >
> > John
> >
> >
> > > > >
> >
>
>
> --
> Best regards | Schöne Grüße
> Michael
>
> Microsoft MVP - Most Valuable Professional
> Microsoft MCAD - Certified Application Developer
>
>
http://weblogs.asp.net/mschwarz 
/
>
http://www.schwarz-interactive.de 
/
>
> Skype: callto:schwarz-interactive
> MSN IM: passport
>
--
Best regards | Schöne Grüße
Michael

Microsoft MVP - Most Valuable Professional
Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz 
/
http://www.schwarz-interactive.de 
/

Skype: callto:schwarz-interactive
MSN IM: passport

--  

Best regards | Schöne Grüße Michael

Microsoft MVP - Most Valuable Professional Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz 
/
http://www.schwarz-interactive.de 
/

Skype: callto:schwarz-interactive MSN IM: passport
-- John --


Michael

I can confirm that I have also been able to get it working if I proxy via Fiddler - thanks for your efforts so far on investigating this issue.

many thanks

John

-- John --


Michael

I have noticed that if it set up the Proxy under Knoqueror to go through the office network I get data returned, however it is set to null - is this related to the code 100 bug?

Cheers

John

-- MichaelSchwarz --


Hi,

you should use Ethereal to capture the real traffic. If you see a HTTP 100 Continue there it could not be handled with AjaxPro. I'm note sure if other frameworks are working, but as I can see it is a POST only bug. Which version of Konqueror are you using?

Regards,
Michael
On 7/20/06, John <jhewitt> wrote:

Michael

I have noticed that if it set up the Proxy under Knoqueror to go
through the office network I get data returned, however it is set to
null - is this related to the code 100 bug?

Cheers

John
>

--  

Best regards | Schöne Grüße Michael

Microsoft MVP - Most Valuable Professional Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz 
/
http://www.schwarz-interactive.de 
/

Skype: callto:schwarz-interactive MSN IM: passport
-- John --


Michael

I have created another set of test pages which create the XMLHttpRequest object itself and then calls another page and have managed to get this working on Konqueror 3.5.3 and other browsers - so may try to put some conditionals into my pages to use AjaxPro where it can and fall back to creating the objects manually.

my test code is:

test.aspx
-------------
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="test.aspx.vb"
Inherits="test" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd 
">

<html xmlns="
http://www.w3.org/1999/xhtml 
" >
<head id="Head1" runat="server">
<title>TEST IN PAGE CALL</title>

<script type="text/javascript">

var req = null;
function Initialize() {
if( window.ActiveXObject ) {
try
{ return new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e)
{ alert("Error - " + e)
try { return new ActiveXObject("Msxml2.XMLHTTP"); }
catch(er) {alert(er);req=null;}
}
}
if( window.XMLHttpRequest ) {
return new XMLHttpRequest();
}
}

function SendQuery(key)
{
req = Initialize();
var url="test_response.aspx?k="+key;

if(req!=null)
{
req.onreadystatechange = Process;
req.open("GET", url, true);
req.send(null);
}
}

function Process()
{
if (req.readyState == 4)
{
// only if "OK"
if (req.status == 200)
{
if(req.responseText=="")
alert("NO DATA")
else
{
alert(req.responseText);
}
}
else
{

document.getElementById("autocomplete").innerHTML=
"There was a problem retrieving data:<br>"
+ req.statusText;
}
}
}

</script>

</head>
<body>
<form id="form1" runat="server">
<div>
<input type=button onclick="SendQuery('test')" value="push me" />
</div>
</form>
</body>
</html>
test.aspx.vb
-----------------
Partial Class test
Inherits System.Web.UI.Page

End Class
test_response.aspx
-----------------------------
<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="test_response.aspx.vb" Inherits="test_response" %>

test_response.aspx.vb
---------------------------------
Partial Class test_response
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Response.Write(Date.Now.ToString("dd MMM yyyy hh:mm:ss"))
End Sub End Class

[Submit Comment]Home