AJAX :: AjaxControlToolkit.ToolKitScriptManager.OnInit() Throws Thread Abort Exception For Every Aspx Page

Nov 3, 2010

AjaxControlToolkit.ToolKitScriptManager.OnInit() throws thread abort exception for every aspx page. I have an asp.net 2.0 Ajax application, where I have set the following properties of ToolScriptManager on my pages.

<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnableScriptGlobalization="true"
EnableScriptLocalization="true" CombineScripts="true" EnablePageMethods="true">
<Scripts>

I have this configuration on all the aspx pages in my application. When I checked the .NET CLR exception Performance counter I figured out a large number of exceptions, mainly one exception per page load is occuring. On running windbg I was noticed that

AjaxControlToolkit.ToolKitScriptManager.OnInit() has the following code block which is getting executed. The OutputCombinedScriptFile() returns true. But since I am setting my controls on DesignTime still designmode is set to false for toolkitscriptmanager.

if (!DesignMode && (null != Context) && OutputCombinedScriptFile(Context))
{
// This was a combined script request that was satisfied; end all processing now
Page.Response.End();
}

I am not sure if this is a reported bug or even a bug with ajax, but this is causing havoc in my load test results as I have around 3 hundred thousand HTTP requests to be handled per day out of which 80% are aspx page requests resulting in a large number of threadafbortexceptions, thus affecting the performance.

View 3 Replies


Similar Messages:

State Management :: Thread Abort Exception In C#?

Feb 25, 2011

what are the possible cases/causes for a thread abort exception? and how can we re-produce the same scenario if such exceptions can only be found on live production environment?

is it possible to access session variables when such exceptions occur or will session variables also get flushed and no longer be available? if we are able to manage/handle such exceptions, then will our application will continue to provide us a log for success/failure case of any particular task/process from where it was stopped?

View 3 Replies

C# - ToolkitScriptManager Throws NullReferenceException During Concurrent Access To A Page For The First Time

May 14, 2010

i'm developing a ASP.NET web application which uses the AjaxControlkit 3.0.30512.20315. I have a ToolkitScriptManager instance on my master page which has some ScriptReferences in the CombineScripts collection. If i access my default page from 2 differenct clients after an iisreset, i get the following exception

[NullReferenceException: Object Reference not set to an instance of an object.]
System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +143
System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value) +11
AjaxControlToolkit.ToolkitScriptManager.GetScriptCombineAttributes(Assembly assembly) +129
AjaxControlToolkit.ToolkitScriptManager.IsScriptCombinable(ScriptEntry scriptEntry) +148
AjaxControlToolkit.ToolkitScriptManager.OnResolveScriptReference(ScriptReferenceEventArgs e) +415
System.Web.UI.ScriptManager.RegisterScripts() +191
System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +113
System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +8698462
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1029

Using .NET Reflector i found out that the GetScriptCombineAttributesmethod access a static dictionary, which is not protected against concurrent access. Either i have a race condition in my code or there is a bug in the AjaxToolkit.

View 2 Replies

AJAX :: Using ToolkitScriptManager But Still Receiving "AjaxControlToolkit Requires 4.0"

Sep 28, 2010

I've read all the posts with this same issue and have not been able to resolve it in my case. Is the wrong version of the Toolkit being cached somewhere?

View 10 Replies

Type 'AjaxControlToolkit.ToolkitScriptManager' Is Not Defined?

Feb 5, 2011

i m getting this error on my certain .aspx pages ,although i added tool kit in my project "Error4Type 'AjaxControlToolkit.ToolkitScriptManager' is not defined.C:UsersIramDocumentsVisual Studio 2008Projectsgfln1gfln1CreateNewConference.aspx.designer.vb3451gfln1

View 3 Replies

AJAX :: How To Use AjaxControlToolkit.dll And Actkit.dll(Modified AjaxControlToolkit.dll) In Single Page

Oct 29, 2010

I want to disable past dates, so i modified AjaxControlToolkit.dll and named as "Actkit.dll".

View 1 Replies

AjaxControlToolkit ToolkitScriptManager Cache Combined Js On Client?

Apr 13, 2010

Usual javascript files can be cached on a client-side if web server sets the expiration. If user has once downloaded it, it will be cached by his browser.And what about AjaxControlToolkit ToolkitScriptManager? Are combined JS files cached on a client? How can expiration time be managed?

View 1 Replies

AJAX :: DropDownExtender Inside List View Throws A JavaScript Exception

Apr 23, 2010

The following code listed on the bottom is a dropdown extender contained with a listview insert template. The code works fine however int VS 2008 Debug mode, its throwing the exception:Microsoft JScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.If I click ignore or continue, the taret label is properly populated with the appropriate value. Has anybody encountered this and is

<td>
<asp:Label ID="lblTest" style="height:25px;border: solid 1px black" runat="server" Text='<%#Bind("TestCode") %>' Width="90%"></asp:Label>
<asp:DropDownExtender ID="ddExtTestCode" runat="server" TargetControlID="lblTest" DropDownControlID="pnlTestCode"></asp:DropDownExtender>
<asp:Panel ID="pnlTestCode" runat="server" style="display : none; visibility: hidden;">
<asp:LinkButton runat="server" ID="Option1" Text="12345-New York" CommandArgument="12345" OnClick="OnTestCodeSelect"></asp:LinkButton>
<asp:LinkButton runat="server" ID="Option2" Text="45678-New Jersey" CommandArgument="45678" OnClick="OnTestCodeSelect"></asp:LinkButton>
</asp:Panel>
</td>

View 1 Replies

C# - HttpWebResponse In Thread Throws Forbidden?

Mar 17, 2011

I would like to call multiple times to a web resource, however I get forbidden when asking the webresponse.

protected void Page_Load(object sender, EventArgs e)
{
Thread[] tt = new Thread[10]; [code]..........

View 1 Replies

Console Application Calling Datalayer Throws An Exception "The Type Initializer For Threw An Exception."

Aug 17, 2010

I have simple 3 tier web application and have mostly CRUDE functionalities. Recently I required to add new console application to the existing solution in which I call data layer methods for retrieving data from DB but I get an exception "The type initializer for threw an exception."When I debugged I found that the exception is thrown at datalayer on first line of class where I get connectionstring from

web.config, the code is public static readonly string CONNECT_STRING =

ConfigurationManager.ConnectionStrings["DbConnectString"].ConnectionString;

Now if I hardcode the connection string value like public static readonly string CONNECT_STRING = "Data Source=XYZ;uid=sa;password=XXX;initial catalog=ABC;"

it works fine.I don't understand what is the issue here as web application works fine with this datalayer.

View 2 Replies

Thread Was Being Aborted In WebService And ASPX Page?

Jan 20, 2011

I'm having the Thread was being aborted exception in this simple code, running on IIS 6 when i run a long query.

[Code]....

View 1 Replies

ToolkitScriptManager Throwing Exception On Calling Page_ClientValidate

Jan 17, 2011

I am using AjaxToolkit 4.0 which suggests to use ToolkitScriptManager in place of ScriptManager. But when I am using ToolkitScriptManager, it throws javascript exception when Page_ClientValidate() in called from javascript. However, this error is not coming when ScriptManager is used. Can anybody tell me how to make Page_ClientValidate() run when using ToolkitScriptManager?

View 1 Replies

AJAX :: How To Use ScriptManager And ToolKitScriptManager In Same Web Page

May 7, 2015

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

I am using this with update panel it works fine.

Now i have added modal popup. Used ajax 15.1 toolkit. they said it doesnt require ajax script manager now.)

When i use it without ajaxscript manager  it doesnt work. But when i use ajaxscript manager it works. But then i cant use scriptmanager (as two instance cant run).If i dont use script manager update panel wont work. Also i dont dont have any master page.

<cc1:ModalPopupExtender ID="mp1" runat="server" PopupControlID="Panel1" TargetControlID="btnShow"
CancelControlID="btnClose" BackgroundCssClass="modalBackground">
</cc1:ModalPopupExtender>
<cc1:ToolkitScriptManager ID="tksc" runat="server"></cc1:ToolkitScriptManager>

View 1 Replies

ADO.NET :: Web Application Throws An Exception Now And Then?

Jan 17, 2011

every now and then my server throws an exceeption. When it first starts to throw an exception the server wont work until I reinstall my web app (copy and Paste). I think this forces a restart of IIS and somethiong gets cleared bercause the app is working again for some hours, sometime less. Now I have created a scheduled task recopying all the web site files every 15 minutes. This restarts the server and the users are able to use the site. Problem is that now the server either start throwing exceptions, or the user is kicked because the server restarts. So you see, this is absolutly not a good solution.I have looked in the Event Viewer on the sever. Her is some examples of the exceptions:

[Code]....

An other exception:

[Code]....

As you can see, the common part of all the exceptions is the Exception message: Unable to cast object of type 'System.Int32' to type 'System.String'. Her is the code of one of the places throwing an exxception:

[Code]....

View 3 Replies

C# - Creating XMLSerializer In .net Throws Exception

Jul 22, 2010

We have an old asp application that instantiates a .NET com visible class. In this class, we do some serialization to store our object in the session.

When I call the following line of code in my test class, it works fine.

var cereal = new XmlSerializer(couponApplicator.GetType());

However, when it gets called in the website and I am debugging, it throws the following error:

{"Cannot execute a program. The command being executed was "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /noconfig /fullpaths @"C:\WINDOWS\TEMP\rwot-yx9.cmdline"."} System.SystemException {System.Runtime.InteropServices.ExternalException}

I thought maybe it was permissions related so I tried giving 'EVERYONE' full control to the windows/microsoft.net folder as well as the windows/temp folder. For reference, I am running this on a Windows XP machine.

View 2 Replies

Using A RenderAction Method Throws An Exception

Dec 29, 2010

i have this (simple) code

<% Html.RenderAction("Version", "Generic"); %>

in my masterpage of my asp.net mvc 2 app. This method returns the version of the application.

i also have this code in my controller:

class GenericController : BaseController
{
[ChildActionOnly]
public string Version()
{
try
{
string assemblyFile = Assembly.GetCallingAssembly().FullName;
FileInfo fi = new FileInfo(assemblyFile);
string version = fi.LastWriteTime.Year.ToString( ) + fi.LastWriteTime.Month.ToString() + fi.LastWriteTime.Day.ToString();
return version;
}
catch (Exception e)
{
return "1.0";
}
}
}

Now i get this error:
Execution of the child request failed. Please examine the InnerException for more information.

and the innerexcpetion is:
{"The controller for path '/Account/LogOn' was not found or does not implement IController."}

What i was thinking is that maybe the code can't execute because the user is not logged on yet, and tries to redirect to the logon method etc.

So the first thing i was thinking is to grant access in the web.config (like i do with the directory that has the css and images in it, it should also be accessable when you're not logged on:

<location path="Content">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>

but what is the path for this (version) method ?

(or maybe there is another reason for the excpetion.

View 1 Replies

C# - GetRequestStream Throws Timeout Exception Randomly

Feb 12, 2010

After googling for couple of days, I really cannot solve described issue. Hope here will find a solution

I'm using attached code when calling WCF service on the same server. I get Timeout error randomly in call WebReq.GetRequestStream()

When I'm check netstat I see that connection remains open, so probably is there a problem, but I don't know how to solve it

//request inicialization
HttpWebRequest WebReq = (HttpWebRequest)WebRequest.Create(url);
WebReq.Method = "POST";
WebReq.ContentType = "application/json; charset=utf-8";
WebReq.ContentLength = buffer.Length;
WebReq.Proxy = null;
WebReq.KeepAlive = false; //also tried with true
WebReq.AllowWriteStreamBuffering = false; //also tried with true
//this produces an error
using (Stream PostData = WebReq.GetRequestStream())
{
PostData.Write(buffer, 0, buffer.Length);
PostData.Close();
}
//open and read response
HttpWebResponse WebResp = (HttpWebResponse)WebReq.GetResponse();
Stream Answer = WebResp.GetResponseStream();
StreamReader _Answer = new StreamReader(Answer);
WebResp.Close();
//return string
return _Answer.ReadToEnd();

Timeout is thrown mostly after some 10 seconds of idle time, but also after five or so requests in the row. Really cannot find a pattern.

What could be wrong with this code? Is there any other (better) way for calling WCF service?

View 4 Replies

AJAX :: Changed From ScriptManager To ToolkitScriptManager / Now Error Moving From Default Page?

May 20, 2010

I am hoping I am in the right place for this, I have a web application which has been running for about 4 years recently I updated my Ajax to the most recent version it continued to work OK then I changed from ScriptManager to ToolkitScriptManager now I get an error moving from my default page

View 1 Replies

MVC :: Custom Authorization Attribute Throws Security Exception

Mar 4, 2010

I have a custom authorization attribute, that basically check if the current user's role is equals to the current area name, and if not, redirect them to the signup view in that requested area. (dummy role provider at this this stage, therefor check it against the user's name at the moment)

It runs fine (IIS) but when I debug it I can see a Security Exception are being thrown by the code

The code:

[Code]....

View 2 Replies

Setting DefaultButton To Button.UniqueID Throws Exception?

Jan 31, 2011

I have several text boxes in an asp:Panel. When the user hits Enter from any of those boxes, I want the form to submit as if they've clicked btnAddTag. (When the cursor is not in those boxes, I have a different default submit button.)

The aspx:

<asp:Panel id="thePanel" runat="server">
<asp:Button ID="btnAddTag" Text="Add Tag" runat="server" />
</asp:Panel>

The vb:

tagPanel.DefaultButton = btnAddTag.UniqueID

The exception:

The DefaultButton of 'tagPanel' must be the ID of a control of type IButtonControl.

The value of btnAddTag.UniqueID is ctl00$phMain$btnAddTag (there's a master page, this section is called phMain).

I've also tried CType(tagPanel.FindControl("btnAddTag"), Button).UniqueID.

View 3 Replies

ADO.NET :: What Is The Purpose Of Adding A Try Catch Condition That Simply Throws The Exception?

Sep 30, 2010

What is the purpose of adding a try catch condition that simply throws the Exception?

Sample Code (Note: The db object is proprietary code that simply uses ADO.Net):

[Code]....

View 6 Replies

Security :: Membership.DeleteUser Throws Exception When Website Is Published

Mar 29, 2010

I am using Membership.DeleteUser("username",true) method to delete the user from DataBase. This works fine in my local machine. When i publish the same code, i am not able to delete the user..... it throws an javascript error saying..... "Login failed for user NT AUTHORITY/NETWORK SERVICE"

View 5 Replies

ADO.NET :: Typed Dataset Throws Null Value Exception For Datetime Field?

Nov 12, 2010

I have a date field in a typed dataset that created from database.

I get an NULL Value exception when I try to enter some null value. I am not able to set the Nullvalue property of the DateTime field in XSD to other value other than Throw Exception.

View 1 Replies

AJAX :: Multiple Javascript Ajaxcontroltoolkit "function PageLoad" In The Same Aspx?

Apr 16, 2010

I have more than one user control and those user controls have extenders of the ajaxcontroltoolkit. The problem is that each one has a javascript that writes "function PageLoad"... and as I have more than one user control in the same aspx, more than one of those javascript functions is written in the output. Is there anyway to combine all of them in just one function? (bear in mind that the javascript code is written within the user control and the user control doesn't know anything about what other control are in the container aspx). If I have more than one function PageLoad they will not work then, right?

View 5 Replies

State Management :: Cast From Cache To Generic List Throws An Exception

Mar 17, 2011

In Asp.net application. i cache a Linq to Xml result to a Cache object. when i cast the cache object back to generic list. i get the following exception.

[A]System.Collections.Generic.List`1[CarRentalAddress] cannot be cast to [B]System.Collections.Generic.List`1[CarRentalAddress]. Type A originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:WINDOWSassemblyGAC_32mscorlib2.0.0.0__b77a5c561934e089mscorlib.dll'. Type B originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:WINDOWSassemblyGAC_32mscorlib2.0.0.0__b77a5c561934e089mscorlib.dll'.

My code looks like this.

if (!Page.IsPostBack) { if (Cache["xml"] == null) { DataSet ds = new DataSet(); ds.ReadXml(HttpContext.Current.Server.MapPath("~/CarRentalAddress.xml")); var grid = (from d in ds.Tables[0].AsEnumerable() orderby d.Field<string>("City") where d.Field<string>("Enabled") == "1" select new CarRentalAddress { City = d.Field<string>("City"), HotelName = d.Field<string>("HotelName"), Address = d.Field<string>("Address"), EmailID1 = d.Field<string>("EmailID1"), EmailID2 = d.Field<string>("EmailID2") }).ToList(); Cache["xml"] = grid; totalrows = grid.Count().ToString(); grdAddress.DataSource = grid; grdAddress.DataBind(); } else { //Exception is thrown by this line var grid = (List<CarRentalAddress>)Cache["xml"]; totalrows = grid.Count().ToString(); grdAddress.DataSource = grid; grdAddress.DataBind(); } }

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved