IIS 5 & IIS 6
Installed a web service; getting 404 error
Last post Jul 16, 2009 04:41 PM by forestial
Jul 16, 2009 02:16 PM|forestial|LINK
I wrote a small web service and created a Web Setup project for it in VS 2008. There is one asmx file, a web.config file and a dll which goes in the bin directory.
I install this on a machine with IIS6. IIS6 was already enabled on the machine but no other web apps were present. The installer succeeds and the virtual directory and the files are all present as expected. But any attempt to access the asmx file (for
example, the Browse menu option in the IIS admin tool, or typing the URL in IE, or attempting to connect to the web service from a client) is failing with a 404 'The page cannot be found' error.
As a test I manually created (in IIS admin) another virtual directory and placed a trivial test.html file in there. I can browse to that successfully. I copied the same test.html into the virtual directory where the web service is, and I can browse to
the test.html from there. So evidently the virtual directory is properly setup and there is not a permissions problem with it. But I cannot browse to the asmx file that my web setup put there.
I ran the same web setup for the same web service on another machine and it can be successfully accessed from there. So it appears to be specific to the first machine.
One thing about the first machine; when it starts up the W3SVC logs an error to the event log saying "Cannot register the URL prefix 'http://*.80/' for site '87257621' The necessary network binding may already be in use. The site has been deactivated.
The data field contains the error number (800700b7). I checked using netstat that nothing else is using port 80; also this doesn't make sense to me since IIS is working to some extent; I can browse the test.html file.
There is nothing interesting in the W3SVC log file - it just records the attempts to access the asmx file, and the 404 response.
Anything I am missing?
Jul 16, 2009 03:18 PM|tomkmvp|LINK
Start here ...
Jul 16, 2009 04:41 PM|forestial|LINK
Thanks for the link which was very helpful.
The error was a 404-2 "Lockdown policy prevents this request"
After a bit more research I found that ASP.NET v2.0.50727 was Prohibited in the 'Web Service Extensions' folder in IIS Manager. Changing that to Allowed seems to have solved my problem.