Using POST method on application root folder
am 24.07.2007 18:27:40 von Matt Cooke
Hi all,
I have a unique requirement for a project that I'm working on. I'm
creating an ASP.NET application that gets programmatically accessed by
a 3rd party. The 3rd party uses the POST method all the time and I
cannot change this. Everything works fine, except when the 3rd makes
its first call to the root url (http://www.mydomain.com/myapplication
where myapplication is a virtual directory and application in my
IIS). When they post to this address, they get an HTTP 405 error with
the message "Method not allowed." I have POST allowed to .aspx files
and the default document for the application is default.aspx. IIS
doesn't seem to apply the settings for .aspx unless the URL is
explicitly set. What I mean is that the same call with
http://www.mydomain.com/myapplication/default.aspx works fine. Is
there a setting in IIS that specifies the verbs are allowed when
accessing the root directory?
Thanks,
Matt
Re: Using POST method on application root folder
am 24.07.2007 23:25:59 von David Wang
On Jul 24, 9:27 am, Matt Cooke wrote:
> Hi all,
>
> I have a unique requirement for a project that I'm working on. I'm
> creating an ASP.NET application that gets programmatically accessed by
> a 3rd party. The 3rd party uses the POST method all the time and I
> cannot change this. Everything works fine, except when the 3rd makes
> its first call to the root url (http://www.mydomain.com/myapplication
> where myapplication is a virtual directory and application in my
> IIS). When they post to this address, they get an HTTP 405 error with
> the message "Method not allowed." I have POST allowed to .aspx files
> and the default document for the application is default.aspx. IIS
> doesn't seem to apply the settings for .aspx unless the URL is
> explicitly set. What I mean is that the same call withhttp://www.mydomain.com/myapplication/default.aspxworks fine. Is
> there a setting in IIS that specifies the verbs are allowed when
> accessing the root directory?
>
> Thanks,
> Matt
FAQ. I'll get a blog entry up to explain it. Short answer is that you
are not running on IIS6/later, so you either write an ISAPI Filter to
avoid DefaultDocument resolution, or upgrade to IIS6/later which
actually allows POST to root of vdir.
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//