Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Wednesday, March 28, 2012

ASP.net AJAX throws errors in some browsers

These browsers are:

Mozilla (latest version)
Seamonkey (latest version)
Netscape (latest version)

See this error message:

AJAX error in diverse browsers

Has anyone encountered the same problems in the mentioned browsers? I couldn't check Mac browsers, any known issues in Mac browsers would be interesting too.
Any other browsers that don't like the asp.net AJAX?

This is normallly because you modify the response by using Response.write.Make sure you use a Literal control instead of using response.write.

Mac browsers will have the same error.

It's also possible that the error is caused by Tracing where the pageoutput is set to true. You must set that to false.
<traceenabled="true"requestLimit="128"pageOutput="false"traceMode="SortByTime"localOnly="false"/>


Hi Richard,

thanks for your reply. So I may not use <%= WhateverString %> neither, right? I can't use Response.Write in my code behind files and neither in the "HTML" source code, is that what you are saying?

Steve


Hi Steve,

Yes that is what I meand. I hope it helped you.


To be clear, <%= is just an alias for Response.Write; so there's no differnece at all once it compiels. If it helps, you *can* use Response.Write, just not inside an UpdatePanel, nor as part of any code that will be subject to responding to an update panel's asynch postback.

ASP.NET AJAX for Web Application Project (WAP)

Has anyone successfully use the new AJAX controls in a WAP?

I'm getting this error when I try to use the web.config from an ASP.NET AJAX Web Site in a Web Application Project.

Error 8 The type 'Microsoft.Web.UI.ExtenderControl' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Try to download Ajax Beta 2 and Futures Nov CTP from this website - http://ajax.asp.net/docs/Default.aspx
Try to download Ajax Beta 2 and Futures Nov CTP from this website - http://ajax.asp.net/docs/Default.aspx
Try to download Ajax Control Toolkit from this website - http://www.codeplex.com/AtlasControlToolkit/Release/ProjectReleases.aspx
Try to read Ajax materials document from here -
After you install Ajax Beta 2 and Futures Nov CTP in your PC,try to create a new Ajax Enabled website and a Ajax CTP Enabled website and check if it works.
Besides,try to check your web.config according to the following web.config
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="microsoft.web" type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="converters" type="Microsoft.Web.Configuration.ConvertersSection"/>
<sectionGroup name="scripting" type="Microsoft.Web.Configuration.ScriptingSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="webServices" type="Microsoft.Web.Configuration.ScriptingWebServicesSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="Microsoft.Web.Configuration.ScriptingJsonSerializationSection, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
<section name="profileService" type="Microsoft.Web.Configuration.ScriptingProfileServiceSection, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
<section name="authenticationService" type="Microsoft.Web.Configuration.ScriptingAuthenticationServiceSection, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<system.web>
<pages>
<controls>
<add tagPrefix="asp" namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagPrefix="asp" namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
<tagMapping>
<add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="Microsoft.Web.UI.Compatibility.CompareValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="Microsoft.Web.UI.Compatibility.CustomValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RangeValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RegularExpressionValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RegularExpressionValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RequiredFieldValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RequiredFieldValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.ValidationSummary" mappedTagType="Microsoft.Web.UI.Compatibility.ValidationSummary, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</tagMapping>
</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.
-->
<compilation debug="true">
<assemblies>
<add assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>
</compilation>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="Microsoft.Web.Script.Services.ScriptHandlerFactory, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>
</httpHandlers>
<httpModules>
<add name="WebResourceCompression" type="Microsoft.Web.Handlers.WebResourceCompressionModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptModule" type="Microsoft.Web.UI.ScriptModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="Microsoft.Web.UI.ScriptModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-ISAPI-2.0"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="Microsoft.Web.Script.Services.ScriptHandlerFactory, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptResource" verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler"/>
</handlers>
</system.webServer>
</configuration>
Wish the above can help you.

Hi JC,

Had the same error and found that it was because I had not replaced the AjaxControlToolkit.dll in my application with the new one in the SampleWebsite/bin folder when I updated my AJAX version from beta to AJAX 1.0 RC. Recommend you try this.

Kind regards,

Mick

ASP.NET AJAX Enabled website Problem Stack Overflow

Hi all,

I use ASP.NET AJAX Enabled website. It gives error in IE "Stack Overflow at Line : 0" while i am doing paging in datagrid or any action like button click etc.

Anyone please solve my issue.

Thanks & Regards,

Patel Nasrullah


Make sure you do not have smart navigation turnned on.


Check out this post:http://forums.asp.net/p/956056/1397151.aspx

Specifically the post bywinter: "Had this problem also, did a little search and it turns out that it may be a bug in IE6 as well... (search Microsoft KB for more on this)
However, I resolved this when I changed to SmartNavigation="true" in my config-file instead of MaintainScrollPositionOnPostback.
Also a little tip: make sure that this is not still declared in any your pages' Page-property if SmartNavigation is used in the config-file."

-Damien

ASP.NET AJAX Deployment error

i,

I`ve done an ASP.NET AJAXwebsite and it works perfectly on my development machine. Ok! But whenI try to deploy my application on a webfarm scenario my website doesn`twork properly.
It comes out with the following error message sometimes:

"
Sys.WebForms.PageRequestManagerParserErrorException:The message received from the server could not be parsed. Common causesfor this error are when the response is modified by calls toResponse.Write(), response filters, HttpModules, or server trace isenabled.

Details: Error parsing near '

<!DOCTYPE html P'.
"

Thisproblem occurs randomly. Apparently, it`s due to the load balanceconfiguration on our web servers. I think when the request goes toanother machine my website crashes.

Any hint would be very appreciated. :]

You may want to check this out

http://www.rosshawkins.net/rfh/articles/webresource.axd.html

Let me know if this helps.

Monday, March 26, 2012

ASP.NET AJAX Beta 2 + ASMX Web Services = Parser Error !?!

Hi, I have my Web Services set up which works before ASP.NET AJAX installed. Now I am experiencing Parser Error when accessing my asmx web service.

My web.config is left untouched for the web services. The problem could be that the Web services is in the sub folders of my ASP.NET 2.0 + ASP.NET AJAX website. Please someone guide me on how to fix this error. It's quite urgent. Thanks!

Error Details:

System.InvalidOperationException: Failed to handle request. --> System.InvalidOperationException: Unable to handle request. --> System.Exception: Could not load file or assembly 'Microsoft.Web.Preview' or one of its dependencies. The system cannot find the file specified. --> System.Web.HttpParseException: Could not load file or assembly 'Microsoft.Web.Preview' or one of its dependencies. The system cannot find the file specified. --> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Web.Preview' or one of its dependencies. The system cannot find the file specified.

File name: 'Microsoft.Web.Preview'

at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)

at System.Reflection.AssemblyInternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

at System.Reflection.Assembly.Load(String assemblyString)

at System.Web.Configuration.CompilationSection.LoadAssembly(String assemblyName, Boolean throwOnFail)

at System.Web.UI.TemplateParser.LoadAssembly(String assemblyName, Boolean throwOnFail)

at System.Web.UI.MainTagNameToTypeMapper.ProcessTagNamespaceRegistrationCore(TagNamespaceRegisterEntry nsRegisterEntry)

at System.Web.UI.MainTagNameToTypeMapper.ProcessTagNamespaceRegistration(ArrayList nsRegisterEntries)

WRN: Assembly binding logging is turned OFF.

To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.

Note: There is some performance penalty associated with assembly bind failure logging.

To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

I feel that you need to install Ajax Futures CTP in your PC and the error message indicates that there is noMicrosoft.Web.Preview.dll to refer in your website.Try to check if you haveMicrosoft.Web.Preview.dllin the bin folder of your ajax website.If not,try to install ajax Futures Nov CTP first and add it to the bin folder.
Besides,try to read this thread?-http://forums.asp.net/1476672/ShowThread.aspx#1476672 if there is?any failure to call web service method.
Wish the above can help you.
Thanks! I added the needed dll into the bin folder and that fixed the problem. Thanks! It seems strange when I tested on my machine, things work but on the server it doesn't. Probably because of the inheritance of the web.config.
Try to check the permissions in the deployed server. Right mouse click virtual directory to addNetwork Service account and chooseProperties. Try to setexecute permissionsfor "Scripts only" or "Executable and Scripts"in the Virtual Directorypanel.Besides,try to set Trusted Level = Full.

ASP.NET AJAX and urlMapping bug

A page will error out with "Sys.WebForms.PageRequestManagerServerErrorException: An unkown error occurred while processing the request on the server. The status code returned from the server was: 12031" when an update panel is updating for the second update. In other words, the first AJAX-style page update works fine, but the second one causes this error.

I've narrowed down the problem to urlMappings in the web.config file. I'm using it to control role-based access. When the page name doesn't match the source page name, the error occurs. For example, this works:

<urlMappings>
<add url="~/folder/Default2.aspx" mappedUrl="~/Default2.aspx"/>
</urlMappings>

While this doesn't:

<urlMappings>
<add url="~/folder/edit.aspx" mappedUrl="~/Default2.aspx"/>
</urlMappings>

Here's a project showing an example of the error in action. Master page:

<%@dotnet.itags.org. Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %><!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>Untitled Page</title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div>
<ajax:ScriptManager runat="server" ID="SM1" />
<div class="header">
Sweet header text.
</div>
<asp:HyperLink runat="server" ID="HL1" NavigateUrl="~/folder/edit.aspx" Text="Page doesn't really exist!" /><br />
<asp:HyperLink runat="server" ID="HL2" NavigateUrl="~/Default.aspx" Text="Default page." /><br />
<b>Content begins:<br /></b><br /><br />
<ajax:UpdatePanel runat="server" ID="upanel1">
<ContentTemplate>
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server" />
</ContentTemplate>
</ajax:UpdatePanel>
<br /><b>Content ended.</b><br /><br /
</div>
</form>
</body>
</html>

Default.aspx:

<%@dotnet.itags.org. Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" title="Untitled Page" %><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
This page is ~/Default.aspx.
</asp:Content>

Default2.aspx:

<%@dotnet.itags.org. Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
This page is ~/Default2.aspx.<br />
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true">
<asp:ListItem Text="Show label one" Value="1" />
<asp:ListItem Text="Show label two" Value="2" />
</asp:DropDownList>
<br />
<asp:Label ID="Label1" runat="server" Text="Label one" Visible="false" />
<asp:Label ID="Label2" runat="server" Text="Label two" Visible="false" />
</asp:Content>

Default2.aspx.vb:

PartialClass Default2
Inherits System.Web.UI.Page

Protected Sub DropDownList1_SelectedIndexChanged(ByVal senderAs Object,ByVal eAs System.EventArgs)Handles DropDownList1.SelectedIndexChanged
If DropDownList1.SelectedValue ="1"Then Label1.Visible =True Label2.Visible =False
Else Label1.Visible =False Label2.Visible =True
End If
End Sub
End Class

Make a folder called "folder" in the root of the project and add this to the web.config, under system.web:

<urlMappings>
<add url="~/folder/edit.aspx" mappedUrl="~/Default2.aspx"/>
</urlMappings>

To see the bug, fire up the project and click the "Page doesn't really exist" link. This will bring you to the mapped page. Change the dropdownlist's selection, notice the label change, then change the selection on the DDL again. You'll get the error I specified earlier. Fiddler shows the AJAX call attempting to read folder/Default2.aspx instead of the correct URL, causing a 404 and the callback to fail.

Any idea for a fix on this one? It can be worked around by keeping the page names consistent, but that doesn't fix the bug.

Did you ever find a solution to this. My setup is not the same, but I am getting the same error.

ASP.NET AJAX and AtlasUIMap

I've been trying to use the AtlasUIMap in the latest version of ASP.NET Ajax and am having problems. The error I get:Assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not contain a Web resource with name 'Microsoft.Web.Resources.ScriptLibrary.AtlasUIMap.js'.

I've tried a number of different things including changing the name from AtlasUIMap to AjaxUIMap, I've searched the ScriptLibrary folder, and so on and am not finding the Map UI anymore. Has this been removed from the latest release?

Here's the code that errors:

<ajax:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<ajax:ScriptReference Name="AjaxUIMap.js" />
</Scripts>
</ajax:ScriptManager>

Thanks,

Scott

hello.

i think that is correct, ie, it has been removed from this version.


Thank you. I hope they add it back in, I would like to test out this functionality.

asp.net ajax 2.0 beta 2 error

hi..

i am using asp.net ajax 2.0 beta 2, with scriptManager with any ajax control in the control tool kit, and i get this error:

Sys.WebForms.PageRequestManager._initialize(

'ScriptManager1', document.getElementById('form1'));

'sys' is undefined.

when i get back and use atlas dll, instead of Microsoft.Web.Extensions dll, everything is ok...

why is that?

Hi ya,

I had similar problem two weeks ago. It was that my web site was not properly migrated to an ajax enabled web site. You need to modify your web config to be able to migrate it properly.

http://ajax.asp.net/files/Migration_Guide.doc

here is a document how you should do that.

Cheerz,

Yani

ASP.NET Ajax 1.0 Installation Error

I'm trying to install ASP.NET Ajax 1.0. First, I uninstalled a previous beta version. Now when I run the 1.0 installation and the wizard starts copying files, I get the following error:

Product: Microsoft ASP.NET 2.0 AJAX Extensions 1.0 -- Error 1304. Error writing to file: System.Web.Extensions.Design.dll. Verify that you have access to that directory.

Does anyone know how to resolve this issue?

Thanks.

I had a different problem, I couldn't get a clean uninstall on my XP dev box. But I followed the procedure in the following post:Uninstall issue with ASP.NET AJAX 1.0 Beta 2;http://forums.asp.net/thread/1502566.aspx.

I'm wondering if you got a clean uninstall.

Otherwise, I'd check the obvious. Look for the System.Web.Extensions.Design.dll file in your file system (mine is located at c:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025) and make sure the account you're using for the install has permission to write to the directory (like the error says :).


Thanks for the reply. I've tried both of your suggestions, but neither worked. The version I had installed was the "Atlas" June CTP. I've tried installing Beta 2, RC1, and 1.0. All of these give me this same error:

Product: Microsoft ASP.NET 2.0 AJAX Extensions 1.0 -- Error 1304. Error writing to file: System.Web.Extensions.Design.dll. Verify that you have access to that directory.

Any other ideas?...Please?....Anyone?...Help!


Does the System.Web.Extensions.Design.dll file already exist on your system? Unless it the error message is wrong it sounds like the file is there and you can't overwirte it. I know that I'm stating the obvious and asking you to check the obvious, but unfortunately I've been burned by the obvious too often not to check it :)


No it does not exist on my system. Let me rephrase that...The only time it exists on my system is during the installation of ASP.NET Ajax Extensions. In the middle of the installation, the System.Web.Extensions.Design.dll file is written to the C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025 folder. I think (and I'm guessing here) that the problem arises when the installation tries to add this assembly the GAC. I copied the file to another folder before cancelling the installation. Then I tried to add it to the GAC manually, but I received the following error:

You do not have rights to add assemblies to the assembly cache. Contact your system administrator for assistance.

This itself is a bit baffling considering that my user account is in the Aministrators group on this system.


Yes this does sound frustratingly interesting. If I were in your situation I'd try (1) adding then removing another signed assembly with gacutil to the GAC to see if your account really does have a problem. (2) creating a fresh admin account to see if it has the problem.

Also try clearing out the download cache. Try "gacutil /ldl" followed by "gacutil /cdl". During development I've had some problems with the download cache in the past, so clearing it is on my check list.

I guess the good news it seems like it may only be a permission problem. Unless the dll has been corrupted, you know that the dll is OK because Ajax RTM V1 has been widely installed. You could always grab a fresh copy of the Ajax v1 to make sure all is well.

If you haven't already taken the time, you might want to read the upgrade instructions and see if they provide any insights:

http://ajax.asp.net/documentation/default.aspx?tabid=47

http://ajax.asp.net/documentation/Migration_Guide_CTP_to_RTM.aspx

ASP.NET AJAX 1.0 - ViewState Problems

I am getting the following error very frequently when working with my AJAX enabled page:

"The state information is invalid for this page and might be corrupted."

Can anyone explain why this is happening and what I can do to prevent it? It is a major problem in the ajax-enabled website I am trying to build. I can be more specific with when and where the error is occuring if needed.

Thank you.

-Tommy

Are you storing custom types in the ViewState? seehttp://www.eranachum.com/PermaLink,guid,295cdfb4-d9d0-4362-8787-9eb80703d13b.aspx

Not sure if this will help, but here's a related post:http://forums.asp.net/p/976239/1472501.aspx

-Damien


Hi,

is the ViewState large for that page? If yes, you could try to split it with <pages maxPageStateFieldLength="charactercount"> setting in web.config. However, are you doing something special on the Page, like loading controls dynamically etc?


Yes, I am loading some custom user controls dynamically at the page_load. Anything I can do to prevent or correct this problem?

Thanks,

-Tommy


Whether you are getting error in IE or Firefox

For Firefox add

if (Request.Browser.Browser == "Firefox") Response.Cache.SetNoStore();

http://forums.asp.net/p/976239/1472501.aspx


FYI...This problem I was having may have been caused by latency problems in my internet connectioin. For about a week I was having some internet connectivity problems where my cable modem was having packet loss up to 60% at times (this is what the tech support guy said). Since my connectivity problems have gone away I haven't received this error even once.


If your problem is solved mark as answer,

So it will help for others

Saturday, March 24, 2012

asp.net 2.0 div in call page

Hi everyone;

I try a div in call the any page but with ie does not work, return this error message "Unknow Runtime Error".

However try with firefox in its work but this browser the return error"System.Web.HttpException: The state information is invalid for this page and might be corrupted.";

What is the problem? Everyone thanks.

your description of the problem is blur. please be more specific and give more details like code sample.


Hi,

this source with call the div in aspx file.

function ajax()
{
var xmlAjax = false;

if(window.ActiveXObject)
{
try
{
xmlAjax = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(err)
{
try
{
xmlAjax = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(err)
{
alert(err)
}
}
}
else if(window.XMLHttpRequest)
{
try
{
xmlAjax = new XMLHttpRequest();
}
catch(err)
{
alert(err);
}
}
else
{
alert('Browser?n?z ajax desteklemiyor');
}
return xmlAjax;
}

var xmlHttp = ajax();

function Loading(url,dvId)
{
if(xmlHttp)
{
xmlHttp.onreadystatechange=function(){
LoadPage(dvId);
}
xmlHttp.open('GET',url,true);
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=iso-8859-9")
xmlHttp.send(null);

}
}

function LoadPage(dvId)
{
switch(xmlHttp.readyState)
{
case 3:
document.getElementById(dvId).innerHTML = "Loading";
break;
case 4:
document.getElementById(dvId).innerHTML = xmlHttp.responseText;
break;
}
}

this source run ie, not load the div in aspx page and return error "Unknow Runtime Error";

however this source run firefox, aspx page load but its page in the click the asp:button return error "

The state information is invalid for this page and might be corrupted.

Description:Anunhandled exception occurred during the execution of the current webrequest. Please review the stack trace for more information about theerror and where it originated in the code.

Exception Details:System.Web.HttpException: The state information is invalid for this page and might be corrupted."

What is the problem ?

Save My God


Hi

Try this:

function newXMLHttpRequest()
{
var xmlreq = false;
if (window.XMLHttpRequest)
{
xmlreq = new XMLHttpRequest();
}else if (window.ActiveXObject)
{
try {
xmlreq = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e1) {
try {
xmlreq = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e2) {
}
}
}
return xmlreq;
}

Best Regards


hi Jin;

Thanks this source but not works, again return this error "Unknow runtime error",

however firefox in works. I dont understant. stupid problem.

ASP.NET 2.0 AJAX WIndows 2003 Server - SYS UNDEFINED ERROR

I am developing one of my web sites where I am trying to implement AJAX and when I deploy it to Windows 2003 server with IIS 7, I get sys undefined JavaScript error. I searched every article on Google and did not find solution to solve it.

I am using ASP.NET 2 AJAX on IIS 7, Windows 2003 platform.

Web site where I am implementing it called47mileads.

Thank you very much for your help!!!

GK

Is the web.config modified to be ajax enabled?

Is Ajax installed on the webserver? OR Are the ajax extention dll's in the bin folder of the website?

==> You should answer YES to both questions; otherwise you get the error you mentioned above.

Kind regards,
Wim


I started project as AJAX enabled project and I tried both adding dll to bin etc...

I mean dlls not needed in bin since I am not using toolkit (but I added ajaxcontroltoolkit.dll as well). Page where it is happening:http://www.47mileads.com/Account_Login.aspx

Still same error.

Thanks,
GK


It looks like you're referencing the client side framework before it has loaded. This should be exactly what you need: http://encosia.com/2007/08/16/updated-your-webconfig-but-sys-is-still-undefined/


47mileadsdotcom:

I started project as AJAX enabled project and I tried both adding dll to bin etc...

I mean dlls not needed in bin since I am not using toolkit (but I added ajaxcontroltoolkit.dll as well). Page where it is happening:http://www.47mileads.com/Account_Login.aspx

I am not talking about the ajaxcontroltoolkit.dll here.

But I'm talking about the System.web.extentions.dll and the system.web.extentions.design.dll.

Lets say you install Ajax locally. Then those dll's get installed in the GAC (global assembly cache). This way they are accessible to all applications. Therefore they do not need to be included in the BIN of the application.

BUT: Lets say you deploy your application to a webserver. On this webserver, there is NO ajax installed, so NO dll's in the GAC of the webserver. NOW both ajax dll's need to be in the BIN of your application!

Could you please comment on my observations? Regarding the fact that I'm wrong / Or right! :)

Kind regards,
Wim


I installed ajax on the web server as well. Still not working. I also have visual studio on the server installed and I create ajax enabled web application on the server and as soon as I convert it to the web site I get sys undefined.

Thank you very much for your help.

GK


Hi GK,

im not sure but I think I heard this problem before and I think that reinstallation is the only solution (but please try to verify that through articles or threads on the internet)

try reinstalling the asp.net framework, and iis and the ajax framework.

kind regards,
wim


Are you using any URL rewriting on your site?

When I try to load your WebResources and ScriptResources, I get a 404 error. The "Requested URL" makes me wonder about rewriting issues:

Server Error in '/' Application.

The resource cannot be found.

Description:HTTP404. The resource you are looking for (or one of its dependencies)could have been removed, had its name changed, or is temporarilyunavailable. Please review the following URL and make sure that it isspelled correctly.

Requested URL:/.aspx



Yes, I use URL rewriting, but page "account login" does not use URL rewriting.

GK


Hi GK,

But as you said above, even if you create an out-of-the-box ajax enabled website, without extra functionality, even then you get the error no?

This makes me guess something is wrong with the installation ...

Wim.


47mileadsdotcom:

Yes, I use URL rewriting, but page "account login" does not use URL rewriting.

It doesn't itself, but it appears that your rewriter might be interfering with the WebResource and ScriptResource requests embedded in the page (which are used to set up the ASP.NET AJAX functionality on the client).

See if you can globally exclude *.axd requests from rewriting.


I created web application in the same directory as my web site on the server. Error I got was update pannel class reference in the code was not found. I referenced System.Web.Extensions DLL and it started working. When I was developing this project on my local box I did not have to reference System.Web.Extensions DLL since it was already referenced in my web.config. AJAX was installed on my server but web extensions assembly was not accessible from web.config. All you have to do is reference System.Web.Extensions in your references before you deploy your project.

Thank you very much for your help!!!


GK

asp.net 2.0 ajax website menucontrol : javascript error :"Microsoft JScript runtime error:

i m developing application using ajax in asp.net 2.0 . I m using menu control of asp.net,multiview and view control.while running this application i got error "Microsoft JScript runtime error: '0.cells' is null or not an object" so now what is the solution of this i have returend following coad in html

<

div>

<

asp:UpdatePanelID="UpdatePanel2"UpdateMode="Conditional"runat="Server"><ContentTemplate>

<tablecellpadding="0"cellspacing="0"border="0"width="100%"><tr><tdwidth="6%"><asp:MenuID="Menu1"runat="server"DynamicHoverStyle-BackColor="Aqua"DynamicHoverStyle-Font-Overline="true"DynamicHoverStyle-ForeColor="Brown"DynamicMenuItemStyle-BackColor="Crimson"dOrientation="Horizontal"StaticEnableDefaultPopOutImage="False"OnMenuItemClick="menu_click"Orientation="Horizontal"><Items><asp:MenuItemText="Operator"Value="0"></asp:MenuItem><asp:MenuItemText="Visitor"Value="1"></asp:MenuItem></Items><StaticMenuStyleBackColor="White"/><StaticMenuItemStyleBackColor="White"/><StaticSelectedStyleBackColor="#FFC080"/><StaticHoverStyleBackColor="#80FFFF"/></asp:Menu><asp:MultiViewID="MultiView1"runat="server"><asp:ViewID="op"runat="server"><tablewidth="30%"><trvalign="top"><td>hetal</td></tr></table></asp:View><asp:ViewID="visitor"runat="server"><tablewidth="30%"><trvalign="top"><td>tarun</td></tr></table></asp:View></asp:MultiView></td>

</tr>

</table>

</ContentTemplate>

</

asp:UpdatePanel>

</

div>

please give me solution for this error...thank u

<asp:menu > control seems to be not compatible withUpdatepanel. Put the menu control outside the updatepanel. If you wantto refresh only updatepanel contents on click of menu control, then setmenu control as an async postback trigger for updae panel as givenbelow.

try following modified code.

<div>
<asp:Menu ID="Menu1"runat="server" DynamicHoverStyle-BackColor="Aqua"DynamicHoverStyle-Font-Overline="true"DynamicHoverStyle-ForeColor="Brown"DynamicMenuItemStyle-BackColor="Crimson" dOrientation="Horizontal"StaticEnableDefaultPopOutImage="False" OnMenuItemClick="menu_click"Orientation="Horizontal">
<Items>
<asp:MenuItem Text="Operator" Value="0" ></asp:MenuItem>
<asp:MenuItem Text="Visitor" Value="1"></asp:MenuItem>
</Items>
<StaticMenuStyle BackColor="White" />
<StaticMenuItemStyle BackColor="White" />
<StaticSelectedStyle BackColor="#FFC080" />
<StaticHoverStyle BackColor="#80FFFF" />
</asp:Menu>
<asp:UpdatePanel ID="UpdatePanel2" UpdateMode="Conditional" runat="Server">
<ContentTemplate>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="6%">
<asp:MultiView ID="MultiView1" runat="server" >
<asp:View ID="op" runat="server">
<table width="30%">
<tr valign="top"><td>hetal</td></tr>
</table>
</asp:View>
<asp:View ID="visitor" runat="server">
<table width="30%">
<tr valign="top"><td>tarun</td></tr>
</table>
</asp:View>
</asp:MultiView>
</td>
</tr>
</table>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Menu1"EventName="MenuItemClick" />
</Triggers>
</asp:UpdatePanel>

</div>


You can also add the below script to your aspx page. It overrides the AJAX function and takes care of the error. This works for problems with Tab Controls too, seehttp://forums.asp.net/thread/1628780.aspx.

<scripttype="text/javascript">

var oldMenu_HideItems = Menu_HideItems;if(oldMenu_HideItems)

{

Menu_HideItems =

function(items)

{

if (!items || ((typeof(items.tagName) =="undefined") && (itemsinstanceof Event)))

{

items = __rootMenuItem;

}

if(items && items.rows && items.rows.length == 0)

{

items.insertRow(0);

}

return oldMenu_HideItems(items);

}

}

</script>

ASP,NET AJAX Enabled site and script module error

Hi All,

I have an ASP.NET AJAX enabled site which works OK in my development environment but when I publish it and view the site I get the error below. I have also tried creating a fresh ASP.NET AJAX enabled site and then publishing it but still the same error. Thinking some files were missing I downloaded the MS AJAX setup on my server (Win2K3 64-bit SP1) but to no avail.

From my Googling I see there are some patches to fix various issues with AJAX but nothing I have found matches my problem. If anyone has any info on this error or could point me in the right direction that would be most appreciated.

Description:Anerror occurred during the processing of a configuration file requiredto service this request. Please review the specific error details belowand modify your configuration file appropriately.

Parser Error Message:Couldnot load file or assembly 'System.Web.Extensions, Version=1.0.61025.0,Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of itsdependencies. The system cannot find the file specified.(xxxxx\web.config line 42)

Source Error:

Line 40:
Line 41: <httpModules>
Line 42: <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 43: </httpModules>
Line 44: </system.web>

The AJAX assemblies are intended to be installed in the servers GAC, therefore they will not deploy in your apps bin folder.

Run the AJAX installation on the server to install the assemblies to the severs GAC.


Thanks for the prompt response. I had tried seveal times to download and install the same AJAX setup on my server. Though I thought I'd give it one last try after your comment and it nows works :)

asp label inside an accordion content

with the code behind i can not access the asp label in my accordion i get an error that says

Exception Details:System.NullReferenceException: Object reference not set to an instance of an object

my accordion looks like this :

<cc1:Accordion ID="GuestAccordian" runat="server" SelectedIndex="0"
FadeTransitions="True" FramesPerSecond="40" TransitionDuration="250" AutoSize="Fill" Visible="true" >
<Panes>
<cc1:AccordionPane ID="TodayCheckins" runat="server">
<Header><a href="http://links.10026.com/?link=" onclick="return false;">Today Check-ins</a></Header>
<Content>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</Content>
</cc1:AccordionPane>
<cc1:AccordionPane ID="FutureCheckins" runat="server">
<Header><a href="http://links.10026.com/?link=" onclick="return false;">Future Check-ins</a></Header>
<Content>adfadsf</Content>
</cc1:AccordionPane>
</Panes>
</cc1:Accordion>

my code behind is this :

string TodayCheckin = "";
using (SqlConnection conn = new SqlConnection(connString))
using (SqlCommand cmd = new SqlCommand(sql_stmt, conn))
{
conn.Open();
SqlDataReader reader = cmd.ExecuteReader();

while (reader.Read())
{
TodayCheckin += reader.GetString(1);
}
conn.Close();
}
Label1.Text = TodayCheckin;

if I move the label out of the accordion it works fine, any ideas would be greatly appreciated.


try,

Label lbl = (Label) TodayCheckins.FindControl("Label1");
if(lbl != null) { lbl.Text = TodayCheckin; }

Wednesday, March 21, 2012

ASP .NET AJAX Error in MOSS 2007

After installing the release candidate for ASP .NET AJAX on MOSS 2007 RTM (Windows Server 2003 sp1), I get the following error on a web part page that contains a web part hosting a very simple user control (markup at end of this post):

Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Respons.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near 'Box1"/>
|Welcome Jim Ohearn<s'.

The error happens only once when I either click on the button or enter text in the text box. By the way, the web part page becomes uneditable at this point and the onClick call back on the button doesn't punch text into the text box.

I modified the web.config file for SharePoint using the example web.config file that is downloaded with the ASP .NET AJAX toolkit. HTTP commands that used to be handled by SharePoint are now handled by the System.Web.Extensions DLL. Could this be the source of the problem? I've included what I think are the critical changes I've made to the web.config file at the end of this post.

Here is a related posting:
http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=898318&SiteID=17

Here, the person making the post accuses a component in the SharePoint page of executing the Response.Write().

If anyone has any ideas, I'd really appreciate it.

Thanks.

Jim

User control markup:

<%@dotnet.itags.org. Control Language="C#" %
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True" />
<script runat="server"
public void handleOnClick(object sender, EventArgs e)
{
this.TextBox1.Text = "Button Pressed";
}
</script
<div id="wcContent" style="height:300px;width:400px">
<asp:Panel runat="server" id="wc_Div" style="position: relative; top: 10PX; left: 6PX;" >
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="conditional" runat="server">
<ContentTemplate>
<asp:Button ID="Button1" OnClick="handleOnClick" runat="server" Text="Button" />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
</div
web.config snippet:

<remove verb="*" path="*.asmx"/>
<remove verb="GET,HEAD,POST" path="*" />
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
<add verb="GET,HEAD,POST" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<add verb="OPTIONS,PROPFIND,PUT,LOCK,UNLOCK,MOVE,COPY,GETLIB,PROPPATCH,MKCOL,DELETE,(GETSOURCE),(HEADSOURCE),(POSTSOURCE)" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /
Here is where the various statments came from:

AJAX web config <remove verb="*" path="*.asmx"/>
MOSS web config <remove verb="GET,HEAD,POST" path="*" />
AJAX web config <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
AJAX web config <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
MOSS web config <add verb="GET,HEAD,POST" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
MOSS web config <add verb="OPTIONS,PROPFIND,PUT,LOCK,UNLOCK,MOVE,COPY,GETLIB,PROPPATCH,MKCOL,DELETE,(GETSOURCE),(HEADSOURCE),(POSTSOURCE)" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />

Don't respond to this thread. It is a duplicate of another started in November of '06.

Here is the URL:

http://forums.asp.net/thread/1468535.aspx

ASBXScriptMap w/ December Futures CTP

I am getting an error on the ASBXScriptMap when installing the December
Futures CTP. I will assume that this is an error on setting up the script
mapping. I am running onWindows XP with VS.NET 2k5. Is there any info on
manually setting up the ASBX ScriptMap?

Wally



Watch an intro to Atlas Beta 2 @dotnet.itags.org. http://aspnetpodcast.com/CS11/blogs/asp.net_podcast/archive/2006/11/20/748.aspx
Listen to the ASP.NET Podcast @dotnet.itags.org. http://www.aspnetpodcast.com/

I am also getting this error when trying to run the same installer...

Anybody?

Array.Add error on Accordion Sample

Hi all !

I've just tried to run the Accordion Sample but i have a problem.

My accordion appears normal and the correct selectedIndex is selected but when i click on other tabs nothing happend.


This is probably because I javascript error. On the page loading I have :

Array.add is not a function
http://localhost:55969/SampleWebSite/WebResource.axd?d=mfyjuyIi_kyiiageb8-dhJuhhEl4d31tjtLnqXaaEJUweLlnyGkeivorEaIgdU-PbZW9-5qoeQV4YUrf2DMON_wD741USQBsSK41MaLx_5k1&t=633001666170937500
Line: 156

Thanks !

Bye

When i look in the webResource.axd the problem is in the initialize : function().




Sounds like maybe the server doesn't have ASP.NET AJAX Beta *2*?