简体   繁体   English

现有 asp.net webforms 上的 WCF

[英]WCF on an existing asp.net webforms

i have an ASP.NET web forms that i want to start building an iPhone application for.我有一个 ASP.NET Web 表单,我想开始为其构建 iPhone 应用程序。 and for that i think the best way is to expose y methods using WCF, and this my first time with WCF.为此,我认为最好的方法是使用 WCF 公开 y 方法,这是我第一次使用 WCF。

The project i currently have is a website created using: File > New > Website, not File > New > ASP.NET Web Forms project.我目前拥有的项目是使用以下方式创建的网站:文件 > 新建 > 网站,而不是文件 > 新建 > ASP.NET Web 窗体项目。

My questions are:我的问题是:

  1. Can i use the code that i already have on my website, or i have to recreate the methods as WCF web methods.我可以使用我网站上已有的代码,还是必须将这些方法重新创建为 WCF Web 方法。
  2. Should i add WCF services to my current project or i have to create a new WCF project?我应该将 WCF 服务添加到我当前的项目中还是必须创建一个新的 WCF 项目? if the second option how to deploy it ?如果第二个选项如何部署呢?

If there is a tutorial on how to do it, it would appreciated.如果有关于如何做的教程,将不胜感激。

Thanks in advance.提前致谢。

There are new improvements to the ASP.NET framework. ASP.NET 框架有新的改进。

You can expose your existing Web Forms functions using Web API.您可以使用 Web API 公开现有的 Web 窗体函数。

One ASP.NET - Making JSON Web APIs with ASP.NET MVC 4 Beta and ASP.NET Web API 一个 ASP.NET - 使用 ASP.NET MVC 4 Beta 和 ASP.NET Web API 制作 JSON Web API

在此处输入图片说明

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

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