Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 29, 2010 03:44 PM by domenico.neri
May 12, 2009 09:43 AM|LINK
I have Created a custom Module for my application. It works fine when i am testing on a sample website.
But when i integrated the same with the original application it dosent works fine. Actully i am using Ajax control toolkit and it uses its own module for request processing.System.Web.Handlers.ScriptModule.
Hence my handlers section becomes something like this :
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add type="MyModule, MyModule,Version=188.8.131.52, Culture=neutral, PublicKeyToken=ba11cfdfb1d1111b" name="SiteMinderHttpModule" />
Now i think my module working fine but because of it there is some hinderence caused in the Ajax request processing.I get the error sys is undefined.
I have created a class library Project and implemented the iHTTPModule interface and then registered the assembly in GAC and then accessing the assembly from there..
Is there any work around for this problem as my page is not rendering properly.
configuration asp.net 2.0
.net virtual directory
ASP .net 2.0 .NET
AsP Net 2.0 C#
ASp .net AJAX
asp .net 2.0
Configuration Specification Dotnet server
configuration of ASP.net
May 15, 2009 05:51 AM|LINK
Since you didn't provide the module code, we just provide you a general step by step tutorial on how to create an httpmodule to handle the ajax calls.
May 15, 2009 06:57 AM|LINK
Thanks for you post.
For your reference i am attaching adding my code for the HTTP Module bellow.
public class SiteMinderHttpModule : IHttpModule
#region IHttpModule Members
public void Dispose()
public void Init(HttpApplication context)
context.BeginRequest += new EventHandler(context_BeginRequest);
public void context_BeginRequest(object sender, EventArgs e)
HttpApplication application = (HttpApplication)source;
HttpContext context = application.Context;
if (context.Request.Headers["x-microsoftajax"] == null)
if ((!application.Request.Url.ToString().Contains(".axd")) &&
if (context != null)
string sReportData = context.Request["Param"];
throw new Exception("You do not have access to the current report.");
Also I tried to integrate the same module with Asp.Net 3.5, everything works completely fine in there but the issue is persistant for Asp.Net 2.0 .
Quick help would be appretiated.
May 27, 2009 09:38 AM|LINK
I am having the same problem. I have an ajax integrated application and i have to add an HTTP module for tracking the site. But it is giving error message "Sys is undefined",on adding the
custom http module. Please...Please help me with the issue. It is very urgent.
May 27, 2009 10:10 AM|LINK
After a lot of head banging i finally found a work around for this problem.....
Actually the problem is there with the ajax extensions the dll in the version 2.0 to fix this install the framework 3.5 (dotNetFx35setup.exe). This registers the 3.5 specific in the gac. Now Open you web.config file press ctrl + H and replace all occurances
of 1.0.61025.0 with 184.108.40.206 ----> then add the following tag just bellow the config sections
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="1.0.61025.0" newVersion="220.127.116.11" />
and TAA DAAAA .... Happy days are back :)
See if this helps
May 29, 2009 09:07 AM|LINK
Thanks for your reply.But this is not the case. I forgot to tell you that ajax is working when i remove my custom HTTP module. Presently i have commented so that AJAX works, but i need to track the site using my HTTP
module .Any help would be appreciated.
May 29, 2009 12:22 PM|LINK
As far as i understand you are having problems with ajax when you add your custom Http module i.e. you get the erroe sys is undefined if you have added your custom module. and the Ajax works fine if you remove your custom module.
this means that both of the things are not working together.
If the above mentioned is your problem then my previous post is the solution to it....
Else please try and elaborate your problem and also mention the versions you are using...
Jun 22, 2009 09:21 AM|LINK
If you have not solved your problem yet , the link below might be useful
I ran into the same problem, with catastrophic consequences because of my heavy ajax usage.. My website loaded, but no clicks would work, update panel timers would not execute et etc..
Check this article for reference.
He essentially asks us to load the script manager dynamically( if not available in the page.controls collection) during the "preinit" of the Page...
Aug 20, 2009 03:18 PM|LINK
i have same problem , i am using AJAX and trying to implement custom security using IPrincipal and IIdentity Interface and for that i have created one custom module but it is giving an error. it is working without AJAX......
An exception of type 'System.Runtime.Serialization.SerializationException' occurred in WebDev.WebHost.dll but was not handled in user code
Additional information: Type is not resolved for member 'Netlink.CustomSecurity.CustomPrincipal,Netlink.CustomSecurity, Version=18.104.22.168, Culture=neutral, PublicKeyToken=null'.
<!-- For Ajax-->
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=22.214.171.124, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=126.96.36.199, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=188.8.131.52, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="POST,GET" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax"/>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=184.108.40.206, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="CustomModule" type="Netlink.CustomSecurity.CustomModule, Netlink.CustomSecurity"/>
Please help to resolve this.......
Aug 25, 2009 01:07 PM|LINK
Please help me to resolve the below issue
Basically My requirement is to combine webresource.axd and scriptresource.axd files.
I have tried to resolve using custom httpmodule and httphandlers but they are still putting me in loops.
If i am not using AjaxToolkit Controls my custom httpmodule working fine to combine scriptresource.axd and webresource.axd files
if i am using Ajaxtoolkitcontrols i am getting error scriptLoad Failed exception and sys is undefined
I just wanted to knock people to understand if they had used a different method, we could get some help.
I want to do everything using asp.net 2.0