修改web.config,在<system.serviceModel>下增加以下节(如果已经有serviceHostingEnvironment节点,则参照修改):
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" >
<baseAddressPrefixFilters>
<add prefix="http://www.yourdomain.com"/>
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
注意红色部分,将域名换成你自己的域名即可