none
TypeProviderException when full path is not used in Hosted Application's XML Initialization string RRS feed

  • Question

  • Hello, I am not sure if anyone has come across this issue. When using the CCF 2009 SP1 version, on the hosted application XML initialization string if I do not use the full path (C:\filePath) the desktop is failing to load the library during it's launch even though the library is in the same location as the AgentDesktop.exe. For example for the out-of-box CTI hosted control if I had removed the full path from Hosted Application and ran the AgentDesktop.exe it would fail throwing the following exception:


    8/10/2009 10:25:51 AM: Hosted Application Factory: Hosted Application "CTI" could not be created. Contact the CCF administrator.
    Microsoft.Ccf.Common.TypeProvider.TypeProviderException: TPV010: Unable to retrieve type Microsoft.Ccf.Csr.CtiHostedControl.CTIHostedApp, Microsoft.Ccf.Csr.CtiHostedControl.dll ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Ccf.Csr.CtiHostedControl.dll' or one of its dependencies. The system cannot find the file specified.
    File name: 'Microsoft.Ccf.Csr.CtiHostedControl.dll'
       at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
       at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
       at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.Load(String assemblyString)
       at Microsoft.Ccf.Common.TypeProvider.DefaultTypeProvider.Microsoft.Ccf.Common.TypeProvider.ITypeLoader.GetAssembly(String assemblyName)
       at Microsoft.Ccf.Common.TypeProvider.DefaultTypeProvider.Microsoft.Ccf.Common.TypeProvider.ITypeLoader.GetType(String typeName)
       at Microsoft.Ccf.Common.TypeProvider.TypeProvider.GetTypeInfo(TypeNameInfo typeNameInfo)

    === Pre-bind state information ===
    LOG: User = XYZ
    LOG: DisplayName = Microsoft.Ccf.Csr.CtiHostedControl.dll
     (Partial)
    LOG: Appbase = file:///C:/XXX/
    LOG: Initial PrivatePath = NULL
    Calling assembly : Microsoft.Ccf.Common.TypeProvider, Version=4.0.0.0, Culture=neutral, PublicKeyToken=4f00c1aa5320a4d9.
    ===
    LOG: This bind starts in default load context.
    LOG: Using application configuration file: C:\XXX\AgentDesktop.exe.Config
    LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
    LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
    LOG: Attempting download of new URL file:///C:/XXX/Microsoft.Ccf.Csr.CtiHostedControl.dll.DLL.
    LOG: Attempting download of new URL file:///C:/XXX/Microsoft.Ccf.Csr.CtiHostedControl.dll/Microsoft.Ccf.Csr.CtiHostedControl.dll.DLL.
    LOG: Attempting download of new URL file:///C:/XXX/Microsoft.Ccf.Csr.CtiHostedControl.dll.EXE.
    LOG: Attempting download of new URL file:///C:/XXX/Microsoft.Ccf.Csr.CtiHostedControl.dll/Microsoft.Ccf.Csr.CtiHostedControl.dll.EXE.

       --- End of inner exception stack trace ---
       at Microsoft.Ccf.Common.TypeProvider.TypeProvider.GetTypeInfo(TypeNameInfo typeNameInfo)
       at Microsoft.Ccf.Common.TypeProvider.TypeProvider.GetTypeInfo(String typeName, Object typeContext)
       at Microsoft.Ccf.Common.TypeProvider.TypeProvider.GetTypeInfo(String typeName)
       at Microsoft.Ccf.Csr.HostedAppLauncher.CreateWinFormApplication(ApplicationRecord app, WorkItem workItem)
       at Microsoft.Ccf.Csr.HostedAppLauncher.CreateApplication(ApplicationRecord app, WorkItem workItem)
       at Microsoft.Ccf.Csr.HostedAppLauncher.LaunchNonIsolatedHostedApp(ApplicationRecord app, WorkItem workItem)
       at Microsoft.Ccf.Csr.HostedAppFactory.CreateApplication(ApplicationRecord appRecord, WorkItem workItem)


    I was able to run the CCF 2005 version on this machine without using the full path. I tried to do the same but for some odd reason it's not able to find the library within the application directory from where the 'AgentDesktop.exe' is running. I have to mention that this machine has both (2005 & 2009) versions of libraries although none of these versions are installed. The machine is used to launch the AgentDesktop only. Any knowledge on this would help.

    • Edited by SKSR Tuesday, August 11, 2009 9:02 PM
    Tuesday, August 11, 2009 9:01 PM

Answers

  • As odd as this is going to sound ( Im typing this on 4 hrs of sleep over the last 36..)  remove the .dll fro the name..

    so Instead of Microsoft.Ccf.Csr.CtiHostedControl.dll ... use Microsoft.Ccf.Csr.CtiHostedControl.

    Let me know it it works for you

    MattB-Msft
    • Marked as answer by SKSR Wednesday, August 12, 2009 1:17 PM
    • Unmarked as answer by SKSR Wednesday, August 12, 2009 1:37 PM
    • Marked as answer by SKSR Wednesday, August 12, 2009 10:53 PM
    Wednesday, August 12, 2009 7:35 AM
    Moderator

All replies

  • As odd as this is going to sound ( Im typing this on 4 hrs of sleep over the last 36..)  remove the .dll fro the name..

    so Instead of Microsoft.Ccf.Csr.CtiHostedControl.dll ... use Microsoft.Ccf.Csr.CtiHostedControl.

    Let me know it it works for you

    MattB-Msft
    • Marked as answer by SKSR Wednesday, August 12, 2009 1:17 PM
    • Unmarked as answer by SKSR Wednesday, August 12, 2009 1:37 PM
    • Marked as answer by SKSR Wednesday, August 12, 2009 10:53 PM
    Wednesday, August 12, 2009 7:35 AM
    Moderator
  • I am speechless, that works :-)

    Thank you very much for responding to me, given the state you were in.

    As crazy as this sounds, when I first came across this issue and looked at the pre-bind state information I thought of removing the Dll and testing it. But since the 2005 version was working fine without having full path and with the Dll included in it's URL, I started looking deep into the TypeProvider. It occurred to me several time to remove the Dll from the name and test, but I guess I needed someone to tell me that I am not crazy.

    Thank you once again, Matt

    Wednesday, August 12, 2009 10:53 PM
  • Hi,

    I am new to CCF.

    Currently. I am trying to replace the headphones that are used with Avaya-Genesys application. I am trying to use Jabra GN2000 headphone. I replaced the existing headphones and did required configuration changes in Avaya to point to new headphones, but it throws following exception when trying to run the application in which the Avaya is hosted: - "Hosted Application could not be created. Contact the CCF administrator".

    Can anyone please help me with issue?


    • Edited by Rahul_W Wednesday, February 1, 2012 11:35 AM
    Monday, January 30, 2012 2:02 PM