I Use IISModule (c++) in IIS
Here is what I would suggest.
First, remove any reference to your dll in the IIS config. Test the site as best you can. The goal is to verify that the crash is directly related to your dll and it's not related to something else that is configured on this server.
Second, modify your dll to display a "My dll got called." message to OutputDebugString and then returns. On the server, run the Debugview tool to capture debug output. The goal is to verify that IIS can load your dll and call it successfully. The important part is that this initial version of your dll should not do anything other than just exit after it writes to OutputDebugString. All you want to do is to see your debug message in the Debugview output.
https://www.bing.com/search?q=+c%2B%2B+OutputDebugString
https://learn.microsoft.com/en-us/sysinternals/downloads/debugview
Third, enable the application functionality in your dll. Add additional OutputDebugString calls to display what functions are being call, what data you are processing, what return values it sets, etc. The goal is to determine if whatever your code does causes the IIS crash and that your dll is seeing the data that you expect to see.
Start with that.