Showing posts with label errors. Show all posts
Showing posts with label errors. Show all posts

Saturday, March 24, 2012

Exceptions and javascript errors

If you have an updatepanel, and an exception is thrown during postback, a javascript error is generated. Is there any way that atlas could display the exception that was generated?

Not with the current release. We'll be adding some support for error handling.

What I am curious is why you'd want to show the exception on the server to the user. Exceptions really aren't meant for end users to see, given they have not much context to interpret them.


Well, it's nice for debugging purposes, I don't mean to necessarily show the error to an end user. Right now, as far as I can tell, the easiest way to see the exception that is generated is to temporarily turn off EnablePartialRendering.

Yes, the plan would be to make sure you can get the exception info, but the plan would probably not provide an out-of-the-box way to display it (you could do that if it makes sense for your app).

What I use right now for seeing exception info is my web development helper's http tracing (the response shows the exception info). Check outhttp://www.nikhilk.net/Projects.WebDevHelper.aspx.

Exception Handling?

It looks like there's no handling for server side errors at this point at least for the Web Service behavior. If I do the following:

[WebMethod]

publicbusCustomer GetCustomer()

{

thrownewSoapException("Failure dude!",SoapException.ServerFaultCode);

returnnewbusCustomer();

}
The call simply doesn't complete to any of the callbacks. Is there anyway to get any error info out of this? It seems to me that the result values should either include some sort of complex object that contain a reference to an error object or else provide some sort of other mechanism that notifies you of an error. Instead of a Timeout method, maybe there should be a more general Error method with an error object you can query for what type of error occurred on the server.

Hello

Try this on the client side javascript:

function displayTimeout(result)

{

alert('timeout:\n' + result);

}

function dispalyError(result)

{

alert('error:\n' + result);

}

function callMyWebservice()

{

GetCustomer(CallbackMethod,displayTimeout,displayError);

}

You can also use Fiddler to view the data returned from the Webservice. (www.fiddlertool.com)


Hi,

following the suggestion given by donaldduck1312, you have to declare an error callback for the asynchronous request. When the callback is invoked, you receive a Web.Net.MethodRequestError instance as the first parameter; this object has methods that allow to display infos about the error:

function onError(e) {
alert('Server Error: ' +
e.get_exceptionType() + '\r\n' +
'Message: ' +
e.get_message() + '\r\n' +
'Stack Trace: ' +
e.get_stackTrace());
}

Wednesday, March 21, 2012

Errors with UpdatePanel & WebPart stuff after upgrade

I recently upgraded from Atlas CTP to Ajax beta 1. I beleive that I properly updated my web.config et. al.; however I keep getting this error regarding the UpdatePanel:

Element 'UpdatePanel' is not a known element. This can occur if there is a compilation error in the Web site.
Element 'AsyncPostBackTrigger' is not a known element. This can occur if there is a compilation error in the Web site.
Validation (XHTML 1.0 Transitional): Element 'Triggers' is not supported.
Validation (XHTML 1.0 Transitional): Element 'ContentTemplate' is not supported.

I can drag the UpdatePanel from the IDE toolbox onto the page, but the Intellisense doesn't work and it causes errors.

On a related note, none of my WebParts stuff is recognized either:

Element 'WebPartManager' is not a known element. This can occur if there is a compilation error in the Web site.
'WebPartZone' is not a known element. This can occur if there is a compilation error in the Web site.

Anyone know what is causing this, and how I can fix?

TIA

hello.

hum...have you changed the web.config entries on the page section?


I've got the same problem. My web.confg page section looks like this:

<system.web><pages><controls>

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

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

<addnamespace="Microsoft.Web.Preview.UI"assembly="Microsoft.Web.Preview"tagPrefix="atlas"/>

<addnamespace="Microsoft.Web.Preview.UI.Controls"assembly="Microsoft.Web.Preview"tagPrefix="atlas"/>

</controls>

I should be using <asp:UpdatePanel...> NOT<atlas:UpdatePanel...> correct? The only items showing up w/ intellisense are <atlas:AutoCompleteExtender>,<atlas:DragOverlayExtender>,<atlas:ProfileService>,<atlas:Script>,<atlas:TimerControl>, and<atlas:UpdateProgress>.

I'm also a bit lost with what I should have in my toolbox after the migration and adding in the value-add controls. Currently, I still have the ATLAS controls in my toolbox, same as I did from before the migration. Should I have removed these? I also removed the .dll's from my BIN directory before the migration (before the installs) and then added back both "AjaxControlToolkit.dll" and "Microsoft.Web.Preview.dll" after the BETA+ValueAdd+Toolkit installs.

Please help, I am LOST! Thanks!!

--c--


Change you asp tags to something else (Atlas" or "ajax" or whatever... will fix it - its a known bug...

Thanks Jody, that did it!!

Someone should consider updating the Migration Guide document. Step #3 specifically says to use "asp" for the tag. After I had already renamed all my <atlas> tags to <asp> I had to go back and put them back :( ...what a pain.

Thanks again!


Thanks Jodi. That helped me a lot. Just a note here. Change the tag prefix in web.config file pages section as well as in the html design file.

Shaun


I have the same error with the installation of AJAX 1.0, without any beta version installed , and the solution was the same, I changed the tags in the web config and in the html and the problem was solved.


Hi,
I don't know to wich categories this belongs butSmartNavigation="true" seems to cause also a "Sys.WebForms.PageRequestManagerParserErrorException" also.

Just some tip if you looking for hours just as I did ;)

Grtz


I've heard that you do not use SmartNavigation with AJAX (or even VS2005)

Errors with Update Panel

Hi,

I am using an update panel for a seamless change when someone changes something on the page. However, I get an error message the second time I change something. The first time i used the update panel was to chan ge the contents of one dropdown list after another list was changed, it would work once but as soon as you change it again in that same session it would error out. I am now trying it again with a checkbox and the ToggleButtonExtender so that images toggle back and forth and I am getting the same error again. Here are the details:

Event Viweer - Application warnings:

Event code: 3009

Event message: Unable to make the session state request to the session state server. Details: last phase='Sending request to the state server', error code=0x80072749, size of outgoing data=0

Event time: 7/21/2007 11:15:09 AM

Event time (UTC): 7/21/2007 5:15:09 PM

Event ID: 9010d9cb58c2471b99f8c0988127eaf5

Event sequence: 181

Event occurrence: 1

Event detail code: 50016

Application information:

Application domain: 7fb7c3c2-1-128295113834687500

Trust level: Full

Application Virtual Path: /AjaxControlToolkitWebSite2

Application Path: D:\WebProjects\AjaxControlToolkitWebSite2\

Machine name: SATURN-V

Process information:

Process ID: 4652

Process name: WebDev.WebServer.EXE

Account name: LAUNCHZONE\CurtisL

Exception information:

Exception type: HttpException

Exception message: Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same. If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection. If the server is on the local machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use either 'localhost' or '127.0.0.1' as the server name.

Request information:

Request URL: http://localhost:2536/AjaxControlToolkitWebSite2/images/minus.gif

Request path: /AjaxControlToolkitWebSite2/images/minus.gif

User host address: 127.0.0.1

User: LAUNCHZONE\CurtisL

Is authenticated: True

Authentication Type: NTLM

Thread account name: LAUNCHZONE\CurtisL

Thread information:

Thread ID: 4

Thread account name: LAUNCHZONE\CurtisL

Is impersonating: False

Stack trace:

Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Error on page:

Sys, WebForms.PageRequestManagerServerErrorException: an unknow error occured while processing the request on the server. the status code returned from the server was: 500

My Code:

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

<!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>Untitled Page</title>

</head>

<body>

<formid="form1"runat="server">

<asp:ScriptManagerID="ScriptManager1"runat="server"/>

<div>

<asp:UpdatePanelID="UpdatePanel1"runat="server">

<ContentTemplate>

<asp:TextBoxID="TextBox1"runat="server"></asp:TextBox><asp:CheckBoxID="CheckBox1"runat="server"AutoPostBack="True"/><ajaxToolkit:ToggleButtonExtenderID="ToggleCheckbox"CheckedImageUrl="images/plus.gif"ImageHeight="9"ImageWidth="9"TargetControlID="CheckBox1"UncheckedImageUrl="images/minus.gif"runat="server">

</ajaxToolkit:ToggleButtonExtender>

</ContentTemplate>

</asp:UpdatePanel>

<br/>

<br/>

<br/>

<br/>

</div>

</form>

</body>

</html>

Code Behind:

PartialClass _Default

Inherits System.Web.UI.Page

ProtectedSub CheckBox1_CheckedChanged(ByVal senderAsObject,ByVal eAs System.EventArgs)Handles CheckBox1.CheckedChanged

Dim strValueAsString =""

If CheckBox1.Checked =TrueThen

TextBox1.Text ="in"

Else

TextBox1.Text ="out"

EndIf

EndSub

EndClass

I have had this error more than once now and I'm not sure how to fix it. When I remove the update panel everything works fine, any ideas?

It seems you are uaing different setting for Session other than "InProc". Pls make sure you have configured it properly.


Thanks, I think that helped.

errors with the control toolkit

I just downloaded the ajax extensions, and toolkit, but everytime I add an item from the toolkit to my web form I get an error in the designer file.

It generates code in the designer.vb file like

but I get an error that says:

ProtectedWithEvents RoundedCornersExtender1As AjaxControlToolkit.RoundedCornersExtender

Type 'AjaxControlToolkit.RoundedCornersExtender' is not defined.

I also get an error from my web.config file that says:

Could not load type 'System.Web.UI.Compatibility.CompareValidator' from assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

pointing to the line:

<add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="System.Web.UI.Compatibility.CompareValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

does anyone have any idea what I'm doing wrong, or how I can fix this?

thanks,

smtraber

This post may help youhttp://weblogs.asp.net/scottgu/archive/2007/01/25/links-to-asp-net-ajax-1-0-resources-and-answers-to-some-common-questions.aspx (look down a little bit for the stuff on validators)

Errors with all UpdatePanels after installing the January Release

I installed the January release yesterday and am now getting a strange error with all of my update panels. It happens in both the existing Atlas application I was working on, and in a new test project I created to test the error.

I get the follow message box when any postback action is taken inside an update panel:

An async postback was caused by a control within UpdatePanel '$TestPanel' but the panel could not be found in the page.
I was having no trouble out of the December release, and the update panel that it says it can't find is there (minus the $). I would appreciate any ideas on a fix.

Got it. I fibbed a bit in my previous post, the $TestPanel isn't their exactly, it's missing the underscore I prefix my control ids with. It appears this bug was introduced in the January release.

As soon as I renamed my UpdatePanel from "_TestPanel" to "TestPanel", everything worked as expected.


Hi Nick,

How do you rename from _TestPanel to TestPanel ? Please help me I have the same problem.


Can you post a quick sample repro of what failed for you?
Create the following in page, notice the Update Panel's ID is prefixed with a "_".
<form id="form1" runat="server">
<atlas:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" runat="server" />
<div>
<atlas:UpdatePanel ID="_Test" Mode="Always" runat="server">
<ContentTemplate>
<asp:TextBox ID="_SomeTextBox" runat="server">
</asp:TextBox>
<asp:Button ID="_SomeButton" runat="server" />
</ContentTemplate>
</atlas:UpdatePanel>
</div>
</form
When you run this sample, and push the button, you should get the error described in the first post. Now, take out the underscore in the Update Panel's name, like this:

<form id="form1" runat="server">
<atlas:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" runat="server" />
<div>
<atlas:UpdatePanel ID="Test" Mode="Always" runat="server">
<ContentTemplate>
<asp:TextBox ID="_SomeTextBox" runat="server">
</asp:TextBox>
<asp:Button ID="_SomeButton" runat="server" />
</ContentTemplate>
</atlas:UpdatePanel>
</div>
</form
Run it again, and it error is gone.
OK, thanks for the sample Nick. Essentially, the code in the server looking for the Panel is not handling the leading "_".

Just to follow up, this happens any time part of the UpdatePanel's ID has an underscore in it, not just a leading underscore. This also happens if you have other naming containers, such as Content controls in Master Page scenarios, that have underscores in their names.

For the meantime, just remove the underscores. This issue will be fixed in a future release of Atlas.

Thanks,

Eilon


Does this problem happen for other reasons? I have made sure that I have no underscores in any of my master/content/container controls, but I still get that message. The difference is that in my page source, the update panel is named with underscores like: "_ctl0_cphMain_upMyPanel", but in the JS alert window, its referred to as "$ctl0$cphMain$upMyPanel".

The weird thing is that the update panels update when a control event for a control that is NOT in an update panel is fired. The only time it throws the alert is when a control WITHIN one of these update panels is fired.

ANY help is appreciated! Thanks!!!!!!

--
tb


Hi tb,

The problem is happening because of "_ctl0" - though I'm not sure what control that is. If you can figure out what control that is, give it a specific name so that it doesn't get autogenerated to "_ctl0".

Thanks,

Eilon


I think this might be a bug with master pages. the cphMain part of that control id is the content placeholder on my master page. that would lead me to believe that the "_ctl0" is coming from something outside of that tag.

I have tried to change the form name on the master page, since thats the only server control that surrounds my content placeholder (cphMain), but when the controls are rendered, every single one of them has a "_ctl0" at the front of the id, and the rendered form id is still "aspnetForm".

Any thoughts? Thanks!

Errors while Using MasterPage and AJAX.

Hello,

I Creat a New AjaxEnabled WebSite. Now I take one Master Page. Put My Script Manager On this Page, Now I create Content Page for my Master Page. Now when I place any of Ajax control (for example UpdatePanel) It shows me an Error -- Update Panel is not known element.This can occur if there is a compilation error in website. I am not able to use ajax controls.

Now I go to HTML Source Editing Menu and select different Target Schema For Validation than all controls start working Properly. Now I close my visual studio and reopen my web site that errors apears again and again I have to change Target Schema for Validation.

My real Application caontains over 200 pages. All need to be used with master page. so its very tough for me to handle this. Any one can show me the way how I can overcome this? If I do not use Master page than its working fine but I can not do like this.

Further Currently I m using Windows XP. And this problem is not faced with Windows VISTA.. Than what is the reson behind that?

hello.

are we talking about ide errors or compile time errors? if it's ide errors, then welcome to "the real world" since I've never been able to solve mine while i was using vs 2005 (and even now, in 2008, i do get those kind of errors sometimes)


I also have this problem, but it compiles and runs, so I just don't care about it and try to live with this...


Its IDE Error.. And its fine after I compile and rum my APP

But when I use AutoComplet Cotrol... Then I must remove all errors from all the pages where I have use Auto Complet cotrol. Other wise it will not work after I deploy my web site.


hello again.

hum, i'm not following. can you give more details about that?


Hi,

This can be cause by diffrerent things, please check the following link for more information, thanks:

http://forums.asp.net/p/1038012/1772299.aspx

http://www.msdner.com/forum/thread479164.html

the issue is caused by the permission setting of the current
machine. I think there are some restrictions in the specific folder you
create before. So, after you choose the default creation, the issue has
been resolved.

Best Regards,

Errors in web.config when creating AJAX-type projects

Hi,

Whenever I create a AJAX website, or AJAX Control toolkit website, errors are found in my web.config, even before I've done anything

Warning 1 The 'requirePermission' attribute is not declared. C:\Documents and Settings\Louis\My Documents\Visual Studio 2005\WebSites\AJAXEnabledWebSite1\Web.config 6 213 C:\...\AJAXEnabledWebSite1\
Warning 2 The 'requirePermission' attribute is not declared. C:\Documents and Settings\Louis\My Documents\Visual Studio 2005\WebSites\AJAXEnabledWebSite1\Web.config 8 205 C:\...\AJAXEnabledWebSite1\
Warning 3 The 'requirePermission' attribute is not declared. C:\Documents and Settings\Louis\My Documents\Visual Studio 2005\WebSites\AJAXEnabledWebSite1\Web.config 9 199 C:\...\AJAXEnabledWebSite1\
Warning 4 The 'requirePermission' attribute is not declared. C:\Documents and Settings\Louis\My Documents\Visual Studio 2005\WebSites\AJAXEnabledWebSite1\Web.config 10 213 C:\...\AJAXEnabledWebSite1\

Any ideas?

bump anyone?

EDIT: Also, I noticed intellisense seems to be broken, in the sense I only get "!--, ![CDATA[]], ?" when I type "<"


Ok, installing SP1 kinda solved it.

Errors in code view from AJAX scriptmanager control

When I am working on my page in code view, errors populate the error window ("ScriptManager" is not a known element... and a lot like that relating to any ajax control). But in design view everything works fine. It also is not using any of the ajax controls in the tag suggestion dropdown window. Any suggestions on how to fix this?

Hi

Did you include System.Web.Extension dll in your bin folder

Did you add

<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
<pages>
<controls>
<add tagPrefix="ajax" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>

in your web.config .

Try that out..

Hope that works it out

Bye

Errors hosting using AJAX ASP.NET

Hello,

I am a hosting website with a host who claims to have the latest version of the AJAX ASP.NET.. On my machine everything works fine while on the hosters it doesn't giving me an error like this

Configuration Error:


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.

Line 38: </httpHandlers>
Line 39: <httpModules>
Line 40: <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 41: </httpModules>
Line 42: </system.web>
 
Please anyone knows why I'm getting that error?
Thanks! 

Means the hoster does not have the 'System.Web.Extensions.dll install in the gac, you can put it on the bin directory and make sure the hoster is running in medium or full trust. Check this post for more details:http://alpascual.com/blog/al/archive/2006/12/20/Browse-all-AJAX-controls-at-ajax.alpascual.com.aspx

Hello AlbertPascual and thanks!

I will try that... but what if the Hoster is saying that the latest version is installed?... could be it wasn't installed correctly? I know this framework by default gets installed in the GAC, so there shouldn't be any problem with that!

THanks!


You can always override what they have by adding the dlls in your bin directory, if running at full trust, you'll be using your dlls instead of the hoster dlls.

Hope this helps


I belive still loading the old dll from your hoster and cannot find that method, check the public key PublicKeyToken=31bf3856ad364e35' to see if that's your dll public key

Thanks again!

in fact thanks to you it did help as moved on to another error now :)


Parser Error Message:Couldnot load type 'System.Web.UI.Compatibility.RequiredFieldValidator' fromassembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35'.

Line 1: <%@. master language="C#" autoeventwireup="true" inherits="Main, App_Web_main.master.cdcab7d2" %>
Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
What could this error be ? 


How can I check the public key?

how can I make sure they are pointing to my bin directory? there are no <trust> tags in my web.config and not even in the default installation of the AJAX fframework

Thanks!


hello.

i think that you haven't updated your web.config to the last version. it seems like you're strill trying to get the compatibilty validadors from the ajax dll and in the current version they're in an extra download which you can get from one of the top posts of the ajax library forum

hmmmmm yes your right... I solved it now working

however I'm concerned about the hosters how they said they have the latest version of AJAX 1.0 and then I had to use the Bin... I wish to eliminate the Bin folder so as to use the GAC which should be faster!!!

Thanks anyway!


Actually - the only faster there is is the first time the app spins up... placing something in the Gac does not make it faster overall it just means that it is spun up before the first person has requested a method etc from what is contained withing... this is a major misconception... GACcing something only means it is already resident but once something that is not gacced versus something is is spun up - they are equal in perf...just FYI

Errors after Installing RC1 and the Dec CTP

Getting this one again: The type or namespace name 'UI' does not exist in the namespace 'Microsoft.Web' (are you missing an assembly reference?)

The following that I have checked:

1.) Made sure the System.Web.Extensions.dll was in the bin folder

2.) Copied and renamed the Web_CTP.config file to web.config and added it to my project

Anyone else hit this?

Make sure the dlls are in the GAC
Dropped them in the GAC, still no love.

Rick

Last step I know, check your web.confighttp://alpascual.com/blog/al/archive/2006/10/24/Manually-upgrading-from-Atlas-to-ASP.NET-2.0-Ajax.aspx


Little more information:

Created a new website for kicks on the same machine using the Ajax CTP Template. Works fine. Did a diff on the two web.config files and the only difference was:

<buildProviders>
<add extension="*.asbx" type="Microsoft.Web.Preview.Services.BridgeBuildProvider"/>
</buildProviders>

Took this out because it can only be placed in the top level of the site. Is there a problem with using this web.config file or adding AJAX specific settings in a folder below the root? I originally had all of this stuff in the top level web.config file, but was causing the problems described above so moved it ot the folder in which my ajax code was located.


It sounds like your referencing "Microsoft.Web" in your code somewhere (markup or code behind). The namespacing has all changed, so you'll need to modify all your existing references accordingly.
No references to that NS anywhere...
No references to that NS anywhere...
hello.

you're?talking?about?a?top?web.confg?file...are?you?saying?that?your?app?is?a?subdir?of?another?web?app??if?so,?then?you?should?make?sure?that?your?top?web?app?is?configured?to?use?asp.net?2.0?and?the?ajax?entries?should?be?put?in?that?top?condig?file.

another thing you should do: check for the scriptresourcehandler. make sure it's on your web?.config file. if this still doesn't solve your problem, use fiddler to see what you're getting from the server and then let us know.
MS changed the namespace in RC1 to System.Web.Extensions, this might be your problem. I had old statements in web.config from Beta 2 for Microsoft.Web.Extensions. I changed it to System and wham, it works. Give it a whirl.