ASP.NET网站 – > WCF服务 – > WCF服务,一路冒充?
发布时间:2020-12-16 06:43:16 所属栏目:asp.Net 来源:网络整理
导读:总之,我的情况是这样的: 用户在Web浏览器中触发操作,这会导致对Web服务器(服务器A)中的Web服务进行Ajax调用. Web服务器发出对IIS(服务器B)中托管的WCF服务的调用 WCF服务发出对IIS(服务器C)中托管的另一个WCF服务的调用 所有网站都通过http而不是https公开.
总之,我的情况是这样的:
>用户在Web浏览器中触发操作,这会导致对Web服务器(服务器A)中的Web服务进行Ajax调用. 所有网站都通过http而不是https公开. 现在,服务器C需要知道用户在另一端的用户.到目前为止,我已将其工作,以便在模拟下执行对服务器B的WCF服务调用,因此服务器B具有表示用户的WindowsIdentity对象.但是,当我尝试在模拟下调用从服务器B到服务器C的服务调用时,我得到以下内容: System.ComponentModel.Win32Exception: No credentials are available in the security package Server stack trace: at System.IdentityModel.SspiWrapper.AcquireCredentialsHandle(String package,CredentialUse intent,AuthIdentityEx& authdata) at System.ServiceModel.Security.SecurityUtils.GetCredentialsHandle(String package,NetworkCredential credential,Boolean isServer,String[] additionalPackages) at System.ServiceModel.Security.SpnegoTokenProvider.OnOpening() at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpening() at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open(TimeSpan timeout) at System.ServiceModel.Security.SecurityUtils.OpenTokenProviderIfRequired(SecurityTokenProvider tokenProvider,TimeSpan timeout) at System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout) at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel,TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout,CallOnceManager cascade) at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action,Boolean oneway,ProxyOperationRuntime operation,Object[] ins,Object[] outs,TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action,Object[] outs) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall,ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) 调整服务绑定对我来说就像在冰上行走一样瘦,以至于我几乎在水上行走,所以让我们忽视到目前为止我失败了,并从一张干净的床单开始. 我应该如何配置服务以便彼此(和我)很好地玩? 解决方法
根据Microsoft的说法,您需要使用名为“Delegation”的东西,如果我理解正确,则指定服务器C信任服务器B以从服务器A正确地验证用户.
如果没有委派,您在服务器B上的服务只能作为来自服务器A的模拟用户访问本地资源. 从马的口:http://msdn.microsoft.com/en-us/library/cc949014.aspx (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 在ASP.NET 5项目中运行NUnit测试(在VS Test Explorer中)
- asp.net-mvc – Asp.Net MVC中的管理区域
- asp.net-mvc – 发布ASP.NET MVC 3 Html.TextAreaFor的Html
- asp.net-mvc – IIS 7上的ASP.net MVC返回空白页面
- asp.net-mvc – web.config中的表单身份验证
- asp.net-mvc – 将HTML.EditorFor转换为下拉列表(html.drop
- asp.net-mvc – 如何让routelink返回正确的URL?
- 这些ASP.NET Core依赖性警告的来源是什么?
- asp.net-mvc – 如何在Ajax窗体的asp.net mvc中提交下拉列表
- asp.net – INSERT存储过程不起作用?
推荐文章
站长推荐
- asp.net – 将字符串传递到MVC4中的部分视图
- asp.net – 如何在aspx.cs页面中访问对象标签?
- asp.net-mvc – Angular ng-include cshtml页面
- ASP.NET – Ajax Calendar Extender CSS继承自表
- asp.net-mvc-3 – 在MVC3中扩展不引人注目的java
- 将ASP.NET部署到Windows Azure云,应用程序在云上
- asp.net-mvc-4 – 如何获取没有隐藏输入的AntiFo
- ASP.NET 根据汉字获取汉字拼音的首字母(含多音字
- entity-framework – 使用“迁移”实体框架6.0.2
- asp.net – 部署已发布的代码?
热点阅读