我开发了一个使用Castle Windsor IoC容器的小型WCF服务,它可以工作 在我的电脑上很好。当我将它部署到Win 2008 R2服务器并托管 IIS 7中的WCF服务失败,出现以下错误。我查了一下 服务器级别web.config,信任级别设置为“完全”。做什么 我需要这样做才能让它发挥作用。作为测试,我将相同的服务部署到Windows 2003服务器上,信任级别设置为“Full”,并且工作正常。我是 无法弄清楚我错过了什么设置/配置 使服务失败的2008服务器。
堆栈追踪:
[SecurityException:该程序集不允许部分信任 呼叫者。] Castle.Windsor.WindsorContainer..ctor()+ 0
WMS.ServiceContractImplementation.IoC.IoCInstanceProvider..ctor(类型 service:)在D:\ WCF \ WCFProofOfConcept \ WMSServices中 \ WMS.ServiceContractImplementation \ IoC \ IoCInstanceProvider.cs:19
WMS.ServiceContractImplementation.IoC.IoCServiceBehavior.ApplyDispatchBehavior(ServiceDescription D:\ WCF中的serviceDescription,ServiceHostBase serviceHostBase) \ WCFProofOfConcept \ WMSServices \ WMS.ServiceContractImplementation \的IoC \ IoCServiceBehavior.cs:24
System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description,ServiceHostBase serviceHost)+377 System.ServiceModel.ServiceHostBase.InitializeRuntime()+37 System.ServiceModel.ServiceHostBase.OnBeginOpen()+ 27 System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)+49 System.ServiceModel.Channels.CommunicationObject.Open(时间跨度 超时)+261 System.ServiceModel.HostingManager.ActivateService(字符串 normalizedVirtualPath)+121 System.ServiceModel.HostingManager.EnsureServiceAvailable(字符串 normalizedVirtualPath)+479
答案 0 :(得分:0)
同意FryHard,https://groups.google.com/forum/?fromgroups=#!topic/castle-project-users/Dacb5xsWkE0的提示为我解决了这个问题。
然而,为了更容易,