如何在web项目中添加.asmx文件(asp.net)C# [英] How to add .asmx file in web project (asp.net) C#
本文介绍了如何在web项目中添加.asmx文件(asp.net)C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在我的项目中添加一个Webservice.asmx文件,在App_Code文件夹中添加它的codebehid(Webservice.cs)文件,该文件可以在我项目的所有页面中访问。但我不知道我该怎么办。请帮忙。
提前感谢
i want to add a Webservice.asmx file in my project and its's codebehid(Webservice.cs) file in App_Code folder, which is accessible in all pages of my project. but i don't know how can i do. please help.
thanks in advance
推荐答案
请看下面的链接:
http://msdn.microsoft.com/en-us/library/ywx7tzs7(v = vs.90).aspx [ ^ ]
http://stackoverflow.com / questions / 20281144 / create-a-asmx-web-service-in-visual-studio-2013 [ ^ ]
但是,你应该避免使用ASMX。它现在被认为是旧的遗产。
较新的Microsoft平台甚至不支持ASMX(例如SharePoint 2013)。
你应该考虑转移到 WCF [ ^ ]或 Rest API [ ^ ]。
Look at the links below:
http://msdn.microsoft.com/en-us/library/ywx7tzs7(v=vs.90).aspx[^]
http://stackoverflow.com/questions/20281144/create-a-asmx-web-service-in-visual-studio-2013[^]
However, you should avoid to use ASMX. It's considered as old legacy now.
The newer Microsoft Platforms don't even support ASMX (such as SharePoint 2013).
You should consider moving to WCF [^]or Rest APIs[^].
这篇关于如何在web项目中添加.asmx文件(asp.net)C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文