设置安全的 Web 服务
我需要设置一个网络服务。服务器位于 DMZ 中,因此我考虑将 Web 服务放在 IIS (asmx) 中,因为只有端口 80 可用于通信。但它提供的信息应该受到保护。当谈到 .NET/IIS 可以提供的功能时,我有哪些选择?
或者也许我应该放弃 asxm Web 服务并切换到其他服务。但再一次,我只有 80 端口可用。
谢谢, 帕维尔
I need to set up a web service. Server is in DMZ, so I thought about putting web service in IIS (asmx) cos only port 80 is available to comunicate. But information it provides should be secured. What choices do I have when it comes to what .NET / IIS can offer ?
Or maybe I should dispense with asxm web service and switch to something else. But once again, I only have port 80 available.
Thanks,
Pawel
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该查看 WCF
在保护 Web 服务时,您必须采取主要操作路径:
WS-* 规范并不是一件容易理解的事情(特别是 WS-Security,它依赖于其他规范,如 WS-Policy、WS-Addressing、XML Signature、XML Encryption 等)。但既然你说你只有端口 80 可用于通信,我认为你别无选择(甚至不要考虑实现你自己的安全机制:D)。
因此,如果您必须使用 WS-Security,那么请选择 WCF。您有一系列可供选择的通信机制,并且 WCF 采用为您处理许多繁重的工作,抽象出 SOAP 和 WS-* 的“裸机”。
You should checkout WCF
When it comes to securing web services you have to main action paths:
WS-* specifications are not an easy thing to digest (especialy WS-Security which relies on other specs like WS-Policy, WS-Addressing, XML Signature, XML Encryption etc). But since you say you only have port 80 available for communication I think you don't have a choice (don't even think of implementing your own security mechanism :D).
So, if you have to use WS-Security then go for WCF. You have a bunch of communication mechanism you can choose from and WCF takes a lot of the heavy lifting for you, abstracting away the "bare metal" of SOAP and WS-*.
在 IIS 中,如果您希望仅允许特定 IP 地址访问 Web 服务,请执行以下操作:
单击“编辑功能设置”,选择“拒绝全部”,添加“允许进入”。
输入您希望服务访问的 IP。
Within IIS, if you wish to only allow a specific IP address to access the web service, do the following:
Click “Edit Feature Settings”, Select Deny All, Add Allow Entry.
Type in the IP you want the service to access.