Are HHTP "404" and "405" errors a step in the right direction following "400" Errors?
After changing my applicationhost.config file, based on step 3 in this article, from this:
<site name="HHS.Web" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:projectgitCStoreHHS.Web" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:21608:localhost" />
<binding protocol="http" bindingInformation="*:21608:shannon2" />
</bindings>
</site>
<site name="HHS.API" id="4">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:projectgitCStoreHHS.API" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:21609:localhost" />
<binding protocol="http" bindingInformation="*:21609:shannon2" />
</bindings>
</site>
...to this:
<site name="HHS.Web" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:projectgitCStoreHHS.Web" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:21608:" />
</bindings>
</site>
<site name="HHS.API" id="4">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:projectgitCStoreHHS.API" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:21609:" />
</bindings>
</site>
...and restarting IIS Express after this rigamarole (step 4 in the same article referenced above):
....I get when running may app, instead of my previous err ("400 - Bad Request") a different but more common problem: "404 - Not Found"
However, if I enter the URL into IE on the handheld device and run it, I get, "405 - Resource Not Allowed"
Does anybody know how to solve this dilemma / can anybody see a problem with what I'm doing here?
UPDATE
As to testing various URLs from the PC's (Chrome) browser, here are what I tried and their results:
// hostname / machine name:
"http://shannon2:21608/api/inventory/sendxml/bla/bla/bla" gives me:
HTTP Error 503. The service is unavailable.
// IP Address:
"http://192.168.125.50:21608/api/inventory/sendxml/bla/bla/bla" gives me:
<Error>
<Message>
The requested resource does not support http method 'GET'.
</Message>
</Error>
// locohost:
"http://localhost:21608/api/inventory/sendxml/bla/bla/bla" gives me the same response as using the IP Address (192.168.125.50) above.
// locohost as IP Address
"http://127.0.0.1:21608/api/inventory/sendxml/bla/bla/bla" also gives me the same response as using the IP Address (192.168.125.50) or localhost as shown above.
UPDATE 2
Trying to access the resource via the (IE) browser from the handheld device:
Using 127.0.0.1 within the URL causes the browser to respond with "Cannot find server or DNS error"
Using 192.168.125.50 (my PC's IP Address) responds with "HTTP 405 - Resource not found"
UPDATE 3
In the Gretelman post referenced in the answer (here) it says to do this:
netsh http add urlacl url=http://hanselman-w500:80/ user=everyone
...from a command prompt; which, in my case, would be:
netsh http add urlacl url=http://shannon2:80/ user=everyone
But doesn't that only open attempts to access port 80? I need to access the port the REST Web API method expects, namely 21608...
Should I be doing this:
netsh http add urlacl url=http://shannon2:21608/ user=everyone
?
UPDATE 4
I can perform the following at a command prompt with no errors:
iisexpress.exe site:"HHS.Web"
It is shown as running in IIS Express -- actually, HSS.Web was up prior to running that command (as I could see by right-clicking the IIS Express taskbar icon and selecting "Show All Applications"), along with HHS.API, but I ran it to see if it would return any err msgs, according to what is suggested here
UPDATE 5
As a follow-up to Update 3 in particular, it was either this:
netsh http add urlacl url=http://shannon2:80/ user=everyone
...or this:
netsh http add urlacl url=http://shannon2:8080/ user=everyone
...that did the trick - I am now finally able to hit the breakpoint on the server from the handheld after running those commands (opening up ports 80 and 8080 to the masses using my machine's hostName). Which was necessary, or whether they both were, I don't know. I had already added the commands for "21608" and "21609" so they were not the solution:
See Question&Answers more detail:
os