Web Connection
Manually setting up the managed handler
Gravatar is a globally recognized avatar based on your email address. Manually setting up the managed handler
  Michael B
  All
  May 5, 2021 @ 04:54pm

Hi Rick,

The server you helped me setup with the managed handler some time ago is toast. I was looking at the docs to see how to manually setup the .NET managed handler and something is missing.

WWWC Setup Doc

You have

.NET Managed Handler

  • Go to the Connections Tree and find your Virtual Directory created earlier
  • Select Handler Mappings
  • Choose Add Managed Handler on the right sidebar
  • Enter your extension as *.wp where wp is the extension
  • Enter the path to the WebConnectionModule.dll

Your doc has a screenshot of the managed handler, but you can see there is no way to 'enter the path to the WebConnectionModule.dll'

Can you tell me where the WebConnectionModule.dll should live so that it appears in the drop down list or update the doc so that I can do this manually without the console app? I am trying to adapt my legacy version to latest.

Thanks!

Gravatar is a globally recognized avatar based on your email address. re: Manually setting up the managed handler
  Carl Chambers
  Michael B
  May 6, 2021 @ 12:19pm

Hi Michael,

On my machine, WebConnectionModule.dll is in the folder C:\WebConnectionProjects\project\Web\Bin.
I also recently tried to set up a handler in IIS and found the same thing you describe.

For my existing handlers, the Type was Westwind.WebConnection.WebConnectionHandler,WebConnectionModule but the closest option in the dropdown was Westwind.WebConnection.WebConnectionHandler.

I ended up adding a line to the system.webServer -> handlers section of the web.config file (copied from an existing line) and it worked fine.

<add name=".XXX_wconnect-module" path="*.XXX" verb="*" type="Westwind.WebConnection.WebConnectionHandler,WebConnectionModule" preCondition="integratedMode"/>

where "XXX" is the script map.
Can't say I understand it but it worked.

Carl

Gravatar is a globally recognized avatar based on your email address. re: Manually setting up the managed handler
  Michael B
  Carl Chambers
  May 6, 2021 @ 05:52pm

Hi Carl,

I think that the framework is running a script to tell IIS the location of the WebConnectionModule.dll and that's precisely my issue. Most likely WWWC updates the ApplicationHost.config in the Windows Inetsrv folder. I guess I need to check this on a dev pc to discover.

Your response inspired me not to give up!

Thanks for taking the time to reply.

Gravatar is a globally recognized avatar based on your email address. re: Manually setting up the managed handler
  Carl Chambers
  Michael B
  May 6, 2021 @ 08:22pm

I guess I need to check this on a dev pc to discover.

Please post your findings. I'm not knowledgeable on it but I am curious.

Gravatar is a globally recognized avatar based on your email address. re: Manually setting up the managed handler
  Michael B
  Carl Chambers
  May 7, 2021 @ 05:34am

Hi Carl,

There are no references in the servers applicationHost.config for WWWC. I scanned the wconnect folder for all references to WebConnectionModule.dll and came up with. You can see that the apps that ship with WWWC are managing it. I am pretty sure, it's simply a matter of dropping it in a 'bin' folder. Have not had time yet to figure out for sure what I can do to NOT use these tools to migrate my legacy wc.dll usage to managed handler. When I do, I will update this thread.

It seems that this is where the magic happens. See below.

  IF LOWER(pcServerType) = "iis" AND LOWER(pcServerType) > "iis5" AND LOWER(pcServerType) != "iisexpress"
     loIIS = CREATEOBJECT("wwIISAdmin")
     loIIS.cPath = LEFT(this.cIISPath,ATC("/w3svc",this.cIISPath)) + "W3SVC"
     *loIIS.cPath = "IIS://LOCALHOST/W3SVC"
     loIIS.AddRegisteredExtension(pcScriptDll,"West Wind Web Connection")
  ENDIF  

Gravatar is a globally recognized avatar based on your email address. re: Manually setting up the managed handler
  Rick Strahl
  Michael B
  May 8, 2021 @ 11:39am

IIS can find any modules that are installed in the current scope that you are configuring for. assuming you are configuring the Web Virtual or Root Site, it should be able to find the the DLL in the Project\Web\bin folder and show it in the drop down. It will not find it at a higher level node - ie. in the site root if you have the a virtual configured below.

As Carl points out all of the IIS machinations are simply UI expression over the simple web.config <handlers> entries that actually make the script map configurations and IIS figures out the configuration from its own internal state - if the DLL is in the right place it will see the module/handler. If it's not - it's not there, so if you don't see it it likely means you're not configuring correctly.

You can also use FoxPro code to make these configurations.

+++ Rick ---

© 1996-2024