Showing posts with label ie7. Show all posts
Showing posts with label ie7. Show all posts

Monday, March 26, 2012

Ajax AutoComplete Problem

I have been trying to get the AutoComplete work without success. (many Days)

I have a deveplement Server 2003, XP workstation with VS2005 and IE7, and have check this with a workstation with Win98&IE6

I am using the demo from the Ajax.net video's

I have install the lastest ajax onto the server and the bin directory has: AjaxControlToolkit;AjaxControlToolkit.dll;AjaxControlToolkit.dll.refresh;AJAXExtensionsToolbox.dll;BuildVsi.dll;JavaScriptCommentStripper.dll;System.Web.Extensions.Design.dll;System.Web.Extensions.dll;Tools.dll;Tools.netmodule.

I can get things like the CollapsiblePanelExtender working, The demo on the ajax web site works.

The page displays as expected, but when I type the 3rd character, nothing happens

Filddler gives me an error 500, on the 3rd 'a'

I also had to create a folder named 'GetCompletionList' with a copy of autocomplete.asmx in it to fix an error 404 that fiddler gave me, which may be anther issuse.

I can call the web service and get results from it and '/js' gets me the option to download the JavaScript.

=====Fiddler=====

{"prefixText":"aaa","count":10}

-----------

HTTP/1.1 500 Internal Server Error

Date: Sun, 29 Apr 2007 10:35:28 GMT

Server: Microsoft-IIS/6.0

MicrosoftOfficeWebServer: 5.0_Pub

X-Powered-By: ASP.NET

X-AspNet-Version: 2.0.50727

Cache-Control: private

Content-Type: application/soap+xml; charset=utf-8

Content-Length: 1666

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><soap:Code><soap:Value>soap:Receiver</soap:Value></soap:Code><soap:Reason><soap:Text xml:lang="en">System.Web.Services.Protocols.SoapException: Server was unable to process request. --> System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.

at System.Xml.XmlTextReaderImpl.Throw(Exception e)

at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)

at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()

at System.Xml.XmlTextReaderImpl.ParseDocumentContent()

at System.Xml.XmlTextReaderImpl.Read()

at System.Xml.XmlTextReader.Read()

at System.Web.Services.Protocols.SoapServerProtocol.SoapEnvelopeReader.Read()

at System.Xml.XmlReader.MoveToContent()

at System.Web.Services.Protocols.SoapServerProtocol.SoapEnvelopeReader.MoveToContent()

at System.Web.Services.Protocols.SoapServerProtocolHelper.GetRequestElement()

at System.Web.Services.Protocols.Soap12ServerProtocolHelper.RouteRequest()

at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message)

at System.Web.Services.Protocols.SoapServerProtocol.Initialize()

at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)

-- End of inner exception stack trace --</soap:Text></soap:Reason><soap:Detail /></soap:Fault></soap:Body></soap:Envelope>

=====Default.aspx=====

<%

@dotnet.itags.org.PageLanguage="VB"AutoEventWireup="true"CodeFile="Default.aspx.vb"Inherits="_Default" %>

<%

@dotnet.itags.org.RegisterAssembly="AjaxControlToolkit"Namespace="AjaxControlToolkit"TagPrefix="cc1" %>

<!

DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.1//EN""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<

htmlxmlns="http://www.w3.org/1999/xhtml">

<

headrunat="server"><title>Ajax Test</title>

</

head>

<

body><formid="form1"runat="server"><asp:ScriptManagerID="ScriptManager1"runat="server"><Services><asp:ServiceReferencePath="AutoComplete.asmx"/></Services></asp:ScriptManager><asp:TextBoxID="TextBox1"runat="server"></asp:TextBox><br/><cc1:AutoCompleteExtenderid="AutoCompleteExtender1"runat="server"ServiceMethod="AutoComplete.asmx"ServicePath="GetCompletionList"TargetControlID="TextBox1"></cc1:AutoCompleteExtender></form>

</

body>

</

html>

=====AutoComplete.asmx=====

<%

@dotnet.itags.org.WebServiceLanguage="VB"CodeBehind="~/App_Code/AutoComplete.vb"Class="AutoComplete" %>

=====App_Code/AutoComplete.vb=====

Imports

System.Web

Imports

System.Web.Services

Imports

System.Web.Services.Protocols

Imports

System.Collections.Generic

'from line 10( before ScriptService): <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _

<WebService(Namespace:=

"http://tempuri.org/")> _

<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _

<System.Web.Script.Services.ScriptService()> _

Public

Class AutoCompleteInherits System.Web.Services.WebService

<WebMethod()> _

PublicFunction GetCompletionList(ByVal prefixTextAsString,ByVal countAsInteger)AsString()Dim c1AsCharDim c2AsCharDim c3AsCharIf (count = 0)Then

count = 10

EndIfDim rndAsNew Random()Dim itemsAsNew List(OfString)For iAsInteger = 1To count

c1 =

CStr(rnd.Next(65, 90))

c2 =

CStr(rnd.Next(97, 122))

c3 =

CStr(rnd.Next(97, 122))

items.Add(prefixText + c1 + c2 + c3)

Next iReturn items.ToArray()EndFunction

End

Class

=====Web.config=====

<?

xmlversion="1.0"?>

<

configuration>

<

configSections>

<

sectionGroupname="system.web.extensions"type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

<

sectionGroupname="scripting"type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

<

sectionname="scriptResourceHandler"type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"requirePermission="false"allowDefinition="MachineToApplication"/>

<

sectionGroupname="webServices"type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

<

sectionname="jsonSerialization"type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"requirePermission="false"allowDefinition="Everywhere"/>

<

sectionname="profileService"type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"requirePermission="false"allowDefinition="MachineToApplication"/>

<

sectionname="authenticationService"type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"requirePermission="false"allowDefinition="MachineToApplication"/>

</

sectionGroup>

</

sectionGroup>

</

sectionGroup>

</

configSections>

<

system.web>

<!--

MarkRoss: Next line added to fix remote error message-->

<

customErrorsmode="Off"/>

<

webServices>

<

protocols>

<

addname="HttpGet"/>

<

addname="HttpPost"/>

</

protocols>

</

webServices>

<

pages>

<

controls>

<

addtagPrefix="asp"namespace="System.Web.UI"assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</

controls>

</

pages>

<!--

Set compilation debug="true" to insert debugging

symbols into the compiled page. Because this

affects performance, set this value to true only

during development.

-->

<

compilationdebug="false">

<

assemblies>

<

addassembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<

addassembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<

addassembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies>

</

compilation>

<

httpHandlers>

<

removeverb="*"path="*.asmx"/>

<

addverb="*"path="*.asmx"validate="false"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<

addverb="*"path="*_AppService.axd"validate="false"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<

addverb="GET,HEAD"path="ScriptResource.axd"type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"validate="false"/>

</

httpHandlers>

<

httpModules>

<

addname="ScriptModule"type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</

httpModules>

</

system.web>

<

system.web.extensions>

<

scripting>

<

webServices>

<!--

Uncomment this line to customize maxJsonLength and add a custom converter-->

<!--

<jsonSerialization maxJsonLength="500">

<converters>

<add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>

</converters>

</jsonSerialization>

-->

<!--

Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate.-->

<!--

<authenticationService enabled="true" requireSSL = "true|false"/>

-->

<!--

Uncomment these lines to enable the profile service. To allow profile properties to be retrieved

and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and

writeAccessProperties attributes.

-->

<!--

<profileService enabled="true"

readAccessProperties="propertyname1,propertyname2"

writeAccessProperties="propertyname1,propertyname2" />

-->

</

webServices>

<!--

<scriptResourceHandler enableCompression="true" enableCaching="true" />

-->

</

scripting>

</

system.web.extensions>

<

system.webServer>

<

validationvalidateIntegratedModeConfiguration="false"/>

<

modules>

<

addname="ScriptModule"preCondition="integratedMode"type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</

modules>

<

handlers>

<

removename="WebServiceHandlerFactory-Integrated"/>

<

addname="ScriptHandlerFactory"verb="*"path="*.asmx"preCondition="integratedMode"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<

addname="ScriptHandlerFactoryAppServices"verb="*"path="*_AppService.axd"preCondition="integratedMode"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<

addname="ScriptResource"preCondition="integratedMode"verb="GET,HEAD"path="ScriptResource.axd"type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</

handlers>

</

system.webServer>

</

configuration>

I have resolved this

in:-

<cc1:AutoCompleteExtenderid="AutoCompleteExtender1"runat="server"ServiceMethod="AutoComplete.asmx"

ServicePath="GetCompletionList"TargetControlID="TextBox1">

</cc1:AutoCompleteExtender>

I had theServiceMethod& ServicePath attributes back to front

Note: Using Fiddler helped, couldn't see this problem initially due to its simplicity

"I also had to create a folder named 'GetCompletionList' with a copy of autocomplete.asmx in it to fix an error 404 that fiddler gave me, which may be anther issuse."

Saturday, March 24, 2012

AJAX and IE7

I am using ASP.NET 2.0 AJAX and IE7.my application doesnot work.But if i run the same application in IE^ its working.

Why is it so.Is there any problem with IE7 and AJAX working.

Hi,

which problems are you experiencing? Which version of AJAX are you using (CTP, Atlas, Extensions 1.0, another AJAX framework)?

Could you also provide the least amount of relevant code to reproduce the problem? Without that it's going to be difficult to help you out.

Grz, Kris.

Ajax and IE6 - IE7 runs very very slow... Firefox is fast

Hi guys... i just implementa site that uses ajax update panels.. one page have an ajax update panel with asimple post back data (in change index event of a drop down a record shows tothe user) quite simple!

BUT the problems startswhen i upload the site in a production server , every update panel runs veryvery slow with IE7 or IE6 but in firefox works like a charm..

I made the following changes just to know but NOTHING CHANGED...Tongue Tied

<compilation debug="false"><system.web.extensions> <scripting> <scriptResourceHandler enableCompression="true" enableCaching="true"/> </scripting></system.web.extensions> 


i set also the EnableViewState =false to several items inside the page but did'nt see any change in production server..

Help ME PLEASE!!!

hello.

hum...do you have an anti-virus on? are we talking about how much data inside the updatepanel?


no antivirus..

look..

i have an update panel that contains a dropdown box with 3 values

This dropdown is autopostback=true

Also inside the Update panel is a second DropDbox that is conected to a datasource that changes the where clause value from the 1st Ddownbox selected value..(the table contains indexes and there are 80 records ONLY)

is quite simple.. User chooses for example CARS , and the second dropdown manipulates cars brands .. chooses motorbikes ,the second dropdown manipulates bikes..
I do not understand why in firefox is quite fast and in IE7 is VERY very slow...

is it a matter of the production server? or is a general known problem of ajax asp.net with IE6,7?



is there anyone with the same situation?

Wednesday, March 21, 2012

AJAX accordion panel scrolled in IE7 but fine in Firefox

I am using the ajax accordion panel toolkit in my default page. As below:

<ajaxToolkit:Accordion ID="Accordion" SelectedIndex="0" ContentCssClass="" HeaderCssClass="" HeaderSelectedCssClass=""
runat="server" FadeTransitions="true" FramesPerSecond="30"
TransitionDuration="350" AutoSize="None">
<Panes>
<ajaxToolkit:AccordionPane ID="AccordionPane1" runat="server">

<Header>

...

Now the funny thing is the IE7 can't function at all on the default page, while firefox has no errors at all.

So did anyone have the same issue? is this a bug in the IE7?

...

You may find that IE is being pushed into quirks mode which may be causing you issues. The Toolkit assumes IE is instandards mode. For more information on Quirks Mode seehttp://en.wikipedia.org/wiki/Quirks_mode

-Damien


Thanks for your quick replay.

Here is my document type:

<!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" >

Refer to the Quirks table on Wiki, it's not Quirk under IE7.0

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

Do you have any other solution?


There must be an overflow style being applied... Maybe you have something set in you CSS that is effecting your panel?

You can use Firebug to see applied styles (in Firefox) or the IE Developer Toolbar will do similar in IE.

-Damien


Yeah, you were right. I omited overflowed div segment, now it's working again.

Another method sharing is that:

when the table width = 100%, better to use the autoSize="Fill" in that case, the layout will be good, no scrolled bar on the side or bottom.

Ajax Accordion invisible in Firefox

I have an Accordion control that looks and works great when viewed with IE6 and IE7, but is completely invisible when the page is viewed in Firefox (1.0 and 2.0). Has anyone had this problem before? I found several posts in the archive that discussed browser problems but they were with earlier versions of Ajax (Atlas) and it usually seemed the other way around (Firefox worked but IE6 and IE7 had problems).

Any thoughts on how to fix this? Thanks in advance for any help in solving this. Here is my Accordion code:

<cc1:Accordion ID="Accordion1" runat="server" SelectedIndex="0"
HeaderCssClass="accordionHeader" ContentCssClass="accordionContent"
FadeTransitions="true" FramesPerSecond="40" TransitionDuration="250"
AutoSize="Fill" Height="450px" RequireOpenedPane="false" SuppressHeaderPostbacks="true"
style="position:absolute; top:200px; left:10px;">

Solved it myself. The Accordion was placed within a div thathad a z-index problem. When I removed the Accordion from the div,it worked fine in Firefox as well as IE.