Wednesday, March 21, 2012

UrlRewriting, CascadingDropDown and "*" verb

Hi,

I use urlrewriting. In IIS settings contains "*" verb.
When I use CascadingDropDown there is an error of "Method error 405".
When I delete "*" verb - all is OK.

How to decide a problem without the delete of "*"?

Your URL rewriter is probably interfering with ASP.NET AJAX's handler for web service traffic.

Hello,

thank you for reply.

For rapid solution with MS ASP.NET AJAX I use jointly Anthem.NET AJAX. DropDownList control in Anthem.NET AJAX is working without web service (data is loading directly from DataSet). These two libraries is working jointly without conflicts.


I had the same problem I have resolved it. It is a problem/bug with IIS 5, look here:http://forums.asp.net/t/1123124.aspx

You may also add form extender as described here:http://forums.asp.net/t/1129701.aspx.

This is the code you need:

Ok, I have fixed it. It requires this code. Seems like this is a bug in IIS 5...It is not stripping PathInfo correctly before handling request to ASP.NET

privatevoid OnBeginRequest(object sender,EventArgs e)

{

HttpApplication app = senderasHttpApplication;

HttpContext context = app.Context;

string path = context.Request.Path;

int aspx = path.IndexOf(".aspx/",StringComparison.OrdinalIgnoreCase);if (aspx >= 0)

{

context.RewritePath(

path.Substring(0, aspx + 5),

path.Substring(aspx + 5),

context.Request.QueryString.ToString());

return;

}

int asmx = path.IndexOf(".asmx/",StringComparison.OrdinalIgnoreCase);if (asmx >= 0)

context.RewritePath(

path.Substring(0, asmx + 5),

path.Substring(asmx + 5),

context.Request.QueryString.ToString());

}

}

No comments:

Post a Comment