cancel
Showing results for 
Search instead for 
Did you mean: 

cannot create instance of sapclient

Former Member
0 Kudos

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?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

[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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

reiner_hille-doering
Active Contributor
0 Kudos

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.