當移動到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