Skip to Content
avatar image
Former Member

cannot create instance of sapclient

when I try to create an instance of the sapclient in my SAPProxy1 class my webapplication crashes with this error message:

"Datei- oder Assemblyname '.dll' oder eine Abhänigkeit davon wurde nicht gefunden."

Someone who got an idea?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Sep 09, 2004 at 10:15 AM

    Sounds as SAP.Connector.dll (and SAP.Connector.Rfc.dll for 2.0) is not present in GAC or is not copied to the Bin-folder of the project. In 1.x version the assemblies are NOT installed to GAC, thus the "Copy flag" must be turned on. In 2.0 the assemblies are installed to GAC, thus the flag is usually off.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 09, 2004 at 11:05 AM

    sorry, but that's not the problem. the SAP.connector.dll ist present in the bin folder of my project. it is not present in the GAC, but that should be no problem

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I´ve had the same problem after deploying my application.

      Just check, as Reiner Hille-Doering wrote, if you set the properties of SAP.Connector "Lokale Kopie" -> "True" (German VS2003). Only then the copy of SAP.connector.dll in your bin folder is used. Otherwise GAC is used.

      Gerhard Rausch

  • avatar image
    Former Member
    Sep 09, 2004 at 11:48 AM

    i already had these settings, but it still doesn't work

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 09, 2004 at 12:20 PM

    [WebServiceBinding(Name="", Namespace="urn:sap-com:document:sap:rfc:functions")]

    public class SAPProxy1 : SAPClient

    {

    // Constructors

    --->public SAPProxy1(){}

    public SAPProxy1(string ConnectionString) : base(ConnectionString){}

    that's the point where the webapp crashes....

    in my browserwindow I receive among other things theese informations where 0z1tvv_5 differs every time I run my project:

    === Pre-bind state information ===

    LOG: Where-ref bind. Location = C:\WINNT\TEMP\0z1tvv_5.dll

    LOG: Appbase = file:///c:/inetpub/wwwroot/SAPConnect

    LOG: Initial PrivatePath = bin

    Calling assembly : (Unknown).

    ===

    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:/WINNT/TEMP/0z1tvv_5.dll.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I just figured it out: The process did not have any write-permissions in c:\winnt\temp though it could not create the temporarely DLLs