当移动到Windows 7平台上的WCF调用从ASP.NET项目抛出异常Windows 7和WCF
ex {"HTTP could not register URL http://+:9100/Jfc.Dealing.OrderProvider.BLClient.svc/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details)."} System.Exception {System.ServiceModel.AddressAccessDeniedException}
+ [System.ServiceModel.AddressAccessDeniedException] {"HTTP could not register URL http://+:9100/Jfc.Dealing.OrderProvider.BLClient.svc/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details)."} System.ServiceModel.AddressAccessDeniedException
+ InnerException {"Access is denied"} System.Exception {System.Net.HttpListenerException}
Message "HTTP could not register URL http://+:9100/Jfc.Dealing.OrderProvider.BLClient.svc/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details)." string
Source "System.ServiceModel" string
+ TargetSite {Void OnOpen()} System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo}
我很习惯于忽略这些例外情况下的链接,我甚至都没有考虑过这种情况。你的例子对我很好(除非我无法接受网络服务,所以我用我自己)。但是,我必须为我希望托管服务的每个端口执行此操作,这真是一种耻辱。 – Ecyrb 2009-12-28 18:36:49
那么你可以做的是保留一个前缀并保留一些类似于// + 9100/Ecyrb /的内容,然后将每个服务放在该端口/ Ecryrb上,例如http:// localhost:9100/Ecyrb/Service1.svc /和http:// localhost:9100/Ecyrb/Service2.svc / – blowdart 2009-12-28 19:09:49