简体   繁体   English

Web应用程序和Web表单之间的混淆

[英]Confused between Web Application and Web Forms

I just purchased a Twilio account and an 888 business number, and am now working to setup a very simple call system for my business. 我刚购买了一个Twilio帐户和一个888公司电话,现在正在为我的公司设置一个非常简单的呼叫系统。 Everything from the examples is working fine, however I wish to create a C# Web Forms Application that I will run as the server. 示例中的所有内容都可以正常工作,但是我希望创建一个将作为服务器运行的C#Web Forms应用程序。 There C# based examples seem to be centered around ASP.NET Web Applications though, which I know basically nothing about. 尽管有一些基于C#的示例似乎以ASP.NET Web应用程序为中心,但我对此一无所知。

Can a C# ASP.NET application be a self serving (standalone) .exe, or is there any way I can make a C# Windows Form Application work with this instead? C#ASP.NET应用程序可以是自助式(独立).exe,还是可以通过任何方法使C#Windows Form Application与此一起工作?

If needed, this is the tutorial I am following and need to implement... http://www.twilio.com/docs/howto/ivrs-the-basics 如果需要,这是我正在遵循的教程,需要实施... http://www.twilio.com/docs/howto/ivrs-the-basics

Web applications are web sites run from IIS. Web应用程序是从IIS运行的网站。 You can't "execute" a web application as an EXE. 您不能将Web应用程序作为EXE“执行”。 A Windows Forms application, on the other hand, is a Windows application that runs on a user's desktop. 另一方面,Windows窗体应用程序是在用户桌面上运行的Windows应用程序。

Choosing one or the other depends on your particular needs. 选择一个或另一个取决于您的特定需求。

When Twilio receives a call on your behalf it sends a notification about this event to your application. 当Twilio代表您接到电话时,它将向您的应用程序发送有关此事件的通知。 In your Twilio account settings you specify where this notification is to be sent to. 在您的Twilio帐户设置中,您可以指定将此通知发送到的位置。

Whatever address (URL) you specify there - your application should be listening to the commands sent to this address. 无论您在此处指定什么地址(URL)-您的应用程序都应该侦听发送到该地址的命令。 You can do this in a number of ways, including "Standalone .exe", but the easiest way to do it is to set up a web application. 您可以通过多种方式来执行此操作,包括“ Standalone .exe”,但是最简单的方式是设置Web应用程序。

If you are building an IVR your web application should respond to the request with the web page consisting of the TwiML as explained in the tutorial. 如果要构建IVR,则Web应用程序应使用本教程中说明的包含TwiML的网页来响应请求。

BTW I would not use WebForms for the Web App WebForm isert too much HTML in the responses. 顺便说一句,我不会在Web App中使用WebForms WebForm在响应中包含太多HTML。 Go with ASP.NET MVC. 使用ASP.NET MVC。 It will be easier because in your case the response has nothing to do with HTML 这样会更容易,因为在您的情况下,响应与HTML无关

Also debugging this app should be pretty stright forward - you just type your app url in your browser and look at the output in the browser. 同样,调试该应用程序应该非常简单-您只需在浏览器中键入应用程序的url,然后在浏览器中查看输出即可。

I don't really understand your question but... most Twilio features require that your code is running on a webserver that their webserver can send requests to. 我不太了解您的问题,但是...大多数Twilio功能要求您的代码在其服务器可以向其发送请求的网络服务器上运行。 A standalone .exe isn't going to do that. 独立的.exe不会这样做。 ASP.NET Web Forms would (though only when run from a server that Twilio's server can reach). ASP.NET Web窗体将(尽管仅在从Twilio的服务器可以访问的服务器上运行时)。

You can use the built in development webserver that is shipped with visual studio, you could easily deploy this to a client machine with VS, this can host a website but is very limited and not sure about licence implications 您可以使用Visual Studio附带的内置开发Web服务器,可以轻松地将其部署到具有VS的客户端计算机上,这可以托管一个网站,但是非常有限并且不确定许可证的含义。

see http://msdn.microsoft.com/en-us/magazine/cc188791.aspx 参见http://msdn.microsoft.com/en-us/magazine/cc188791.aspx

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

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