# AJAX Blocking

**URL:** <https://community.thinkgeo.com/t/ajax-blocking/6330>\
**Category:** WebForms\
**Created:** [December 11, 2012, 10:22am UTC](https://community.thinkgeo.com/t/ajax-blocking/6330 "2012-12-11T10:22:37Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/8c91f0/32.png) [@Eric2](https://community.thinkgeo.com/u/Eric2)\
**Post date:** [December 11, 2012, 10:22am UTC](https://community.thinkgeo.com/t/ajax-blocking/6330/1 "2012-12-11T10:22:37Z")

</div>

&nbsp;I&nbsp;was&nbsp;curious&nbsp;how&nbsp;exactly&nbsp;the&nbsp;Map&nbsp;blocks&nbsp;AJAX&nbsp;Calls.

&nbsp;

If&nbsp;I&nbsp;initiate&nbsp;a&nbsp;jquery&nbsp;AJAX&nbsp;out,&nbsp;then&nbsp;initiate&nbsp;a&nbsp;map&nbsp;update&nbsp;what&nbsp;happens??

If&nbsp;my&nbsp;AJAX&nbsp;call&nbsp;finishes&nbsp;first&nbsp;in&nbsp;the&nbsp;server,&nbsp;does&nbsp;it&nbsp;return&nbsp;normally?&nbsp;?

&nbsp;

&nbsp;

If&nbsp;I&nbsp;first&nbsp;initiate&nbsp;a&nbsp;map&nbsp;update,&nbsp;then&nbsp;an&nbsp;AJAX&nbsp;call&nbsp;does&nbsp;the&nbsp;map&nbsp;queue&nbsp;the&nbsp;transmission&nbsp;of&nbsp;the&nbsp;AJAX&nbsp;out&nbsp;on&nbsp;the&nbsp;client??&nbsp;where&nbsp;does&nbsp;it&nbsp;hold&nbsp;up&nbsp;the&nbsp;AJAX&nbsp;call??

&nbsp;

Thanks

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [December 12, 2012, 2:38am UTC](https://community.thinkgeo.com/t/ajax-blocking/6330/2 "2012-12-12T02:38:51Z")

</div>

Hello&nbsp;Eric,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Ajax&nbsp;is&nbsp;just&nbsp;a&nbsp;object,&nbsp;once&nbsp;it&nbsp;called&nbsp;the&nbsp;server&nbsp;side,&nbsp;it&nbsp;will&nbsp;wait&nbsp;until&nbsp;the&nbsp;server&nbsp;side&nbsp;response,&nbsp;I&nbsp;think&nbsp;this&nbsp;is&nbsp;your&nbsp;blocks&nbsp;mean.&nbsp;  
&nbsp;&nbsp;  
&nbsp;“If&nbsp;I&nbsp;initiate&nbsp;a&nbsp;jquery&nbsp;AJAX&nbsp;out,&nbsp;then&nbsp;initiate&nbsp;a&nbsp;map&nbsp;update&nbsp;what&nbsp;happens”&nbsp;  
&nbsp;It’s&nbsp;the&nbsp;right&nbsp;way&nbsp;to&nbsp;use&nbsp;Ajax&nbsp;with&nbsp;MapControl,&nbsp;you&nbsp;can&nbsp;get&nbsp;anything&nbsp;you&nbsp;input&nbsp;from&nbsp;Client&nbsp;side&nbsp;then&nbsp;call&nbsp;the&nbsp;server,&nbsp;handle&nbsp;it&nbsp;in&nbsp;the&nbsp;server&nbsp;side,&nbsp;like&nbsp;update&nbsp;the&nbsp;map,&nbsp;add&nbsp;marker,&nbsp;delete&nbsp;feature,&nbsp;then&nbsp;response&nbsp;to&nbsp;client&nbsp;side,&nbsp;let&nbsp;client&nbsp;side&nbsp;know&nbsp;and&nbsp;refresh&nbsp;the&nbsp;map.&nbsp;  
&nbsp;&nbsp;  
&nbsp;“If&nbsp;my&nbsp;AJAX&nbsp;call&nbsp;finishes&nbsp;first&nbsp;in&nbsp;the&nbsp;server,&nbsp;does&nbsp;it&nbsp;return&nbsp;normally”&nbsp;  
&nbsp;Yes,&nbsp;it&nbsp;will&nbsp;works&nbsp;fine.&nbsp;  
&nbsp;&nbsp;  
&nbsp;And&nbsp;I&nbsp;post&nbsp;some&nbsp;sample&nbsp;code&nbsp;in&nbsp;your&nbsp;another&nbsp;post&nbsp;that&nbsp;you&nbsp;can&nbsp;refer.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Gary

---

<div class="post-metadata">

**Author:** ![Eric2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/8c91f0/32.png) [@Eric2](https://community.thinkgeo.com/u/Eric2)\
**Post date:** [December 12, 2012, 9:53am UTC](https://community.thinkgeo.com/t/ajax-blocking/6330/3 "2012-12-12T09:53:33Z")

</div>

Sorry,&nbsp;but&nbsp;this&nbsp;doesn’t&nbsp;answer&nbsp;my&nbsp;question.&nbsp;&nbsp;I&nbsp;have&nbsp;noticed&nbsp;that&nbsp;if&nbsp;the&nbsp;map&nbsp;is&nbsp;updating,&nbsp;and&nbsp;I&nbsp;initiate&nbsp;another&nbsp;AJAX&nbsp;call,&nbsp;independent&nbsp;of&nbsp;the&nbsp;map&nbsp;update,&nbsp;that&nbsp;the&nbsp;second&nbsp;AJAX&nbsp;call&nbsp;will&nbsp;wait&nbsp;until&nbsp;the&nbsp;map&nbsp;updates&nbsp;to&nbsp;fire.&nbsp;&nbsp;I&nbsp;was&nbsp;wondering&nbsp;where&nbsp;it&nbsp;is&nbsp;delayed,&nbsp;on&nbsp;the&nbsp;send&nbsp;or&nbsp;the&nbsp;return?

---

<div class="post-metadata">

**Author:** ![Muhammed](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/m/c67d28/32.png) [@Muhammed](https://community.thinkgeo.com/u/Muhammed)\
**Post date:** [December 12, 2012, 11:03am UTC](https://community.thinkgeo.com/t/ajax-blocking/6330/4 "2012-12-12T11:03:31Z")

</div>

@Eric:&nbsp;I’m&nbsp;looking&nbsp;into&nbsp;a&nbsp;similar&nbsp;issue&nbsp;and&nbsp;I&nbsp;believe&nbsp;it&nbsp;may&nbsp;be&nbsp;related&nbsp;to&nbsp;using&nbsp;[Asp.net](http://Asp.net)’s&nbsp;Session&nbsp;Object.&nbsp;&nbsp;  
&nbsp;[msdn.microsoft.com/en-us/library/ms178581(VS.100).aspx](http://msdn.microsoft.com/en-us/library/ms178581%28VS.100%29.aspx)&nbsp;  
&nbsp; **&nbsp;Concurrent&nbsp;Requests&nbsp;and&nbsp;Session&nbsp;State** &nbsp;  
&nbsp;&nbsp;  
&nbsp;Access&nbsp;to&nbsp;[ASP.NET](http://ASP.NET)&nbsp;session&nbsp;state&nbsp;is&nbsp;exclusive&nbsp;per&nbsp;session,&nbsp;which&nbsp;means&nbsp;that&nbsp;if&nbsp;two&nbsp;different&nbsp;users&nbsp;make&nbsp;concurrent&nbsp;requests,&nbsp;access&nbsp;to&nbsp;each&nbsp;separate&nbsp;session&nbsp;is&nbsp;granted&nbsp;concurrently.&nbsp;However,&nbsp;if&nbsp;two&nbsp;concurrent&nbsp;requests&nbsp;are&nbsp;made&nbsp;for&nbsp;the&nbsp;same&nbsp;session&nbsp;(by&nbsp;using&nbsp;the&nbsp;same&nbsp;SessionID&nbsp;value),&nbsp;the&nbsp;first&nbsp;request&nbsp;gets&nbsp;exclusive&nbsp;access&nbsp;to&nbsp;the&nbsp;session&nbsp;information.&nbsp;The&nbsp;second&nbsp;request&nbsp;executes&nbsp;only&nbsp;after&nbsp;the&nbsp;first&nbsp;request&nbsp;is&nbsp;finished.

---

<div class="post-metadata">

**Author:** ![Eric2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/8c91f0/32.png) [@Eric2](https://community.thinkgeo.com/u/Eric2)\
**Post date:** [December 12, 2012, 12:06pm UTC](https://community.thinkgeo.com/t/ajax-blocking/6330/5 "2012-12-12T12:06:23Z")

</div>

Thanks&nbsp;Muhammed,&nbsp;please&nbsp;let&nbsp;me&nbsp;know&nbsp;what&nbsp;you&nbsp;find.&nbsp;&nbsp;I&nbsp;just&nbsp;know&nbsp;that&nbsp;the&nbsp;map&nbsp;updating&nbsp;prevents&nbsp;me&nbsp;from&nbsp;any&nbsp;other&nbsp;jquery&nbsp;AJAX&nbsp;activity,&nbsp;even&nbsp;non&nbsp;map&nbsp;related&nbsp;functions.&nbsp;&nbsp;I&nbsp;believe&nbsp;that&nbsp;the&nbsp;jquery&nbsp;AJAX&nbsp;doesn't&nbsp;rely&nbsp;on&nbsp;asp&nbsp;session&nbsp;information,&nbsp;but&nbsp;perhaps&nbsp;it&nbsp;is&nbsp;still&nbsp;blocked&nbsp;in&nbsp;the&nbsp;same&nbsp;manner,&nbsp;because&nbsp;it&nbsp;is&nbsp;not&nbsp;specifically&nbsp;identified&nbsp;as&nbsp;a&nbsp;distinct&nbsp;session.

---

<div class="post-metadata">

**Author:** ![Eric2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/8c91f0/32.png) [@Eric2](https://community.thinkgeo.com/u/Eric2)\
**Post date:** [December 12, 2012, 2:20pm UTC](https://community.thinkgeo.com/t/ajax-blocking/6330/6 "2012-12-12T14:20:24Z")

</div>

Muhammed,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;have&nbsp;confirmed&nbsp;that&nbsp;there&nbsp;is&nbsp;something&nbsp;about&nbsp;the&nbsp;presence&nbsp;of&nbsp;the&nbsp;map&nbsp;component&nbsp;forcing&nbsp;server&nbsp;calls&nbsp;to&nbsp;synchronously,&nbsp;&nbsp;I&nbsp;don’t&nbsp;believe&nbsp;it&nbsp;is&nbsp;an&nbsp;ASP&nbsp;session&nbsp;issue.

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [December 13, 2012, 3:58am UTC](https://community.thinkgeo.com/t/ajax-blocking/6330/7 "2012-12-13T03:58:05Z")

</div>

Hello&nbsp;Eric,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;think&nbsp;Muhammed&nbsp;said&nbsp;is&nbsp;right,&nbsp;for&nbsp;validate&nbsp;this,&nbsp;you&nbsp;can&nbsp;create&nbsp;a&nbsp;c#&nbsp;program&nbsp;without&nbsp;map&nbsp;control,&nbsp;and&nbsp;try&nbsp;again.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Here&nbsp;is&nbsp;a&nbsp;workaround&nbsp;that&nbsp;you&nbsp;can&nbsp;use&nbsp;httphandler&nbsp;to&nbsp;handle&nbsp;multithread&nbsp;ajax&nbsp;call,&nbsp;this&nbsp;is&nbsp;the&nbsp;only&nbsp;way&nbsp;I&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Try&nbsp;to&nbsp;call&nbsp;xxxx.axd&nbsp;directly&nbsp;in&nbsp;Ajax,&nbsp;then&nbsp;handle&nbsp;everything&nbsp;in&nbsp;the&nbsp;getrequest&nbsp;in&nbsp;server&nbsp;side.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Gary

---

<div class="post-metadata">

**Author:** ![Eric2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/8c91f0/32.png) [@Eric2](https://community.thinkgeo.com/u/Eric2)\
**Post date:** [December 13, 2012, 11:20am UTC](https://community.thinkgeo.com/t/ajax-blocking/6330/8 "2012-12-13T11:20:17Z")

</div>

&nbsp;I&nbsp;created&nbsp;a&nbsp;program&nbsp;without&nbsp;the&nbsp;map&nbsp;control&nbsp;and&nbsp;my&nbsp;calls&nbsp;ran&nbsp;simultaneously,&nbsp;I&nbsp;added&nbsp;the&nbsp;map&nbsp;control&nbsp;and&nbsp;they&nbsp;then&nbsp;didn't.

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [December 18, 2012, 7:23pm UTC](https://community.thinkgeo.com/t/ajax-blocking/6330/9 "2012-12-18T19:23:47Z")

</div>

&nbsp;Hello&nbsp;Eric,

I&nbsp;made&nbsp;a&nbsp;sample&nbsp;to&nbsp;test,&nbsp;you&nbsp;can&nbsp;have&nbsp;a&nbsp;try,&nbsp;in&nbsp;the&nbsp;sample,&nbsp;there&nbsp;are&nbsp;two&nbsp;buttons,&nbsp;one&nbsp;button&nbsp;will&nbsp;sleep&nbsp;the&nbsp;thread&nbsp;and&nbsp;alert&nbsp;"sleep"&nbsp;after&nbsp;5&nbsp;seconds,&nbsp;another&nbsp;button&nbsp;will&nbsp;alert&nbsp;"alert"&nbsp;immediately.&nbsp;So&nbsp;if&nbsp;it&nbsp;will&nbsp;block&nbsp;the&nbsp;call&nbsp;back,&nbsp;once&nbsp;you&nbsp;click&nbsp;the&nbsp;first&nbsp;button&nbsp;then&nbsp;click&nbsp;the&nbsp;second&nbsp;button,&nbsp;"alert"&nbsp;will&nbsp;be&nbsp;block&nbsp;and&nbsp;alert&nbsp;after&nbsp;5&nbsp;seconds,&nbsp;if&nbsp;it&nbsp;does&nbsp;not&nbsp;block,&nbsp;"alert"&nbsp;should&nbsp;alert&nbsp;immediately.

Let&nbsp;us&nbsp;know&nbsp;if&nbsp;there&nbsp;is&nbsp;something&nbsp;different&nbsp;between&nbsp;the&nbsp;test&nbsp;sample&nbsp;yours&nbsp;and&nbsp;ours.

Regards,

Gary

[003\_002\_001\_WebApplication1.zip](https://community.thinkgeo.com/uploads/default/original/2X/2/2c820c50bf7dc5843966da1d735885105679fd33.zip) (164 KB)

---

<div class="post-metadata">

**Author:** ![Eric2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/8c91f0/32.png) [@Eric2](https://community.thinkgeo.com/u/Eric2)\
**Post date:** [December 20, 2012, 10:27am UTC](https://community.thinkgeo.com/t/ajax-blocking/6330/10 "2012-12-20T10:27:06Z")

</div>

I&nbsp;will&nbsp;get&nbsp;back&nbsp;to&nbsp;you&nbsp;next&nbsp;week,&nbsp;I&nbsp;am&nbsp;travelling.&nbsp;&nbsp;Thats&nbsp;waht&nbsp;I&nbsp;did&nbsp;to&nbsp;test&nbsp;also&nbsp;though,&nbsp;made&nbsp;two&nbsp;buttons,&nbsp;one&nbsp;with&nbsp;a&nbsp;sleep,&nbsp;one&nbsp;without.&nbsp;&nbsp;and&nbsp;they&nbsp;would&nbsp;both&nbsp;come&nbsp;back&nbsp;after&nbsp;the&nbsp;sleep.

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [December 20, 2012, 7:15pm UTC](https://community.thinkgeo.com/t/ajax-blocking/6330/11 "2012-12-20T19:15:17Z")

</div>

Hello&nbsp;Eric,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Ok,&nbsp;have&nbsp;a&nbsp;good&nbsp;trip,&nbsp;I&nbsp;will&nbsp;wait&nbsp;for&nbsp;your&nbsp;further&nbsp;information.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Gary
