WCF - 在开发过程中使用用户名安全性
在利用 Cassini 的开发环境中启用 WCF 用户名安全性的阻力最小的方法是什么,该方法允许我们在生产中使用 TransportWithMessageCredential 配置相同的解决方案?
我们已经让它在分布式环境中工作其中托管服务器启用了 SSL。
<security mode="TransportWithMessageCredential">
<message clientCredentialType="UserName"/>
</security>
但是,这在 Cassini(Visual Studio 的 Web 服务器)中不起作用,因为它需要 SSL。据我所知,WCF 故意阻止您以纯文本形式传输用户名/密码。
这给我留下了使用 X509 证书的消息安全性或使用本地 IIS 并将调试器附加到 w3wp.exe 的 TransportWithMessage 安全性。这两种解决方案都会导致开发人员花费额外的时间进行设置和故障排除(与签出和编译后立即运行的不安全解决方案相比)。
我想要一些可以用最少的努力来检查、构建和运行的东西。
What is the least resistance approach for enabling WCF username security in a development environment that utilizes Cassini that will allow us to configure that same solution using TransportWithMessageCredential in production?
We have already gotten this to work in a distributed environment where the hosting server has SSL enabled.
<security mode="TransportWithMessageCredential">
<message clientCredentialType="UserName"/>
</security>
However, this won't work in Cassini (Visual Studio's Web server) because it requires SSL. From what I have read, WCF intentionally prevents you from transmitting username/password in plain text.
This leaves me with Message security using an X509 certificate or TransportWithMessage security using local IIS and attaching the debugger to w3wp.exe. Both solutions will result in developers spending additional time setting up and troubleshooting (compared to the unsecured solution that runs immediately after checking out and compiling).
I want something that can be checked out, built, and run with minimal effort.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
还有其他解决方案 - 安装 IIS Express 和 使用它而不是卡西尼< /a>.这将允许您使用与自签名证书相同的配置进行开发(IIS Express 支持 HTTPS)。
There is additional solution - install IIS express and use it instead of Cassini. That will allow you to use the same configuration with self signed certificate for development (IIS Express supports HTTPS).