Apache 与 c# 类
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2114434/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Apache with c# classes
提问by Dested
Is there any way to have apache "pass" the request it takes to a c# "application" to handle, allowing it to return specific content. I want to handle an intense amount of asynchronous calls to apache via javascript and have these calls routed through c# (much the way asp.net does). Has anyone successfully done this before? Any idea where to start looking?
有什么方法可以让apache“传递”它需要ac#“应用程序”来处理的请求,允许它返回特定的内容。我想通过 javascript 处理大量对 apache 的异步调用,并通过 c# 路由这些调用(就像 asp.net 那样)。有没有人成功地做到过这一点?知道从哪里开始寻找吗?
Update:
Some more information. I want to be able to handle thousands of concurrent asynchronous requests as fast as can possibly occur writing the interpreting agent in some kind of threaded c# application. I could be wrong, but I dont think that iis with asp.net is tailored for this sort of thing (a proof of concept would be great).
更新:
更多信息。我希望能够尽可能快地处理数以千计的并发异步请求,在某种线程 C# 应用程序中编写解释代理。我可能是错的,但我不认为带有 asp.net 的 iis 是为这类事情量身定制的(概念证明会很棒)。
I feel that going with something like apache would be better suited. If that means going from something else to c# first is fine I guess, but I would like to be more direct.
我觉得像 apache 这样的东西会更适合。如果这意味着首先从其他东西转到 c# 没问题,我想,但我想更直接。
回答by Kibbee
Apache actually supports running C# libraries using mod mono. Also, you could use CURL to send a web request to C# running on IIS. Another way would be to open a server socket directly in C#, and have apache (via php, python, or some other scripting language) connect to you C# application to handle the request. I think you need to be more specific about what exactly you are trying to accomplish.
Apache 实际上支持使用mod mono运行 C# 库。此外,您可以使用 CURL 向在 IIS 上运行的 C# 发送 Web 请求。另一种方法是直接在 C# 中打开服务器套接字,并让 apache(通过 php、python 或其他一些脚本语言)连接到您的 C# 应用程序以处理请求。我认为你需要更具体地说明你到底要完成什么。
回答by jspcal
with apache2, you could run mod_aspdotnet
使用 apache2,你可以运行mod_aspdotnet
or if it suits you, run some urls in proxy mode (pass them to another asp.net server), using mod_proxy
或者如果它适合你,使用mod_proxy在代理模式下运行一些 url(将它们传递给另一个 asp.net 服务器)

