0 Comments

I had promised my students that we would implement a “Find nearest XXXX” feature in our on going project. I was doing this for the first time and thought it would not be difficult. But, most of my time while preparing for the class, I was frustrated.

I could not come up with a WCF Web Service (hosted on Visual Studio’s development web server eg., http://localhost:1234/MyService.svc ) that could be invoked by Javascript on my website (hosted again on Visual Studio’s development web server eg., http://localhost:9876/MyWebsite/Default.aspx ).

Due to time constraints, I abandoned the WCF Service implementation and went in for the ASP.NET Ajax Page Methods

It’s only after reading this nice article, I understand the mistake I made or the way the cross-domain web requests work.

Mash-it Up with ASP.NET AJAX: Using a proxy to access remote API