locked
Visual Studio 2008 Error: R6034 while attempting to attach to IIS Worker Process RRS feed

  • Question

  • When I attempt to attempt to connect to a IIS worker process the following error is generated:  "R6034, An application has made an attempt to load the C runtime library incorrectly.  Please contact the application's support team for more information."  I am working with two solutions, each of which produce DLLs to be installed in the GAC for use by SharePoin 2007.  C# is used to develope both DLLs, to my knowledge C++ is not coded into the application (I inherited this code from a previous developer).  However, C++ or one of its class is used by both of these solutions.  The articles and blogs I have see which discuss this error describe applications that are created in C++ or are dependent on C++ compiled resources (DLLs).  Both DLLs do use C++ code or libraries (at least not explicitly).

    The original development (established by the previous developer) does not product this error.  I am in the process of building a development box (see below), this error is generated on the new box.  Apparently I am overlooking something.  The specs for my development environment are below:

    OS:  Windows Server 2003, SP2 with the latest updates.

    Dev tool:  Visual Studio 2008, Professional

    Code:  Two solutions that produce a Class Library each (DLLs).

    Language:  C#

    Runtime environment:  MOSS 2007


    Thursday, March 3, 2011 9:37 PM

Answers

  • I found the solution to this issue. 

    My code is all C# but when I am attempting to attach to an IIS worker process to do live debugging on the SharePoint site the error (described above) occurs.  Since the error message makes reference to C++ I figured that perhaps some C++ files are missing from the new development environment.  With this in mind I downloaded the Visual C++ Redistribution package for Visual Studio 2008 (see link below...note the link below is to the x86 version...you can use it to find the x64 bit version) and installed it.  Next, I recompiled all the DLLs and copied them to the GAC and then reset IIS (executed 'IISRESET' at the command prompt...or just play it safe and reboot).  Finally, I followed the procedure described above (in previous reply) to attach to the IIS worker process and it worked successfully.  No more errors.

    My conclusion is that the process of attaching to the IIS worker process makes use of C++ redistribution files.  If these files are missing the error is generated.  Keep in mind that I have very little experience with C++ so this is just an assumption.  But the bottom-line is that once the C++ redistribution files are installed on the development machine the attachment process works successfully without incident.  Hopefully this detail explanation is helpful to you if you are experiencing the same issue.

    Link to C++ redistribution download:  http://www.microsoft.com/downloads/en/confirmation.aspx?FamilyID=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF


    • Marked as answer by SharePointBas Friday, March 4, 2011 6:16 PM
    Friday, March 4, 2011 6:15 PM

All replies

  •  

    Hi,

     

    Would you please attach to other IIS worker processes, or other windows processes, from VS2008, does the exception happen again? what changes has been made after you received this code from previous developer?


    Eric Yang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, March 4, 2011 6:17 AM
  • This DLL assembly contains a SharePoint workflow.  The error is generated when attaching the live code to the sharepoint list that utilizes this workflow; the error is not generated when the code is attached to any other process. Both machines have the WSPBuilder extension installed, I use this to do the attachement to the IIS worker process (right click on the project in Solution Explorer and choose WSPBuilder-->Attach to IIS Worker Process.  Also, when the error is generated and the OK button in the dialogue box is generated the status of the dubug process is set to Ready and the breakpoints that are set in the code are a solid red circle (not an empty circle which typically indicate an issue).

    I am not sure if the error should be overlooked or if corrective action is needed.  In keeping with best practices, I would like to find a solution that would prevent the occurance of the error even if the debugging session is not impacted.

    This is a new machine I am building to replace the original development machine that was established by the previous developer.


    Friday, March 4, 2011 3:31 PM
  • I found the solution to this issue. 

    My code is all C# but when I am attempting to attach to an IIS worker process to do live debugging on the SharePoint site the error (described above) occurs.  Since the error message makes reference to C++ I figured that perhaps some C++ files are missing from the new development environment.  With this in mind I downloaded the Visual C++ Redistribution package for Visual Studio 2008 (see link below...note the link below is to the x86 version...you can use it to find the x64 bit version) and installed it.  Next, I recompiled all the DLLs and copied them to the GAC and then reset IIS (executed 'IISRESET' at the command prompt...or just play it safe and reboot).  Finally, I followed the procedure described above (in previous reply) to attach to the IIS worker process and it worked successfully.  No more errors.

    My conclusion is that the process of attaching to the IIS worker process makes use of C++ redistribution files.  If these files are missing the error is generated.  Keep in mind that I have very little experience with C++ so this is just an assumption.  But the bottom-line is that once the C++ redistribution files are installed on the development machine the attachment process works successfully without incident.  Hopefully this detail explanation is helpful to you if you are experiencing the same issue.

    Link to C++ redistribution download:  http://www.microsoft.com/downloads/en/confirmation.aspx?FamilyID=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF


    • Marked as answer by SharePointBas Friday, March 4, 2011 6:16 PM
    Friday, March 4, 2011 6:15 PM