How to Fix Request format is unrecognized for URL unexpectedly ending in '/GetCompletionList'

by
I recently moved my sites over to a new web server that has "Windows Server 2008 R2" installed.  The older server had just been running "Windows Server 2008".  After moving my sites over I discovered that my AJAX Toolkit AutoComplete functionality had stopped working and I was getting the following error:
System.InvalidOperationException
: 
Request format is unrecognized for URL unexpectedly ending in '/GetCompletionList'.

System.InvalidOperationException: Request format is unrecognized for URL unexpectedly ending in '/GetCompletionList'.
   at System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
   at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

I wasn't quite sure what was causing the error, since the AutoComplete list worked fine on my local development computer, as well as my older "Windows Server 2008" box.   After searching around, a number of solutions that people seemed to be having success with, was to add the webServices -> protocols to the system.web configuration in the web.config file like so:

But I discovered that in my case, this didn't always solve the problem.  Fortunately, I was able to find a solution that worked at Violato.net.  In order for the AutoComplete .asmx files to fire correctly I needed to add the ScriptHandlerFactory and ScriptResource entries to my web.config file like so:



Keep in mind, that if your website has its Application Pool set to Classic (instead of Integrated), then you would need to change the preCondition for ScriptHandlerFactor and ScriptResource to "classicMode" in the above example.

So I was able to get the AutoComplete web service working just by adding the ScriptHandlerFactory and ScriptResource entries to the system.webServer configuration in my web.config file. 


0
0

Add your comment

by Anonymous - Already have an account? Login now!
Your Name:

Comment:
Enter the text you see in the image below
What do you see?
Can't read the image? View a new one.
Your comment will appear after being approved.

Related Posts


Here's how you can add "nofollow" tags to links generated by a Sitemap file that is bound to an ASP.NET Repeater control using a SiteMapDataSource. I'm currently using this technique for the footer links of GotKnowHow.com, so if you View Source of the...  more »

Here's how you can find the text of a particular TextBox witnin an ASP.NET GridView row and then Select and Copy the text to Clipboard with Javascript. First put the following javascript in the HTML of your page (either in HEAD of your html page or...  more »

Adding a CSS border to an ASP.NET Image control was a mystery to me for the longest time. While you could easily use an html image and add the runat="server" to it and then add CSS, I really wanted to use an asp:Image control along with a CSS border....  more »

Here's how you can UrlEncode the plus sign (+) in a URL querystring in ASP.NET and then retrieve the plus symbol after UrlDecoding the string. In this example, I will do a postback and redirect the Server.UrlEncoded string to another page. First we will...  more »

There's a good chance that if you're database driven application is running into the following sql error message that says "String or binary data would be truncated", that the error is being caused by an issue in a SQL statement or in the SQL code of a...  more »

If you do any sort of ASP.NET programming there usually comes a time when you need to get a websites Base URL. The following shows two examples, the first example shows how to get the Base Site Url using C#, which can be used for getting both the...  more »

A regular expression for validating a image url.  more »

The new Routing features in ASP.NET 4.0 are pretty awesome. However, one issue I ran into recently was trying to get the fully qualified urls from Page.GetRouteUrl as string urls to be used in emails messages. Unfortunately, I wanted something that worked...  more »