c# - Different URL required when hosting a WCF service on Windows 7 -


i have wcf service defined follows:

<service name="myservice">     <host>       <baseaddresses>         <add baseaddress="http://localhost:8080/servicecontainer" />       </baseaddresses>     </host>     <endpoint address="service" binding="webhttpbinding" contract="iservice" /> </service> 

my service implements following contract:

[servicecontract] public interface iservice {     [operationcontract]     [webinvoke(method = "post", uritemplate = "dowork")]     void mymethod(); } 

i host wcf service windows service, using webservicehost.

hosting on xp call operation on uri:

http://myhost:8080/servicecontainer/dowork

(i.e. base address / uri template)

hosting on windows 7, same uri fails (with 404 error). however, following uri succeeds:

http://myhost:8080/servicecontainer/service/dowork

(i.e. base address / endpoint address / uri template)

the second uri works on xp. os of client calling service makes no difference.

what reason difference in behaviour between 2 operating systems? uritemplate more restrictive under windows 7 perhaps? , documented somewhere?


edit: have windows firewall , anti-virus scanner running (which cannot disable). however, not see in logs (e.g. pfirewall.log) suggest being blocked.

edit 2: adding following reserved uri allowed service used on windows 7, did not affect above behaviour:

netsh http add http://+:8080/ user=\everyone 

if have firewall or anti-virus on system turn off , check it,404 error general.

check url

http://myhost:80/servicecontainer/dowork 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -