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 :
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.
Please Help.
Kunal
HTTP Handlerconfiguration asp.net 2.0.net virtual directoryASP .net 2.0 .NETgacutilajaxcontroltoolkit asp.netGAC-AssemblyAJAXextensions AjaxEnabledWebsiteAsP Net 2.0 C#ASp .net AJAXUrgentasp .net 2.0HTTP Module.Net 2.0Configuration Specification Dotnet serverasp.net2.0(c#)ASP.NET Configuration.net frameworkconfiguration of ASP.netgac
For your reference i am attaching adding my code for the HTTP Module bellow.
using System;
using System.Web;
using System.Diagnostics;
using System.IO;
using System.Security.Principal;
using System.Security.Cryptography;
using System.Text;
namespace MyHttpModule
{
public class SiteMinderHttpModule : IHttpModule
{
#region IHttpModule Members
public void Dispose()
{
}
public void Init(HttpApplication context)
{
context.BeginRequest += new EventHandler(context_BeginRequest);
}
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.
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 3.5.0.0 ----> then add the following tag just bellow the config sections
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.
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...
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..
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=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Basically My requirement is to combine webresource.axd and scriptresource.axd files.
As you know when we use asp.net ajax and ajaxtoolkit in the application by default , some of the javascript files(webresource.axd and scriptresource.axd) will load automatically.
For loading all the JavaScript files browser will take multiple requests, To reduce the multiple requests i am trying to combine all the scripts into one file and loading into the client side.
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
andalso browser taking only one request to get all the javascript 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
thanks
Hi All,
Please help me to resolve the below issue
Basically My requirement is to combine webresource.axd and scriptresource.axd files.
As you know when we use asp.net ajax and ajaxtoolkit in the application by default , some of the javascript files(webresource.axd and scriptresource.axd) will load automatically.
For loading all the JavaScript files browser will take multiple requests, To reduce the multiple requests i am trying to combine all the scripts into one file and loading into the client side.
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
andalso browser taking only one request to get all the javascript 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.
kunalkamboj
Member
12 Points
12 Posts
Problem Adding Custom HTTP Module with Ajax(System.Web.Handlers.ScriptModule)
May 12, 2009 09:43 AM|LINK
Hi,
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 :
<httpModules>
<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=1.0.0.0, Culture=neutral, PublicKeyToken=ba11cfdfb1d1111b" name="SiteMinderHttpModule" />
</httpModules>
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.
Please Help.
Kunal
HTTP Handler configuration asp.net 2.0 .net virtual directory ASP .net 2.0 .NET gacutil ajaxcontroltoolkit asp.net GAC-Assembly AJAXextensions AjaxEnabledWebsite AsP Net 2.0 C# ASp .net AJAX Urgent asp .net 2.0 HTTP Module .Net 2.0 Configuration Specification Dotnet server asp.net2.0(c#) ASP.NET Configuration .net framework configuration of ASP.net gac
Nai-Dong Jin...
All-Star
41630 Points
3558 Posts
Re: Problem Adding Custom HTTP Module with Ajax(System.Web.Handlers.ScriptModule)
May 15, 2009 05:51 AM|LINK
Hi,
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.
See: http://www.codeproject.com/KB/aspnet/HttpModuletohandleAjax.aspx
Thanks.
kunalkamboj
Member
12 Points
12 Posts
Re: Problem Adding Custom HTTP Module with Ajax(System.Web.Handlers.ScriptModule)
May 15, 2009 06:57 AM|LINK
Hi Nai,
Thanks for you post.
For your reference i am attaching adding my code for the HTTP Module bellow.
using System;
using System.Web;
using System.Diagnostics;
using System.IO;
using System.Security.Principal;
using System.Security.Cryptography;
using System.Text;
namespace MyHttpModule
{
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")) &&
(!application.Request.Url.ToString().Contains(".asmx")))
{
if (context != null)
{
string sReportData = context.Request["Param"];
if (!string.IsNullOrEmpty(sReportData))
{
}
else
{
throw new Exception("You do not have access to the current report.");
}
}
}
}
}
#endregion
}
}
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.
praveen.chin...
Member
4 Points
2 Posts
Re: Problem Adding Custom HTTP Module with Ajax(System.Web.Handlers.ScriptModule)
May 27, 2009 09:38 AM|LINK
Hi All,
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.
Praveen.
kunalkamboj
Member
12 Points
12 Posts
Re: Problem Adding Custom HTTP Module with Ajax(System.Web.Handlers.ScriptModule)
May 27, 2009 10:10 AM|LINK
Hi Praveen,
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 3.5.0.0 ----> then add the following tag just bellow the config sections
</configSections>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="1.0.61025.0" newVersion="3.5.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
and TAA DAAAA .... Happy days are back :)
See if this helps
praveen.chin...
Member
4 Points
2 Posts
Re: Problem Adding Custom HTTP Module with Ajax(System.Web.Handlers.ScriptModule)
May 29, 2009 09:07 AM|LINK
Hi Kunal,
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.
Praveen.
kunalkamboj
Member
12 Points
12 Posts
Re: Problem Adding Custom HTTP Module with Ajax(System.Web.Handlers.ScriptModule)
May 29, 2009 12:22 PM|LINK
Hi Praeen,
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...
Cheers!!!
Kunal...
sadilak
Member
2 Points
1 Post
Re: Problem Adding Custom HTTP Module with Ajax(System.Web.Handlers.ScriptModule)
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.
http://www.codeguru.com/csharp/.net/net_asp/tutorials/article.php/c12927/
He essentially asks us to load the script manager dynamically( if not available in the page.controls collection) during the "preinit" of the Page...
shujat
Member
2 Points
2 Posts
Re: Problem Adding Custom HTTP Module with Ajax(System.Web.Handlers.ScriptModule)
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=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
-----------------------------------------------------------------------------------------------
web.config is
<!-- For Ajax-->
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="POST,GET" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="CustomModule" type="Netlink.CustomSecurity.CustomModule, Netlink.CustomSecurity"/>
</httpModules>
<!--End Ajax-->
Please help to resolve this.......
bvcs_4
Member
4 Points
4 Posts
Re: Problem Adding Custom HTTP Module with Ajax(System.Web.Handlers.ScriptModule)
Aug 25, 2009 01:07 PM|LINK
Hi All,
Please help me to resolve the below issue
Basically My requirement is to combine webresource.axd and scriptresource.axd files.
As you know when we use asp.net ajax and ajaxtoolkit in the application by default , some of the javascript files(webresource.axd and scriptresource.axd) will load automatically.
For loading all the JavaScript files browser will take multiple requests, To reduce the multiple requests i am trying to combine all the scripts into one file and loading into the client side.
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
andalso browser taking only one request to get all the javascript 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
thanks
Hi All,
Please help me to resolve the below issue
Basically My requirement is to combine webresource.axd and scriptresource.axd files.
As you know when we use asp.net ajax and ajaxtoolkit in the application by default , some of the javascript files(webresource.axd and scriptresource.axd) will load automatically.
For loading all the JavaScript files browser will take multiple requests, To reduce the multiple requests i am trying to combine all the scripts into one file and loading into the client side.
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
andalso browser taking only one request to get all the javascript 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
thanks