How we can troubleshoot the C++ native module after deployment on IIS. RRS feed

  • Question

  • User1589893805 posted

    Hi Team,

    I have created a C++ native module; during development, I have tested with IIS express command line. After development, we have deployed the same on IIS. However, module was not reacting to anything. Then, I thought there might be some problem with my code. Subsequently, I have created and deployed a simple application which is use to write "Hello World" in the response, using WriteEntityChunks method, but same was not also working there.

    Please find below steps, how I have deployed on IIS:

    1. Open IIS, using run command "inetmgr".
    2. Click on server and go to features section.
    3. Go to the Modules from features section and click on "Configure Native Modules" from Actions Pane.
    4. Then click on Register button, after that you will get a popup for Module Info, fill all the required information then click ok.
    5. Go to the application for which you want to enable then same go to feature section and go to Modules.
    6. Click on Configure Native Modules from Action Pane and you will get a popup after that select the module what you have just added.
    7. After adding the Module, that should be appear in the list of modules.
    8. Then restart the IIS from command line. Command - >iisreset /noforce

    Best Regards,


    Monday, October 19, 2020 7:43 AM

All replies

  • User-848649084 posted

    You can debug your native module by attaching the debugger to the w3wp process.

    1)In Visual Studio, go to Tools > Attach to Process > 
       (select show processes from all sessions, and all users checkboxes at the bottom of the dialog. Make sure Attach Type is Native, or Managed And Native)

    2)Select the W3WP.exe process, and click Attach.

    3)Go to Debug > Windows > Modules (the naming coincidence is accidental), and make sure that the symbols for your DLL are loaded.  If not, Right Click and do Load Symbols, and manually browse to your symbol file.

    Put the breakpoint and debug away.


    Tuesday, October 20, 2020 6:59 AM
  • User-848649084 posted

    Is your issue solved? If your issue is solved then I request you to mark the helpful suggestion as an answer. This will help other people who face the same issue. If your issue still exists then try to refer the solution given by the community members. If then also you have any further questions then let us know about it. We will try to provide further suggestions to solve the issue. Thanks for your understanding.

    Wednesday, October 28, 2020 3:27 AM
  • User690216013 posted

    Those steps are not guaranteed to work, as IIS can generate unnecessary conditions for the native module and prevent it from working.


    1. Dig into applicationHost.config to see what exactly was added there.
    2. Enable failed request tracing to track if the module is loaded and takes effect, https://docs.microsoft.com/en-us/iis/troubleshoot/using-failed-request-tracing/troubleshooting-failed-requests-using-tracing-in-iis
    Monday, November 9, 2020 4:00 AM