none
The system cannot find the file specified. (Exception from HRESULT: 0x80070002) RRS feed

  • Question

  • Hi,

    I have a solution where I use a custom pipeline component. When I deploy it to my development environment which is on the same server as where I develop in visual studio the app works fine in runtime. But when I make a MSI from the deployed app in the development environment and then install it on the test environment I get the next error:

    The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

    The error occurs when I drop a file at the receive location where the custom pipeline component is used.
    After some google I found that it has to do with the GAC. But when I installed the MSI to the test environment I also "installed" the .dll of the custom pipeline component to the GAC by using Gacutil.

    Whats did I do wrong?

    Tuesday, January 27, 2015 12:13 PM

Answers

  • Hi Ronald,

    I simulated this error and tried to use Process Monitor tool to find the root cause of this issue.

    We know that this error is due to one of the dependent assemblies not being Gaced. But there is no evidence to find the name of the component which is not GACed. This becomes more complex when you have more than one wrapper component. 

    One of ways to find the solution for this issue is by using the Process Monitor tool. Since this tool captures all the run time events, its possible with this tool to find the failed event inside a process runtime.

    I have blogged about this and how to use this excellent tool to capture this above mentioned error. Hope this helps.

    http://www.fortuvis.com/blog/biztalk-error-details-the-system-cannot-find-the-file-specified-find-the-root-cause-using-process-monitor-tool-2/

    Regards,

    M.R.Ashwin Prabhu


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

    • Marked as answer by Angie Xu Monday, February 9, 2015 2:29 AM
    Friday, February 6, 2015 6:21 PM

All replies

  • The MSI of a deployed Application will extract the Pipelines but NOT PIPELINE COMPONENTS.

    If you want this custom component to move as part of your MSI then add that to the BizTalk Resources as an assembly and re-export your MSI.

    Right now, if you do a gacutil /l on your destination system you'll find that the pipeline component is missing and thus the error. If you copy it manually, GAC it and then restart the host instance you'd be able to resume your test message.

    Regards.

    Tuesday, January 27, 2015 12:27 PM
  • To deploy a BizTalk pipeline component, you need to:

    1. Add the file to the "Pipeline Components" folder.
    2. Add it to the Global Assembly Cache (GAC).

    Make sure you restart the host instance(s) after deployment AND be sure to deploy it on all BizTalk servers within the BizTalk Group.

    Rachit


    Please mark as answer or vote as helpful if my reply does

    Tuesday, January 27, 2015 12:32 PM
    Moderator
  • I tried all options which you suggested so first I deployed to development and added the .dll of the custom pipeline component to the app. I enabled the option to add to the global assembly cache on MSI file install (gacutil)

    then I made an MSI export and installed it on the test environment. Check the gac and saw the .dll was installed. Next thing was adding the .dll to the BizTalk pipeline components folder. Then I imported the bindings, restarted the host instance and mplaced a xml file in the receive location. And again the same eror.

    Tuesday, January 27, 2015 12:50 PM
  • This issue is just to do with component missing in GAC.

    You may have Gaced, the pipeline component, may be that you pipeline component is using/referencing another custom component which is not being GACed. Check you pipeline component code and see whether all the referenced custom components have been GACed.

    Or may be this issue is coming from some other artifacts like maps, orchestration where one of its dependant components is not GACed.

    Core issue is component not being GACed, which component - this you have to find it out. More probable case is it some of the dependent component which we more often overlook, could be the culprit.

    Also ensure you have recycled/restarted the host instance or Application pool (if its under isolated host)


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

    Tuesday, January 27, 2015 1:13 PM
  • Hi,

    Make sure that the pipeline component is signed. Are you sure the error is due to the pipeline component in question and not anything else missing like map etc.


    Bali ... Mark As Answer or Vote As Helpful if this helps.

    Tuesday, January 27, 2015 1:34 PM
  • No, do not put the custom Pipeline Component in the \Pipeline Components\ folder.  They should be in the GAC only.

    Review this Wiki Article:

    BizTalk: Deploying Custom Pipeline Components in BizTalk Server 2006 and Higher

    There are instructions for DEV and Deployment such as adding the component to the .msi package.

    From here, you will have to post the entire error stack.

    Tuesday, January 27, 2015 1:45 PM
    Moderator
  • I tried all options which you suggested so first I deployed to development and added the .dll of the custom pipeline component to the app. I enabled the option to add to the global assembly cache on MSI file install (gacutil)

    then I made an MSI export and installed it on the test environment. Check the gac and saw the .dll was installed. Next thing was adding the .dll to the BizTalk pipeline components folder. Then I imported the bindings, restarted the host instance and mplaced a xml file in the receive location. And again the same eror.

    • Check if all the dependent assemblies (Required/imported in given assembly) are also present in GAC & wherever necessary. Any missing dependent assembly gives the same error.

    • Check if receive handler is defined for the Host Instance and check if the Host Instance is added. Check Receive Location and updated the Receive Handler property.

    Rachit


    Please mark as answer or vote as helpful if my reply does

    Tuesday, January 27, 2015 1:51 PM
    Moderator
  • I think what you suggest can be the answer, the problem is I cannot find the missing assembly. Is it possible to see what assemblies are used on the development environment to run the pipeline?

    Development has much more items in the GAC then the Test environment.

    Tuesday, January 27, 2015 2:40 PM
  • For CLR 4.0, you can look in the folder C:\Windows\Microsoft.NET\assembly\GAC_MSIL

    For CLR 2.0, you can look in the Assemblies viewer in the Windows folder.

    Tuesday, January 27, 2015 3:15 PM
    Moderator
  • Well on development there are 533 assemblies on that location, 421 on Test.
    I don't think it will be a good idea to copy the assemblies from development to test.

    Tuesday, January 27, 2015 3:23 PM
  • Yes the pipeline component is signed and I tested the app with the default xml pipeline and don't get the error then. So it has to be in the custom component.

    Im not very good with C# and the custom component is developed by an external party. So I made a screenshot of the custom pipeline project.

    Wednesday, January 28, 2015 8:20 AM
  • Hi Ronald,

    Did someone mention the Resources folder in your Application? If you add your pipeline component as a resource it will list the dependencies. Then when you export that msi it will contain or list the assemblies that need to be added to the gac.

    if you are still stuck on this, a good method to resolve it is Fusion. This is an advanced technique and you will need to be an Administrator on the test machine. There is a good discussion on Stackoverflow here: http://stackoverflow.com/questions/255669/how-to-enable-assembly-bind-failure-logging-fusion-in-net

    There are plenty of references in MSDN and in various.

    The technique can log where .NET looks for and either succeeds or fails to find an assembly. You will probably see a series of fails but then it will find the assembly that it needs. Or it may not and then you will know what the problem is.

    There is a fusion log viewer program but personally I like to look at the raw data. It takes a bit of practice to read as you are only looking for the last fail in the chain.

    Most importantly you must not forget to remove the Registry settings - otherwise it slow down and clog up your machine.

    Lastly, is your test machine a group or cluster ? Sometimes people just load the assemblies on machine.

    Hope that helps.

    mark


    mark

    Wednesday, January 28, 2015 11:00 AM
  • Hi Ronald,

    I simulated this error and tried to use Process Monitor tool to find the root cause of this issue.

    We know that this error is due to one of the dependent assemblies not being Gaced. But there is no evidence to find the name of the component which is not GACed. This becomes more complex when you have more than one wrapper component. 

    One of ways to find the solution for this issue is by using the Process Monitor tool. Since this tool captures all the run time events, its possible with this tool to find the failed event inside a process runtime.

    I have blogged about this and how to use this excellent tool to capture this above mentioned error. Hope this helps.

    http://www.fortuvis.com/blog/biztalk-error-details-the-system-cannot-find-the-file-specified-find-the-root-cause-using-process-monitor-tool-2/

    Regards,

    M.R.Ashwin Prabhu


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

    • Marked as answer by Angie Xu Monday, February 9, 2015 2:29 AM
    Friday, February 6, 2015 6:21 PM