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

Wednesday, March 28, 2012

Why ScriptManager in MasterPage is not enough to the toolkitExtender control?

This is the error I get when look on a page and drop the User control that include the ajaxTooltip from any type.

Any suggestion?

The Error

Do you use ScriptMangerProxy?you need to use ScriptManager/ ScriptManagerProxy both for master page.

Where to add the ScriptManager and where to add the ScriptManagerProxy to get a clear design time project developing?

To explain the controls, pages, masters I have, here are they:

1. A master page that include a ScriptManager (I try to include a ScriptManagerProxy also).

2. A page that inherit the MasterPage and have a User Control in it by design time(drag and drop).

3. A User Control that have a modalPopupExtender in it, that work properly.

My only problem that other developers use my User Control in them Pages and the User Control(that added to the page) raise a:

Error Rendering Control

An unhandled exception has occurred.

The control with ID 'MpdalPopupExtender1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

What can I add to the Page, Master or may be web.config?

wierd behavior on submit button (partial postback acting as full postback randomly)

I setup this example from here, but I am getting some weird behaviour.

First off I was getting the pretty famous popup error of "unknown error" I was able to fix this by adding

<xhtmlConformancemode="Transitional"/>

to the web.config.

Right now the weird error that I am experiencing however is when I do a partial postback, the button actually does a full postback the first time, then after that it turns to partial post backs. This behaviour isn't always consistent, sometimes it takes 10 postbacks before it starts working as a proper AJAX partial postback.

Doesn't make any sense to me ?

Any one got an idea on this one? I copied the source directly from here, its very straightforward.

article

I have the same behavior. But I think in my case it is because I'm running vista RC1

If I clear my temporary internet files it seems to work ok for a while tho


I'm still running windows 2000 and its messing up, so I don't think it has anything to do with that.


At first clearing temp files seemed to help, but now it doesn't. It's so erratic that I can't come up with any possible ideas right now.

Anyone else experiencing this?

Thanks,

mike123

Wierd Error if page is left alone for too long... (ajax pages)

I have a wierd error that only occours if there has been no interaction with the webserver for too long. (over 30 mins)

The specific error that is returned is

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occoured while processing the request on the server. The status code returned from the server was: 504

This seems to happen to any page that has a script manager and update panel in it. I have tried adjusting the session timeout period, but this doesn't seem to help. It is almost like the page is loosing it's reference to the script files required by the ScriptManager. Is there some caching parameter I could add to the page to extend the cache time?

Any other ideas are welcome. This is a strange one. So far the workaround is to add a timer to the page that just keeps it alive.. (updates the page every minute or so with a meaningless value...)

TIA

Rob

See:http://forums.asp.net/p/1134743/1809108.aspx#1809108

-Damien


Hi,

Please see this post:504 Gateway Timeout occuring for very small number of users

504 Gateway Timeout
The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server it accessed in attempting to complete the request.

Best Regards

Monday, March 26, 2012

window.debug.isDebug is null or not an object

I have user control which contains UpdatePanel. For UpdatePanel I have tried to put UpdatePanelAnimationExtender, but there's coming javascipt error which says "window.debug.isDebug is null or not an object". Without UpdatePanelAnimationExtender UpdatePanel is working great. I'm using ASP.NET 2.0 and latest AJAX Framework and ControlToolkit. What could be wrong?

Thanks
juster

You likely have old scripts from an AJAX CTP or Beta cached on your web server or on your browser. Reset IIS and make sure you do a CTRL-F5 on your browser.

window.debug.isDebug is null

While using updatepanel, I'm getting a javascript error window.debug.isDebug is null. Though updatepanel gets updated, some events like ajaxcontroltoolkit's updatepanelanimation etc. are not working. I am experiencing this problem only in machine where AJAX Futures December CTP was installed. Before installing AJAX I have removed all previous ajax versions also. Anyone else met with the same kind of error?

Maybe your AjaxToolkit isn't newest,The newest version haven't the problem.

With dynamic created Tabs extender any postback produce error, and temporary fix

I found another bug with Tabs extender:

On the page aspx

<ajaxToolkit:TabContainerID="Tab1"runat="server"Width="300px"ScrollBars="Auto"Enabled="true"ActiveTabIndex="0"></ajaxToolkit:TabContainer>

Then from server side, I add several tabs, but any button, click on that page would produce error:

Line 44: public new TabPanel this[int index]
Line 45: {
Line 46: get { return (TabPanel)base[index]; }
Line 47: }
Line 48: }
Source File:C:\Inetpub\wwwroot\AtlasControlToolkit-14384\Development\AjaxControlToolkit\Tabs\TabPanelCollection.cs Line:46

I fixed it temporarily with file TabContainer.cs, line 302 by using try and catch:

protected override void LoadClientState(object clientState)
{
Dictionary<string, object> state = (Dictionary<string, object>)clientState;
if (state != null)
{
ActiveTabIndex = (int)state["ActiveTabIndex"];
object[] tabState = (object[])state["TabState"];
for (int i = 0; i < tabState.Length; i++)
{
try
{
Tabs[i].Enabled = (bool)tabState[i];
}
catch
{
continue;
}
}
}
}

The error is still exist with the newest build# 14429. Can someone at least put the try and catch block into the new build?

Saturday, March 24, 2012

Wizard Control, UpdatePanel, and Validation causes error in webresource.axd Bug

I have a wizard control with several steps, some of which use control validation. When placed inside an Ajax UpdatePanel, the webresource.axd javascript is no longer able to reference the controls validated in the previous step, and halts on:

WebResource.axdfunction ValidatorGetValue(id) { var control; control = document.getElementById(id); if (typeof(control.value) == "string") { return control.value; } return ValidatorGetValueRecursive(control);}

where the document.getElementById(id); returns null.

A workaround is to disable clientside validation on all validation controls, which is not a great loss when using ajax, but utterly annoying when you have gone to all the trouble of writing javascript for custom validation controls, etc.

The cause is probably complex, so I shall not comment on how it should be resolved. I assume, however, that the javascript is correct in that the controls not being rendered are in fact to be found in the DOM.

At least in my case, it would be nice if the javascript checked for null and ignored the control if it wasn't there.

Anyhow, it would be much appreciated if someone would look into it.

Thanks

In Atlas 1.0 we have updated versions of the validators that are compatible with UpdatePanel. In the current CTP I'm afraid that you'll have to use some workaround.

Thanks,

Eilon


This sounds like it could be related to my problem:

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

What work arounds are available for this issue? At the moment I'm displaying all the controls in divs and just hiding them, which is pretty horrible.

Thanks,

Paul

Wizard with Update Panel

I have a Wizard control with inupdatepanel . I am trying to create dynamic wizard steps in pagepre_init event, but it is giving me an error " object reference not setto an instance of an object" . without updatepanel it's workingproperly.

Thanks in Advance

Do you have a fileupload control in the wizard? If so,see this thread.

hello.

please post a simple page that reproduces this problem.

Working Ajax asp page installed on Win2003 server gives scriptmodule error due two two ver

LS,

I'm using VS2005 C#. I installed VS 2005 SP1 and than I installed Ajax support.

I made my website and on my development PC it works.

On my windows 2003 server (with the windows 2003 SP1 installed) I have no VS (so no VS 2005 SP1), it is just a server.

The older version of my website without Ajax is perfectly accessible through the internet. However when I install my new website (I first did install the Ajax setup.MSI and the ASP.net 2 redistributals were already installed as they were needed for my previous version of the website) my website is no longer accessible, it produces an error.

When I now access my page through the internet from my server I get the following configuration error (in the web.config file):

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

Should I copy System.Web.Extensions.dll from my development PC to the server (if so where to?)

My guess is that there should be no need to manually copy files, so what is the problem. Is there a different setup to install Ajax support on a Windows 2003 server?

I hope someone has the answer and is willing to help me.

Kind regards

Clemens Linders

I found a thread stating that I needed to copy the System.Web.Extensions.dll's to the bin folder of my project and than publish the website.

So I did and luckily the error above was gone, unluckily I got another error (seems a lot like the first one but the error above originated from the web.config file and this originates from the ASPX file).

I still hope anybody can give me a clue.

The error is (unfortunately partially in dutch, I put a translation between the curly brackets {}):

Serverfout in toepassing /.

Parser-fout {Parser-error}

Beschrijving:Er is een fout opgetreden bij het parseren van een bron die vereist is om aan deze aanvraag te voldoen. Raadpleeg de volgende details van deze parser-fout en pas het bronbestand waar nodig aan. {Description: there was an error ......}

Parser-foutbericht:Kan bestand of assembly System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 of een van de afhankelijkheden hiervan niet laden. De manifestdefinitie van de gevonden assembly komt niet overeen met de assembly-verwijzing. (Uitzondering van HRESULT: 0x80131040){Parser-errormessage: Cannot load the file or assembly System.Web.Extensions...or one of it's dependancies. The manifestdefinition of the found assembly doesn't concur (isn't the same) as the referenced assembly}

Fout in bron: {error in source}

Regel 3: <%@dotnet.itags.org. Register Assembly="WebChart" Namespace="WebChart" TagPrefix="Web" %>Regel 4:Regel 5: <%@dotnet.itags.org. Register Assembly="System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"Regel 6: Namespace="System.Web.UI" TagPrefix="asp" %>Regel 7:


Bronbestand:/Default2.aspx Regel:5

Laadtracering van assembly: U kunt de volgende informatie gebruiken om vast te stellen waarom de assembly System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35niet kan worden geladen.

WRSCH: registratie van assembly-bindingen is uitgeschakeld.Als u assembly-bindingsfouten wilt registreren, stelt u de registerwaarde [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) in op 1.Opmerking: er is een prestatiestraf gekoppeld aan de registratie van assembly-bindingsfouten.Als u deze functie wilt uitschakelen, verwijdert u de registerwaarde [HKLM\Software\Microsoft\Fusion!EnableLog].

It is as if it's complaining about a wrong version but I only downloaded ONE version of Ajax and I only have this version on both my development PC as deployment server.

On this site I also found a thread regarding this parser-error. In that thread someone asked if AjaxControlToolkit.dll was installed. I do not have a AjaxControlToolkit.dll (I do have AjaxExtensionsToolbox, but also copying that into the bin-map didn't help). Furthermore the same solution was offered to copy the System.Web.Extensions.dll't to the project's bin folder. Luckily for that person it did the trick for him, but I already did this. Another option that was mentioned is to give the command gacutil -f system.web.extensions.dll. So I copied gacutil to the bin-folder of my server. from CMD (DOS) I executed gacutil -f system.web.extensions.dll

And the result was: system.web.extensions.dll is an invalid option?? (it is in the same bin-folder)

I also downloaded and installed The AjaxControlToolkit. I put the AjaxControlToolKit.dll in the bin-folder of my project, I published the website and still I get this error.

So to repeat in short what I did was:

I installed Ajax both on my developer PC and windows server 2003 deployment pc. I copied system.web.extensions.dll + system.web.extensions.design.dll + AjaxControlToolkit.dll (+ some other dll's) to the bin-folder of my project. I published the website to my server and still I run into problems.

Any ideas?

Kind regards,

Clemens Linders

-------------------------------

Update on my problem (unfortunately it is still there)

As some people in this forum mention that they also have VS installed on their server I installed VS 2005 on my server.

Than I installed the VS80 SP1 update and than I installed Ajax ASP.NET2 version 1.00

I even ran gacutil /i system.web.extensions.dll (also for the design dll)

As my problem persisted I copied the source of my website to this VS and compiled it (the system.web.extensions dll's and the AjaxControlToolkit.dll copied to the bin-folder). Surprisingly enough it did not compile and came up with more or less the same error.

Maybe this will help someone to identify my problem?? Is it an installation issue??

The error I got was:

Error 1 Kan bestand of assembly System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 of een van de afhankelijkheden hiervan niet laden. De manifestdefinitie van de gevonden assembly komt niet overeen met de assembly-verwijzing. (Uitzondering van HRESULT: 0x80131040) C:\Documents and Settings\Administrator\Mijn documenten\Visual Studio 2005\WebSites\RAT\Default2.aspx 5

Translation:

Error 1 cannot load the file or assembly System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 or one of it's dependancies. The manifest of the found assembly doesn't match the assembly reference........

The error points to line 5 of Default2.aspx which is:

<%@dotnet.itags.org.RegisterAssembly="System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

Namespace="System.Web.UI"TagPrefix="asp" %>

It's nice to see that 31 people (at this time) took an interest to look into my problem. I hope that this latest development can give someone a clue as to what actually is causing my problem.

Again thanks.

Clemens Linders

==============================================================================================================================

Finally I can report to you that I have solved my problem (thanks to a tip of my brother).

The error does seem to report that there are two versions of the system.web.extensions.dll. But how I only installed the Ajax asp.net 2 setup I got from the original Ajax website. But than I remembered I also installed VS Orcas Beta 1. And this installed a second version of the system.web.extensions.dll.

I saw in this forum that sometimes people said I looked into my GAC and saw. For newcomers (like myself) let me tell you that if you open c:\windows\assembly that you are actually looking in the GAC. For some people who have the same problem as I did, it is a matter to install the system.web.extensions.dll in the GAC. The way people advise how to do this on this forum is using gacutil /f system.web.extensions.dll (don't forget the design version as well). I found that first I needed to copy the gacutil (which I found after doing a search) in the seem folder as the dll and than still if I used /f I got an error but after doing gacutil /? it seemed far more obvious to do gacutil /i system.web.extenstions.dll (/i for install) which at least worked. My brother also told me that when you open the Assembly folder (or you may call it the GAC), you can add dll's to the gac by simple dragging them to the assembly folder (copy and paste doesn't work). And indeed this is a far easier way of adding dll's to the gac.

But as mentioned this didn't solve my problem. Although I could see that on my server I had the version 1.0.61025.0 installed and on my development system I had 1.0.61025.0 and 2.0.0.0 And than I realised that this 2.0.0.0 version had to come from the Orca Beta version.

I tried to cheat and also installed the 2.0.0.0 (which is 925Kb versus aprox 650Kb for the other version). But that didn't work.

I found that on the web.config file most references to the system.web.extensions.dll were made to 1.0.61025.0 but some were made to 2.0.0.0. Als the aspx file made reference to 2.0.0.0. I changed all these to 1.0.61025 but that didn't help. Suddenly the error on my server chnaged from line 5 to line 1.

When you publish the website a new dll is made by VS. and during publishing a reference is added to line 1 of the aspx file. Because I also had the 2.0.0.0 version of the system.web.extensions.dll in my GAC. A reference to this 2.0.0.0 dll is made in the dll that is created during publishing. I tried to remove this 2.0.0.0 dll by right-clicking it in the windows/assembly folder and choosing remove. But it kept saying it couldn't remove this file. It was being used. So that is when I was sure that this had to come from Orca.

Only when I removed Orcas and repaired VS 2005, my problem was gone.

I did get another problem though, my webservice suddenly sometimes doesn't give a response. I haven't debugged that yet but I found a reply on the interned of someone who also removed Orca and repaired VS 2005 and everything seemed to work accept for websites. Websites and webservices isn't the same but I guess I will remove VS 2005 and re-install it.

Despite that the golden tip didn't come from this forum I would like to thank the people who read this and at least tried.

The reason that I kept updating my problem and finally also mentioned the salution is that I hope that others will benefit.

OR BETTER: don't make the same mistake as I did and don't install a Beta version of VS on the same partition as where you have your VS that you really use

I hope that people will benefit from my mistake and what I have written here.

Goodluck

Clemens Linders


Versiegegevens: Microsoft .NET Framework Versie:2.0.50727.42; ASP.NET Versie:2.0.50727.210

Hi, Clemens Linders

We appreciates that you share the solution so that the answer can be found and used by other community members having similar questions.

Thank you very much,You are so kind:)

Best Regards

Wot is this error "DynamicControlID must be set "

Server Error in '/AJAXEnabledWebSite1' Application.

DynamicControlID must be set

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.ArgumentException: DynamicControlID must be set

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

What ajax components do you have on the page you are running? Most likely one of them is missing a control association. For example the modalpopupextender has to have a dynamiccontrolID set

it's the web control to associate the AJAX Extender with... look through all the ajax components on the page and check to see if any of them are missing a "DynamicControlID" And if they have that as a property that can be set

Wednesday, March 21, 2012

XmlDocument parameter error

I have the following webservice function definition:

[WebMethod(EnableSession =true)]

[ScriptMethod(ResponseFormat =ResponseFormat.Xml)]

publicXmlDocument requestXML(XmlDocument requestXML)

I am trying to pass the XmlDocument parameter from JavaScript on an Ajax enabled web page:

<scripttype="text/javascript">

function newDocument(text)

{

if (typeof DOMParser !="undefined")

{

return (new DOMParser( )).parseFromString(text,"application/xml");

}

else

{

var doc =new ActiveXObject("MSXML2.DOMDocument");

doc.loadXML(text);

return doc;

}

}

// This function calls the Web Service method.

function request()

{

var entryElem = document.getElementById("entry");var entryText = newDocument("<loginOwner><question>"+entryElem.value+"</question><UserID>visitor</UserID><OwnerName>anonymous</OwnerName></loginOwner>");

improxy.requestXML(entryText, onOK);

}

function onOK(resultXML)

{

alert(resultXML.xml);

}

</script>

I am getting an error: "Microsoft JScript runtime error: Object doesn't support this action". In the debugger, this error occurs in the function: "Sys.Serialization.JavaScriptSerializer._serializeWithBuilder".

Isn't the XmlDocument type supported as a parameter in Ajax?

Thanks,

Eyal

The Client Side document is not compatible with the server side object. You can simply send the xml as plain string.


1. The return value is also a server side XmlDocument and this is translated correctly to the client side object. Can't this be done for a parameter?

2. If I send the XML as string, the webservice complains about wrong data types. Is there another way to tell the server to handle this string as XML?


Hi

I have tested that sending the XML as string to webservice,and it works.

Try this:

Default.aspx

<%@. Page Language="C#" %>

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

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>

<script type="text/javascript">
// function newDocument(text)
// {
// if (typeof DOMParser != "undefined")
// {
// return (new DOMParser( )).parseFromString(text, "application/xml");
// }
// else
// {
// var doc = new ActiveXObject("MSXML2.DOMDocument");
// doc.loadXML(text);
// return doc;
// }
// }

// This function calls the Web Service method.
function request()
{
// var entryElem = document.getElementById("entry");
var entryText = "<loginOwner><question>entryElem</question><UserID>visitor</UserID><OwnerName>anonymous</OwnerName></loginOwner>";
// throw "";
Samples.AspNet.WebService.GetXmlDocument(entryText, onOK);
}

function onOK(result)
{
// Page element to display feedback.
var RsltElem = document.getElementById("ResultId");

var readResult;
if (document.all)
readResult = result.documentElement.firstChild.text;
else
// Firefox
readResult = result.documentElement.firstChild.textContent;
RsltElem.innerHTML = "XmlDocument content: " + readResult;
}
</script>

</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<asp:ServiceReference Path="http://localhost/AJAXEnabledWebSite/WebService.asmx" />
</Services>
</asp:ScriptManager>
<div>
<button id="Button2" onclick="request(); return false;">
Server Time</button>
<span id="ResultId"></span>
</div>
</form>
</body>
</html>

WebService.asmx

<%@. WebService Language="C#" Class="Samples.AspNet.WebService" %>

using System;
using System.Web;
using System.Xml;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Script.Services;

namespace Samples.AspNet
{
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class WebService : System.Web.Services.WebService
{
public WebService() { }

[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
public XmlNode GetXmlDocument(string requestXML)
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(requestXML);
return xmlDoc;
}
}
}

Best Regards


More information about this topic:

Passing an XML instance to a Web Service Method :http://objectsharp.com/cs/blogs/matt/archive/2004/10/30/989.aspx

Passing XmlDocument to .Net Webservice from IE client :http://www.dotnet247.com/247reference/msgs/6/32784.aspx


Thank you. I know passing a string works. My web service expects an XmlDocument parameter, not a string.


I tried the links. None of them shows how to pass an XmlDocument with Ajax. Only directly with XMLHTTP.