WCF完整的新手需求指南 [英] WCF Complete novice needs guidance

查看:51
本文介绍了WCF完整的新手需求指南的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MVC应用程序,该应用程序通过ASP SQL成员资格提供程序使用表单身份验证.

I have an MVC application that uses forms authentication through an ASP SQL Membership provider.

我想向应用程序添加WCF服务,并使用相同的数据库和成员资格提供程序来验证与该服务的连接.

I want to add a WCF service to the application and use the same database and membership provider to authenticate connection to the service.

我曾尝试向我的MVC应用添加简单的服务(即Hello World),然后使用测试客户端将其连接.一切正常.但我不确定如何使用表单身份验证来保护它.

Ive tried adding a simple service(i.e Hello World) to my MVC app and connecting to it using a test client.  All works fine. but im not sure how to secure it using the forms authentication.

因为这是我对WCF的首次尝试,所以我正在寻找逐步指南,该指南创建了一项需要从客户端进行上述身份验证的服务.  有关如何从客户端发送身份验证的说明也将有所帮助.

As this is my first forray into WCF im looking for a step by step guide that creates a service that requires the above authentication from the client.  Instructions on how to send the authentication from the client would also help.

我曾尝试关注MSDN上的内容,但很快就迷路了.  有人知道一个可以帮助我的简单指南

Ive tried following the stuff on MSDN but get lost very quickly.  Does anyone know of a simple guide that can help me out

谢谢

推荐答案

ASPNET和WCF是否在同一Web应用程序上?如果是这样,您可以将WCF服务更改为使用asp.net兼容模式,并共享asp.net会话和用户身份.

Is the ASPNET and WCF on the same web application? If so, you can change the WCF service to use the asp.net compatibiliy mode and share the asp.net session and user identity.

检查以下链接(最新答案): http://stackoverflow.com/questions/1087271/passing-formsauthentication-cookie-to-a-wcf-service

Check the following link (last answer): http://stackoverflow.com/questions/1087271/passing-formsauthentication-cookie-to-a-wcf-service


这篇关于WCF完整的新手需求指南的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆