Showing posts with label developed. Show all posts
Showing posts with label developed. Show all posts

Wednesday, March 28, 2012

Asp.Net Ajax Enabled Web Site running very slow

I have developed my web application on ASP.NET 2.0 AJAX Extensions 1.0 . But it is running very slow.Please help me how to improve perfomance of asp.net ajax extension web site.

The most common cause for this would be that you're making too many requests to the server... i.e. you're doing lots of AJAX requests in the background and they're updating too much at once.

The performance difference between an ordinary page, for example a search box that then displays search results, should be negligable between AJAX and post-back versions - so you can't always blame the AJAX for any speed issue.

An example of AJAX slowing things down would be if you have a page with 100 Labels and each time you made an AJAX request, it had to update them all (even though only one had changed) - it would be the equivalent of building the whole page again as opposed to making an AJAX request to change just one bit of the page.

Hope this helps.

Monday, March 26, 2012

ASP.NET Ajax Control Toolkit - Firewall blocking TabContainer

Hey there,

First thing's first - if this is posted in the wrong forum, I apologize. Next...

I've got an ASP.NET AJAX application developed with VS 2008 Beta 2, using the 3.5 version of the Ajax Control Toolkit - when deploying it to our web server, something interesting happens. If I access the site through a machine on the same network as the web server, it renders fine. However, if I access it from another network, or through the internet, the TabContainer is not rendering.

I checked out the reason why, and it appears that our firewall is blocking the client's ability to download the WebResource.axd file associates with the Ajax Control Toolkit - what else is interesting is that I'm also using FreeTexBox on this page (which downloads a seperate WebResource.axd file, and can access it without any problem).

If anyone has any suggestions, or has run into this problem in the past, please let me know. Thank you!

Anthony

32 views and no responses?

Wow...either I didn't explain it well enough, or nobody's run in to this.

Can anyone let me know which is the case?

Thanks.


Well, if you want comments, here is mine.. I always read anything related to the tabs since I use them a lot...

But sorry, never run into this, works fine on my laptop and the corporate machines (that have high security)... And firefox, ie 6-7...

- Have you tried with another machine, that is not on same network as webserver + where you can test different firewalls/settings?

- Also, are you sure the tabs are to blame? Is everything on your web app from the same domain?

It could be so many different things...Tongue Tied


Yeah I had a similar issue. We use an Aventail product (now SonicWall I believe) to allow users to login securely to our network over the net. It was configured in a way that was stopping that WebResource.axd file from being downloaded.

It seems that the issue is with your firewall. If it is blocking the file then there is little you can do. We configure our firewall\Aventail product to be a little less stringent so that the file is now downloaded and the asp.net ajax apps work fairly well. There are still other issues.

So I think you need to talk to your Network Admin people...?


Hi Anthony,

Why not use a debugging tool such as Web Development Helper,Fiddler and Firebug(used on Firefox) etc? They will help you on detecting all the downloaded items.

Best regards,

Jonathan


Jonathan Shen – MSFT:

Hi Anthony,

Why not use a debugging tool such as Web Development Helper,Fiddler and Firebug(used on Firefox) etc? They will help you on detecting all the downloaded items.

Best regards,

Jonathan

Thanks for the suggestion - that's the point of my query, however. I do in fact know that the file is not being downloaded, I'm just trying to determine what changed between the AJAX Toolkit for VS2005 and the toolkit that's compatible with 3.5 (VS 2008) that's causing it to be filtered by our firewall. It seems odd to me that it would work with a prior release, yet not with the new version.


After some more debugging, I think I may have determined the reason why the ScriptResource.axd files are not being downloaded - it appears that they are using a Content-Type of application/javascript, where WebResource.axd (downloaded without any problems) uses Content-Type application/x-javascript.

Additionally, I checked older projects built on VS 2005 .NET 3.0, and the ScriptResource.axd files there use Content-Type text/javascript.

So the question then becomes: Why in the world was the Content-Type changed to something which isn't successfully downloading?

Thoughts?


Alright, for anyone who searches this post in the future, here's the solution that we just implemented and tested:

First of all, we checked the content type of the files that weren't coming through to the client when it was posted to the web using Fiddler2 (http://www.fiddlertool.com/fiddler/).

When we checked the remote site, Fiddler showed that the files were forbidden. I checked it through localhost to see that the Content-Type was application/javascript.

Then, we checked our firewall. We had both application/x-javascript, and text/javascript, but no application/javascript!

We updated the configuration file for the firewall to include application/javascript content-types, uploaded it, and tested the site again - Voila, the Ajax Control Toolkit now works with Visual Studio 2008 and the 3.5 framework.

Thanks everyone for their help with this, much appreciated.

ASP.NET Ajax and SSL

I have developed the complete site using ASP.NET AJAX v1 and works wonderfully, and was in the testing enviornment for a few days and looked good.

The problem stared when we installed SSL on the server and activated HTTPS for a few pages on our site for the credit card processing. Now i keep getting the below error on the pages that are using HTTPS and NOT for any other page, if i deactivate HTTPS for those pages the pages just work fine and without any javascript errors.

Sys is not defined[Break on this error] Sys.WebForms.PageRequestManager._initialize('ctl00$sm', document.getElementById(...signup.aspx (line 50)

Sys is not defined[Break on this error] Sys.Application.initialize();

(sm is the ScriptManager just for your info)

I have copied the error messages from the Firefox plugin Firebug. Is it some sort of bug or I am doing something wrong here. Please advice as the site is almost complete and has to go live in a few days. I would really appreciate any advice.

Regards

Prashant Atal

Can you post more info or have you sloved this problem?

The issue might be thathttp://yoursite.com andhttps://yoursite.com are considered different "domains" according to the javascript security model, and therefore a script loaded from one domain will not be able to execute inside the other because it doesn't fit the 'same origin' rule (varies by protocol). Seehttp://www.mozilla.org/projects/security/components/same-origin.html for details.


Paul is correct. The port and the domain must be the same, in order for the javascript security model to work. As a personal note, I am not having any problems, so far, with Ajax requests traveling over non-SSL channels when the page request is https/SSL. It would be nice to state that in the AJAX's FAQs. The only way I was able to determine if the requests were using SSL, I need to use Fiddler to see the requests. Also after a number of hours of reading, I'm confident that if the page is using SSL (https), then all the AJAX calls back to the server will also use SSL.

ASP.NET Ajax and Google Maps API

Hi all,

I have developed the web application for displaying the maps inASP.NET using Atlas and Google Maps API. The map is working fine there. Now, I have to migrate the Atlas web application toASP.NET Ajax. Migration has been performed successfully and code is building without errors. While running, Web Service isn't called. I am calling the web service method from Javascript. In another test application (without Google Maps API), I have called the web method from Javascript. Is there any problem due to Google Maps API. Apparently, it seems fine. If any one know about this issue, please let me know.

Thanks in advance.
Best Regards

Webservices now have to be flagged with the [ScriptService] attribute in order to be used, have you made that change?


Yes, I have made that change. In the script manager tags, now js file needs to be mentioned. I also mention that using script reference tag.

I have a problem adding points to a yahoo map with a webservice using asp.net ajax as well. It seems like the oncomplete event is not being "waited for" and I am trying to plot to an array that has no contents. If i trigger the event a second later after i have my webservice response it works fine :) try doing alert() to check to see if something is being received..In my case my x coordinate array wasnt populated by the time i got to my addmarker event linked to a button click but my ycoor and name of the point were populated. I have resorted to making the web service call on load but it is definitely not a best practice scenario.

-Scott

ASP.Net AJAX 1.0 deployment

Dear All,

I am using ASP.Net 2.0. For using AJAX, i installed ASP.Net AJAX 1.0 extensions in my local pc and developed a website using it.

Now, i need to deploy in the third party web server. Is my AJAX work in the third party web server ? or other wise i need the web server which supports ASP.Net AJAX 1.0 extensions.

Thanks in advance.Idea

Publish it! ... if you have problem install the AJAX Extensions in your web server.


Thanks for your quick response.

This is my Doubt. I am using the ASP.Net AJAX 1.0 components in my website (Local). when i need to host it in common third party server, how those components will work without having ASP.Net AJAX 1.0 extensions support in the third party server. I think this will clarify my actual doubt.


Hi,

As far as I know, ASP.NET is only supported by IIS currently.

So, if the third party web server means a web server other than IIS, it can't work properly. For further confirmation, you may contact the vender of the web server.

If the third party web server means a different machine but has IIS installed, then it's necessary to install AJAX extension on it.


Dear Sir, I mentioned Third party hosting provider as Third party web server
Thanks for your reply I understood the problem in it.