Monday, March 26, 2012

Ajax application slow when deploy to server

i have an ajax web application (ajax.net 1.0) written in ASP.NET 2.0

The application runs fast on my local pc. When I deploy the application to server (windows 2003) as a web site, it's very slow.. funny thing is if I create a virtual site under the root (the main web site), it's become fast again.

Anyone encounter similar problem before? I didn't install ajax on the server, I just copy the binaries files. The application runs fine just that it's slow under main web site and not the virtual directory site.

One of the most common causes of an AJAX application running slow is because it is still in debug mode after being published. Make sure that debug is set to false in your web.config as indicated below.

<system.web>
<compilationdebug="false" />
</system.web>


I've set debug=false but that doesn't help.

How to explain why is it slow when deploy under main web site (IIS-> Create new web site) and it's fast when deploy under virtual directory (IIS-> Create virtual directory).


ok. I solved the problem. It appears that there was some javascript refrencing error

<script language="javascript" type="text/javascript" src="http://pics.10026.com/?src=//Js/Menu.js"></script>

as compare to

<script language="javascript" type="text/javascript" src="http://pics.10026.com/?src=/Js/Menu.js"></script>

which cause the problem.

No comments:

Post a Comment