将 Delphi ISAPI DLL 集成到 ASP.NET Web 应用程序中

发布于 2024-08-01 20:10:02 字数 814 浏览 4 评论 0原文

我们在 Delphi 中拥有所有代码,并且很难直接在 .NET 中创建新的 ASMX / SVC 文件,因为它使用加密和奇怪的东西:),因为转换和转换需要大约 2 周的时间测试...

因为我们同意保留 Delphi 代码并找到一种在 ASP.NET 应用程序和这个 Delphi 代码之间进行通信的方法,所以我们生成了一个添加到 IIS 的 Delphi WebService,它是一个 ISAPI DLL。

我的第一个问题是:

我真的需要设置 IIS 并单独安装此 WebService,还是可以使用任何特殊技巧将其用作我的项目的一部分(就像 ASMX 文件)?

我的第二个问题,我很难向大家提供有关如何将 pascal 转换为 .NET 的信息,以便我们可以使用 pascal 代码输出 ASMX...我可以找不到任何东西可以做到这一点。

我们有 Delphi Studio 2009,它在几个文档中提到我们可以做 .NET(如何做?),还有 Delphi for .NET(我们这里只讨论 Delphi Prism 吗?)。

感谢你们!


将解决我的 2 个问题的新问题

如何从 Delphi 代码生成 ASMX(.NET Web 服务)或 SVC(.NET WCF 服务)? 我正在阅读有关 Delphi Prism 的内容,但我仍然无法弄清楚。

We have all the code in Delphi and it is hard to create a new ASMX / SVC File directly in .NET because it uses encryption and weird stuff :) as it would take around 2 weeks to convert and to test...

Because of that we agreed that will keep the Delphi code and find a way to communicate between the ASP.NET application and this Delphi code, so we generated a Delphi WebService that added to IIS is an ISAPI DLL.

My first question was:

Do I really need to set up IIS and install this WebService alone, or can I use it as a part of my project (just like an ASMX file) using any special trick?

and my 2nd question, it is been hard for me to provide the fellow information on how to convert pascal into .NET so we could, using the pascal code, output an ASMX for example... I can't find anything to do this.

We have Delphi Studio 2009 and it mention in several documents that we can do .NET (how?) and there is Delphi for .NET (are we talking about and only Delphi Prism here?).

Thank you guys!


New question that will resolve my 2 questions

How can I generate an ASMX (.NET Web Service) or SVC (.NET WCF Service) from a Delphi code?
I'm reading about Delphi Prism but I can't still figure it out.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

捶死心动 2024-08-08 20:10:02

如果您有 ISAPI DLL,那么它是与 ASMX 或其他 ASPNET 工件分开安装的。 ISAPI DLL 安装在 IIS 管理器中。 它要么是过滤器,要么是扩展,并且是专门为每个过滤器安装的。

如果它是一个扩展,那么它可能是一个响应http请求的东西。 如果这是真的,那么它将处理一组以特定后缀结尾的 URL。 例如,ISAPI 扩展可能会为所有以“.foo”结尾的请求注册,因此如果您勾选 http:// server/pagename.foo,请求将由扩展处理。 IIS7 将这些东西称为“处理程序”。

如果这个 Delphi 事物是一个过滤器,那么它可能是一个将自身注入每个 http 请求的事物,无论哪个应用程序(ASPNET,其他应用程序)最终处理该请求,并且无论请求的扩展如何。 过滤器可以执行授权检查、身份验证、URL 重写等操作。 与过滤器交互的方式是通过服务器变量,或者......在某些情况下,例如重写过滤器,过滤器的操作对“页面”逻辑是完全透明的。 您可以忽略存在过滤器的事实。

使用授权过滤器,有时会在请求上设置授权厨师,您可以通过服务器变量获得它。

If you have an ISAPI DLL then it is installed separately from the ASMX or other ASPNET artifacts. The ISAPI DLL is installed within the IIS Manager. It's either a Filter or Extension, and it's installed specially for each.

If it's an extension, then it is probably a thing that responds to http requests. If this is true, then it will handle a set of URLs that end with a particular suffix. For example, an ISAPI extension might be registered for all requests that end in ".foo", so if you tickle http://server/pagename.foo, the request will be handled by the extension. IIS7 calls these things "handlers".

If this Delphi thing is a filter, then it is probably a thing that injects itself into each http request, regardless of which application (ASPNET, something else) eventually handles the request, and regardless of the extension on the request. A filter can do authorization checks, authentication, URL rewriting, that sort of thing. And the way you would interact with a filter is via server variables, or ... in some cases like a rewrite filter, the action of the filter is completely transparent to the "page" logic. you can ignore the fact that a filter is present.

With an authorization filter, sometimes there are authorization cookes set on the request, and you'd get that via a server variable.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文