数据访问层作为 Web 服务——这是个好主意吗?

Data Access Layer as a web service -- Is this a good idea?(数据访问层作为 Web 服务——这是个好主意吗?)
本文介绍了数据访问层作为 Web 服务——这是个好主意吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经研究了一段时间,实际上已经为一些 ASP.NET 2.0 网站创建了一个原型 ASP.NET Web 服务作为 DAL.只是想向那些成功地将 DAL 作为 Web 服务推出的更有经验的开发人员寻求一些见解/建议.将 DAL 部署为 Web 服务有哪些缺点/风险?保护或验证使用此 Web 服务的最佳方法是什么?WCF 是不可能的,我将在 VS 2005 中进行编码.

I have been researching for a while and have actually created a prototype ASP.NET web service as a DAL for a few ASP.NET 2.0 web sites. Just would like to ask for some insight/advice from more experienced developers out there who had successfully rolled out DAL as a web service. What are the drawbacks/risks to deploying DAL as a web service? What is the best way to secure or authenticate consumption of this web service? WCF is out of the question, I'll be coding in VS 2005.

谢谢.

推荐答案

我认为,这种方法的最大缺点是调用 Web 服务的额外开销.如果您需要频繁查询/更新 DAL,这可能会很慢.

I think, that biggest drawback of such approach is additional overhead of calling web service. If you need frequent queries/updates to DAL, this can get quite slow.

我的观点是,这种方法有点过度设计,除非您确实需要为不同的消费者提供物理上独立的 DAL,并且您需要在 DAL 中进行一些额外的验证/处理(这无论如何都是错误的).

My opinion is, that such approach is kind of overengineering, unless you really need to have physically separate DAL for different consumers and you need some additional validation/processing in DAL (which is kind of wrong anyway).

保护可以很简单.您可以将 SSL 与 IIS 身份验证一起用于您的公共服务接口.

Securing can be quite a simple. You can use SSL together with IIS authentication for your public service interface.

所以,这些是我的 0.03 美元

So, those are my $0.03

这篇关于数据访问层作为 Web 服务——这是个好主意吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
quot;Overflowquot; compiler error with -9223372036854775808L(编译器错误-9223372036854775808L(Q;溢出Q))
Visual Studio 2010 ReportViewer Assembly References(Visual Studio 2010 ReportViewer程序集引用)
Weird behaviour when I open a reportviewer in WPF(在WPF中打开报表查看器时出现奇怪的行为)
how do i pass parameters to aspnet reportviewer(如何将参数传递给aspnet report查看器)