.net 4.0还支持asmx吗
- 我在 VS2010 中打开了 .net 2.0 ASMX Web 服务并迁移到 .net4.0。如果我只是运行我的 ASMX 而不将代码更改为 WCF 格式,我仍然可以在 .net 4.0 下运行旧的 asmx 服务?这会按原样工作吗?
- 我的 web.config 文件也有 WSE 设置,这会发生什么?
- WCF/net4.0 不支持附件,我是否需要更改我的 asmx webmethod 以作为正文中的数据集返回,这可以工作吗?
- 我尝试使用数据集作为 .net 4.0 中的附件来运行现有的 asmx 服务,它有效吗?
- 我可以看到asmx文件可以添加到.net 2010中吗?他们仍然受到支持吗?
- I Opened my .net 2.0 ASMX webservice in VS2010 and migrated to .net4.0. If i simply run my ASMX w/o changing te code to WCF format i can still run old asmx service under .net 4.0 ?? will this work as it is?
- My web.config file also has WSE settings what happens to this?
- WCF/net4.0 does not support attachments, do i need to change my asmx webmethod to return as dataset in the body and will this work?
- I tried running my existing asmx service using dataset as attachments in .net 4.0 and it worked?
- I can see asmx file can be added in the .net 2010? are they still supported?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
ASMX Web 服务将属于 .NET 框架生命周期。 .NET Framework 4.0 和 4.5 支持 ASMX Web 服务。 Microsoft 建议不要使用 ASMX 创建新代码,如前面的答案中指出的那样。
ASMX Web Services would fall under the .NET framework lifecycle. The .NET framework 4.0 and 4.5 support ASMX web services. Microsoft recomends that no new code be created using ASMX as pointed in the earlier answers.
引用微软:
你自己决定这对你意味着什么。
WCF 完全取代了 ASMX Web 服务。那些抱怨 WCF 复杂性的人并没有注意到这一点。创建一个新的 WCF 服务并查看模板创建的“hello world”服务中的实际代码。这只是比 ASMX 模板创建的内容更复杂,因为它包含两个操作,而不仅仅是一个。
不过,请不要误会华尔街英语。它已经过时了。尽快停止使用它,并且不要使用 WSE 开发任何新代码。
不要让任何人让你相信什么都没有改变。确实如此。 ASMX 已被更好、更强大、更灵活的东西所取代。
To quote Microsoft:
Decide on your own what that means to you.
WCF completely replaces ASMX web services. People who complain about the complexity of WCF aren't paying attention. Go create a new WCF service and look at the actual code in the "hello world" service that the template creates. That's only more complicated than what the ASMX template created because it includes two operations not just one.
Make no mistake about WSE, however. It's simply obsolete. Stop using it as soon as possible, and do not develop any new code using WSE.
Don't let anybody convince you that nothing has changed. It has. ASMX has been replaced by something much better, much more powerful, and much more flexible.
是的,您也可以在 .NET 4.0 中使用 ASMX。
Quoting Dave Ward from his reply to a comment on his post at Encosia named ASMX and JSON – Common mistakes and misconceptions
Yes, you can use ASMX in .NET 4.0 also.
Quoting Dave Ward from his reply to a comment on his post at Encosia named ASMX and JSON – Common mistakes and misconceptions