Question

I'm trying to use jQuery to make some AJAX calls, but because I have wild card mapping (to .NET) in IIS 6 turned on, it doesn't seem to work. Disabling the mapping makes everything magically work.

I've put the web method attribute on methods in both an .aspx page and an .asmx web service, but neither work. Here is the sample URL that I am using for the AJAX calls:

localhost/UserChecker.aspx/CheckIfUserEmailsExists

localhost/UserChecker.asmx/CheckIfUserEmailsExists

I figure it must be something with the way .NET is interpreting the URL's but I'm not entirely sure why. More importantly, I'm not sure how to fix it, other than to disable wild card mapping! Is there any other way???

UPDATE

The CMS I am using (Kentico) does some URL routing, but even if I skip over the routing in the global.asax.cs code, I still get a 404.
Thanks in advance!

Was it helpful?

Solution

With the wildcard mapping on IIS will run the initial request via the wildcard handler first. This will be done BEFORE any URL rewriting (or URL routing) by your CMS.

I think that is why you are getting 404.

You can also try to disable "verify file exists" checkbox on the wildcard mapping to cater for the scenario when the actual URL will be later rewritten to something else.

OTHER TIPS

This is not a complete answer but I hope it points you in the direction of a solution.

Have you tried accessing the url directly in a browser and using some well placed breakpoints to track down the problem?

If you're getting 404s it sounds like your rules for routing aren't working.

[I'll update this if you can give a little more info about the behaviour you're seeing]

UPDATE

I think what might be happening is this:

You're providing a seperate mapping for your files with extensions (in these cases .aspx and .asmx):

localhost/UserChecker.aspx/CheckIfUserEmailsExists

localhost/UserChecker.asmx/CheckIfUserEmailsExists

These mappings are being used when you turn the wild card mappings off, and the '/CheckIfUserEmailsExists' is handled used or ignored. When you turn on the wildcard mappings your routing isn't informing your app how to 'route' correctly.

If you removed the extensions (with wildcard mappings turned on) does the following work?

localhost/UserChecker/CheckIfUserEmailsExists

Add the appropriate URLs to the exclusion list: Use the "Excluded URLs" setting in the Site Manager->Settings tab. (basic help documentation)

I suggest checking the URl outside of your CMS framework; Issue has to be with the URL routing. No tsure how it was working without the wild card mapping.

Questions to understand: 1.Did you have your CMS running when trying without wild card mapping? 2. How does this CMS system interact with IIS; IASPI dll ? or HTTP Handlers/modules?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top