简体   繁体   English

ASP.NET Web 服务应用 .net 4

[英]ASP.NET Web Service Application in .net 4

I was going through the MSDN walkthrough on using client application services.我正在阅读有关使用客户端应用程序服务的 MSDN 演练。 http://msdn.microsoft.com/en-us/library/bb546195.aspx http://msdn.microsoft.com/en-us/library/bb546195.aspx

This is for .net 3.5..but i need to do it in .net 4. The thing is that it doesn't have any ASP.NET Web Service Applications listed. This is for .net 3.5..but i need to do it in .net 4. The thing is that it doesn't have any ASP.NET Web Service Applications listed. Has it introduced any replacement for that?它是否引入了任何替代品? Or is there any workaround?或者有什么解决方法吗?

Regards.问候。

One of the way is to select target platform as .NET 3.5 in the drop-down at the top of New Project dialog - this will allow you to select "ASP.NET Web Service Application" project template. One of the way is to select target platform as .NET 3.5 in the drop-down at the top of New Project dialog - this will allow you to select "ASP.NET Web Service Application" project template. Once you select the template, you may change the target platform to .NET 4 using project properties.一旦您 select 模板,您可以使用项目属性将目标平台更改为 .NET 4。

I believe that the main reason for this template not being available in .NET 4 view is that this project uses ASP.NET web services (asmx files).我相信这个模板在 .NET 4 视图中不可用的主要原因是这个项目使用了 ASP.NET web 服务(asmx 文件)。 Microsoft has declared this to be an obsolete technology and recommends to use WCF services instead. Microsoft 已宣布这是一项过时的技术,并建议改用 WCF 服务。

You can expose ASP.NET application services (authentication, role etc used the sample sited by you) as WCF services.您可以将 ASP.NET 应用程序服务(身份验证、角色等使用您提供的示例)公开为 WCF 服务。 See section titled "Using application services as WCF services" in this link .请参阅此链接中标题为“将应用程序服务用作 WCF 服务”的部分。 So I will recommend you to choose ASP.NET Web Application project and then expose ASP.NET services as WCF services.所以我建议你选择 ASP.NET Web 应用项目,然后将 ASP.NET 服务暴露为 ZFB608636129CB469B3FEZ9E 服务。

Instead web services use WCF , it has more features than asp.net Web Services取而代之的是 web 服务使用WCF ,它比 asp.net ZC6E190B28404933C48EZCE895E 服务具有更多功能

http://msdn.microsoft.com/en-us/library/ms731082.aspx http://msdn.microsoft.com/en-us/library/ms731082.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM