简体   繁体   English

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

[英]Integrate Delphi ISAPI DLL into an ASP.NET web application

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

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. 因此,我们同意保留Delphi代码并找到一种在ASP.NET应用程序与此Delphi代码之间进行通信的方法,因此我们生成了一个添加到IIS的Delphi WebService,它是一个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? 我是否真的需要设置IIS并单独安装此WebService,还是可以使用任何特殊技巧将其用作项目的一部分(就像ASMX文件一样)?

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. 我的第二个问题 ,我很难提供有关如何将pascal转换为.NET的信息,因此我们可以使用pascal代码输出例如ASMX ...我什么都找不到。

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?). 我们有Delphi Studio 2009,它在几个文档中提到我们可以进行.NET(怎么做?),还有适用于.NET的Delphi(我们在这里只讨论Delphi Prism吗?)。

Thank you guys! 感谢大伙们!


New question that will resolve my 2 questions 新问题将解决我的2个问题

How can I generate an ASMX (.NET Web Service) or SVC (.NET WCF Service) from a Delphi code? 如何从Delphi代码生成ASMX(.NET Web服务)或SVC(.NET WCF服务)? I'm reading about Delphi Prism but I can't still figure it out. 我正在阅读有关Delphi Prism的信息,但仍无法弄清楚。

If you have an ISAPI DLL then it is installed separately from the ASMX or other ASPNET artifacts. 如果您有ISAPI DLL,则它将与ASMX或其他ASPNET工件分开安装。 The ISAPI DLL is installed within the IIS Manager. ISAPI DLL安装在IIS管理器中。 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. 如果是扩展名,则可能是响应http请求的内容。 If this is true, then it will handle a set of URLs that end with a particular suffix. 如果是这样,它将处理一组以特定后缀结尾的URL。 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. 例如,可能会为所有以“ .foo”结尾的请求注册一个ISAPI扩展,因此,如果对http://server/pagename.foo进行了标记 ,该扩展名将处理该请求。 IIS7 calls these things "handlers". IIS7将这些东西称为“处理程序”。

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. 如果此Delphi内容是一个筛选器,则可能是将其自身注入每个 http请求的东西,而不管最终哪个应用程序(ASPNET,其他)处理该请求,并且不考虑请求的扩展名。 A filter can do authorization checks, authentication, URL rewriting, that sort of thing. 过滤器可以执行授权检查,身份验证,URL重写之类的事情。 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. 使用授权过滤器,有时会在请求上设置授权库,您可以通过服务器变量获得授权库。

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

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