Try our conversational search powered by Generative AI!

Web services in EPiServer CMS 5

Has anyone experienced the following error message whenever a web service method is called: The HTTP verb POST used to access path '/WebService.asmx/MethodName' is not allowed This is the error message we get after browsing to the .asmx file and clicking "Invoke" on a "Hello World"-type web method.
Oct 05, 2007 14:32
Ive also got the same problem. It seems like webservice doesnt like the wildcard mapping (.*) in iis settings. Havent got any solution to it yet.
Oct 22, 2007 12:22
May 19, 2009 0:12

I have only started to look for a solution to a similar problem.  I see this is an old thread but thought adding more details may prompt for solutions or help others who come across this:

I have a basic webservice which runs fine in my local development (XP Prof, VS2005 Prof, Casini browser). 

The asmx file is at the path: /templates/Public/services/storeLinks.asmx and has among other webmethods 'StoreLink'. 

Once deployed to editor environment (Win2003 Server, IIS6.0) the same call (jquery->ajax) is along the lines of:

                    type: "POST",
                    url: "/templates/Public/services/myLinks.asmx/StoreLink",
                    data: {'linkID': link.attr("name")},
                    contentType: ...[snip]

results in the following log entry. 

System.InvalidOperationException: Request format is unrecognized for URL unexpectedly ending in '/StoreLink'.
   at System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
   at System.Web.Services.Protocols.WebServiceHandlerFact...[snip] can post more!

NO SOLUTION yet but have been investigating aspects of correctly setting up webservices under IIS6.0.  Seems okay. 

Any pointers would be appreciated.

May 19, 2009 0:22

Hi there!

I am having the same problem and was wondering if anyone had come accross a solution yet?

I am using jquery to make an ajax call. The server is Windows server 2003 (32 bit), running IIS 6. My webservices are loated in a folder off the website root called webservices. I have added the following to the web.config:

<location path="Webservices">
    <add name="HttpGet" />
    <add name="HttpPost" />
    <add name="HttpSoap" />
   <clear />
   <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
   <add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="true"/>
   <allow users="*"/>

I am making the ajax call using the following javascript:

var webserviceurl = "/Webservices/FundPricesGetter.asmx/GetAllVisitorIdentityFundPricesHtml";

var allVisitorIdentityFundPricesXml = $.ajax({
 type: "POST",
 complete: function() {
 async: false,
 url: webserviceurl,
 data: "visitorIdentity=" + getCookie("visitoridentity")

It all works fine on my development computer, just not on the server. I keep getting the error: "No http handler was found for request type 'POST'".

Thanks in advance.

Aug 13, 2009 15:57

 In Glocal.asax:

//The BeginRequest event is fired for every hit to every page in the site
void Application_BeginRequest(Object Sender, EventArgs e)
var extensions = new[] {".asmx", ".svc"};
foreach (var ext in extensions)
var index = Context.Request.Path.IndexOf(ext, StringComparison.CurrentCultureIgnoreCase);
if (index <0) continue;

var path = Context.Request.Path.Substring(0, index + ext.Length);
var pathInfo = Context.Request.Path.Substring(index + ext.Length);
var query = Context.Request.Url.Query ?? "";
if (query.StartsWith("?")) query = query.Substring(1);
Context.RewritePath(path, pathInfo, query);



You could also make it into a httpmodule.. If you do that it is easier to tourn it on/off. 

Edited, Aug 14, 2009 18:29
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.