I had a problem when a service needs to send a POST to the root of my ASP.net application that runs on my instance of Visual Studio development (e.g. / myapp / for example). However, ASP.net complains that the "HTTP POST protocol used to access the path" / myapp / 'is not allowed.
How to enable recording on this path? Would URL rewriting be better (rewirte / myapp / to / myapp / Default.aspx)?
Thanks.
EDIT:
I just was able to get the job done by adding this to my Global.asax file:
void Application_BeginRequest(object sender, EventArgs e) { string p = Request.Path; if (p.Equals("/myapp/")) { var query = "?" + Request.QueryString.ToString(); if (query.Equals("?")) { query = ""; } Context.RewritePath("/myapp/Default.aspx" + query); } }
But I have not tested very much, and I am curious if there is a better solution. This will also not work when deploying to IIS.
source share