views:

494

answers:

1

Hi guys,

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.

+1  A: 

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.

Cheeso
I'm sorry, but you said I know, and I mention that the Delphi DLL is a WebService, my 1st question asks if was there any trick to consume it inside the ASP.NET project itself without creating a 2nd install (script to add the handler for it), the 2nd question was if there is a easy way, using pascal to end up with an ASMX file.
balexandre
sorry, I'm having trouble understanding what you want to know.
Cheeso
easy :) how do I output an ASMX file from a Delphi code? (this will solve all my problems)
balexandre
P.S. just re-edited my question in a way that, now, I think it makes sence :)
balexandre
well yes, your modified question is much clearer to me, and also seems totally different from the original question.
Cheeso