Monday, March 26, 2012

Accessing AJAX.NET app as part of ASP application

I have written a ASP.NET appliacation named IIC with AJAX features for filling the GridView without refreshing the page when user filters data by using dropdowns and checkboxes. The application is working fine when I run it indepently as follows:

http://localhost/IIC/default.aspx

But this application needs to be the part of our existing ASP application called "Aspapp". So I moved my AJAX enabled ASP.NET application folder as sub folder to ASP application and accessing the page using the following URL:

http://localhost/Aspapp/IIC/default.aspx

Now everything works fine, but except the AJAX. The page refreshes when I fill the GridView.

I copied AjaxControlToolkit.dll and other ASP.NET application related dlls to the bin folder of "Aspapp/bin" application and also "Aspapp/IIC/bin" folder.

I have checked the IIS settings, so that the application is configured to run using .NET 2.0 framework.

My questions are:

1. Am I missing any other assemblies related to AJAX to be copied?

2. Am I copying the assemblies to the right folder?

3. Am I missing any IIS configuration?

Please help.

In IIS make the create a IIC virtual directory. This will cause IIC to run as an independent application and should allow the AJAX to work.


Thanks aquillin.

I fixed the problem. I noticed a javascript error "'Sys' is undefined" is thrown on my ASP.NET page in the ASP application. Then I did research on this error and found a usefull link on the net http://weblogs.asp.net/chrisri/archive/2007/02/02/demystifying-sys-is-undefined.aspx and came to know that its the problem in the web.config file.

I supposed to add the AJAX specific entries to the web.config file. But the new issue was the ASP.NET application works indepently and I didn't made any changes to it while copying it as a sub folder for ASP application. After little research on the ASP applicatoin I found that there is another web.config directly under the /AspApp folder. So copied the <System.web.extensions> and other AJAX specific configurations to /Aspapp/web.config from /Aspapp/IIC/web.config and everything started working fine.

No comments:

Post a Comment