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

3 replies

Last post Nov 09, 2020 04:00 AM by lextm

‹ Previous Thread|Next Thread ›
  • How we can troubleshoot the C++ native module after deployment on IIS.

    Oct 19, 2020 07:43 AM|mukeshdutt|LINK

    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,

     

  • Re: How we can troubleshoot the C++ native module after deployment on IIS.

    Oct 20, 2020 06:59 AM|Jalpa Panchal|LINK

    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.

    https://stackoverflow.com/questions/3914638/how-to-attach-debug-iis-native-module-with-vs-2010

    .NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
  • Re: How we can troubleshoot the C++ native module after deployment on IIS.

    Oct 28, 2020 03:27 AM|Jalpa Panchal|LINK

    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.

    .NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
  • Re: How we can troubleshoot the C++ native module after deployment on IIS.

    Nov 09, 2020 04:00 AM|lextm|LINK

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

    So,

    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
    Lex Li
    Affordable IIS Consulting Services at https://support.lextudio.com/services/consulting.html
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
‹ Previous Thread|Next Thread ›