DNS Lookup in simple C#/asp.net ajax call is extremely slow

Posted by Ryan on Stack Overflow See other posts from Stack Overflow or by Ryan
Published on 2010-06-02T16:44:13Z Indexed on 2010/06/02 16:54 UTC
Read the original article Hit count: 265

Filed under:
|
|
|
|

I'm running this out of the VS 2008 debugger on Windows 7, running .Net 3.5.

The idea was to make all ajax requests with jQuery only, rather than .net, following some tutorials online.

Default.aspx -> HTML page, jquery triggers method in Default.aspx.cs

http://pastebin.com/pxBvKA2H

Default.aspx.cs -> C# Webform, just defines a GetDate fuction, which only returns a string for now (trying to eliminate any possible issues)

(can only post one hyperlink...) pastebin.com/pnHn50hu

The ajax query takes longer than it should. Profiling with firebug revealed that it took 1.03 ms.

1s DNS Lookup | 26ms Waiting | 1ms Receiving

EDIT: It continues to take the same set of times if you continue to click and resubmit the request.

Is there anything I can do to cut down on the DNS Lookup time / what did I do wrong?

Thanks for any help.

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET