Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ISAPI DLL deployment files needed
#1
Hi there.  I am new to DLL deployment for IIS and ISAPI.  I have created the IW15 DLL file in Delphi 10.2 fine and have installed on the server following doc http://docs.atozed.com/docs.dll/deployme...20IIS.html.  On step 5 there is the vague wording about copying all files but all that is generated is the DLL.  Windows seems to want a landing htm mage or something minimal to call to load the DLL.  I found one reference on-line for the web.config file recommendation but I just cannot seem to get the DLL to load for deployment on the server.  What are basic files needed in the wwwroot to load the DLL?  Cheers. bob
Reply
#2
Item 5 is a basic test to see if your IIS setup is correct. It is not related to your IW Application and your IW Application doesn't need it.

Also, it is not used to call/load the DLL. After doing that test you can delete the html page.

You don't need anything to load the DLL. IIS will do it for you as soon as you reference it.

BTW: any reason why you are deploying it using IIS? IW 15 has a new Http.sys server which performs even better than IIS/ISAPI and is much simpler to deploy. I'm not saying that you must use it instead, it is just another option. You can read more about it here:

https://doc.atozed.com/en/iw15/develop/c...-intraweb/
Reply
#3
I have tried everything that I have found for resources and there is no way to reference directly which is my issue. I have even tried myurl/mydll.dll direct but IIS does not like it and the server tries to download the dll file. How do I reference the DLL external and what needs to be in the web.config file to manage it?

Thank you for your suggestion on Http.sys. This looks like the same as the standalone server option I have now and would not be able to be used with a specific URL since this would be added as a service off of the localhost of the server. This may be better than the standalone method I am having issues with ports maybe though that I can look into on that front. These are OK with this since I am hopefully able to have serverIP:port rather than localhost which is another issue I am having on another front.

So basically, the web traffic is going to subdomain.domain.com in this particular situation and then I want the DLL to load. I have many domains hosted on this sever and my network folks said I cannot redirect traffic that goes to this domain to the standalone server. Http.sys is a new concept for me so maybe I am misunderstanding you though. The way it was explained to me by the network admin is that we cannot redirect.

Cheers.
bob
Reply
#4
Hi Bob. In IW15 you can configure it like in IIS. Look in ServerController -> HttpSysOptions and set:

Code:
AddDefaultBind := False;
HostWildcard := hwWeak;
VirtualHostName := 'subdomain1.domain.com; subdomain2.domain.com; subdomain3.domain.com';

Leave it on Port := 80;

To test your application are listening on that VirtualHostName you provided, open powershell (on windows) and execute:
Code:
>netsh [enter]
netsh>http show servicestate [enter]

It's show you a list off all your bindings/VirtualHostNames. Search for you IWhttp.sys list, listening on SAME port IIS (80 / 443).
Reply
#5
Hi there. Thank you so much for your comments. I really appreciate them. I flipped my SA Server over to this new concept and it worked for the server on port 8888. When I update to what you have here, there is a conflict since the root domain is IIS and the subdomain is what I am trying to map. Looks like there is no way to have part IIS and part SA Server. I happened to have a domain that I was not using in IIS so I deleted from there and then set in SA Server and all worked with port 80.

For testing where I have no domain landing do I just set the bound IP to the server IP and then have port 8888? The following is what I had working last night for the recipe but I thought I would ask:
BoundIP=server IP
AddDefaultBind := false;
HostWildcard := hwWeak;
VirtualHostName := '';
Port=8888;


Also in IIS, I can replace a file and then it manages itself to reload and the user can just have a session reset worst case and keep working. Here I have to down the service, replace the exe and then start again causing major disruptions. How do you at least put up a under construction page while the system is down? Would I have another slim under construction exe and then start that capturing the port or domain as appropriate and then bring down the primary exe so traffic routes now to the under construction?

After contemplation, I have abandoned the dll concept sine this will be the same under construction issue anyway and who wants to be nested in IIS for another point of failure. The power of Delphi and IW is to keep out of Microsoft Tech as much as possible.

One last question is the threads per core setting. In production, I am assuming this is unlimited, right?

Cheers.
bob
Reply
#6
Hi Bob. First, in BoundIP=server IP, Will only accept [server IP] connections, leave it BLANK for accept connections from all.
If you like to IW15 and IIS coexist, each one takes care of its domain/port.
If they both use the same port [80/443] use HostWildcard := hwWeak; and VirtualHostName := 'yourhostname';
IIS names are on bindings and IW15 are in VirtualHostname. You can't have the same NAME/PORT (binding/virtualhostname) registered in both.
If you use a different PORT and don't need a subdomain, use HostWildcard := hwStrong;, in this case only your IW15 can accept connections on that PORT.
Use the command to see all NAME/PORT are registered on your server.
Code:
netsh>http show servicestate [enter]

I have:
https://jnp.com.br ->static HTML pages on IIS.
https://jnp.com.br/gerencial/login.html -> ISAPI on IIS.
https://fidelidade.jnp.com.br -> IW15.
All using the same server/port and same certificate. They can coexist perfectly.
Reply
#7
Thank you Jose. I see that you are using a landing page (login.html) for ISAPI to work. This was one of the issues I was having was finding information on how to actually launch the DLL. What code do you use to invoke the DLL in that file? Is there anything specific you need in the web.config file? I hope you have a wonderful day and thank you again for your response.
Cheers. bob
Reply
#8
You don't need any html page or code for ISAPI to work.

Once ISAPI DLL is correctly installed and IIS is configured properly it will work as long as you write the correct address in your browser. Something like:

http://<yourserver or domain>/<your application name>/<your isapi name>.dll

What happens when you do that?
Reply
#9
Hi there. Sorry for the delay in getting back to you. I am just waiting on my network person to remove the redirect where he has it hidden. In the meantime, thank you for the application name in the URL and that is the first reference I found for that. Everywhere else was just domain/dllname.dll. When I used this one I received an error that I was not allowed to list directory. As soon as I get this redirect toggled off, I can try your suggestion and let you know. If he takes too much longer, then I can use another domain and register the dll in there and try out over there. Cheers.
Reply
#10
(12-15-2018, 01:27 AM)bob9999 Wrote: Hi there.  Sorry for the delay in getting back to you.  I am just waiting on my network person to remove the redirect where he has it hidden.  In the meantime, thank you for the application name in the URL and that is the first reference I found for that.  Everywhere else was just domain/dllname.dll.  When I used this one I received an error that I was not allowed to list directory.  As soon as I get this redirect toggled off, I can try your suggestion and let you know.  If he takes too much longer, then I can use another domain and register the dll in there and try out over there.  Cheers.

For isapi you do not need the dll name in your url if you set teh default document to your dll name.   Also if it is asking you to list the contents of your directory then you need to allow it to run the dll.  (I don't remember where that setting is off the top of my head.)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)