You need to sign in to do that
Don't have an account?
random dll error
Hi,
After a couple of days with this error I am kinda desperate. This is what I'm trying to do:
I created a dll in visual basic .net which uses the sforce API 5.0. (The goal is to use this (COM) dll in PHP scripts)
My dll works fine on my windows xp professional machine. When I try the dll on our webserver (windows 2003) I get the following error when I call a method that uses the API:
Warning (null)(): Invoke() failed: Exception occurred. Source mscorlib Description File or assembly name mn3h4itd.dll, or one of its dependencies, was not found
The name of the dll in the error message is different every time the script is loaded. If I don't use the API in my dll it works fine on Windows Server 2003 too, so it is definitely an sforce API related issue.
At first I also had this problem on my XP machine too, but after giving the internet guest account user rights to the windows\temp folder it was fixed. There's a lot of websites mentioning that giving rights to the temp folder is the solution for this problem, but this does not help on windows server 2003.
Any ideas?
Thanks in advance.
Tom Asselman
Hi Tom,
What web server are you running on the 2003 machine?
Hi,
We are using IIS 6.
Thanks in advance
Hi Tom,
Well, sorry it took so long to get back. I have never used php, but, I installed PHP 5 on my windows 2003 server, compiled a .net com object to do a login and describe, then called the following code in a php file:
<?php
/* TODO: Add code here */
$obj = new COM("ComDLL.MainClass");
$val = $obj->HelloWorld();
echo ($val);
$val2 = $obj->LoginResults();
echo ("<BR><BR>");
echo ($val2);
echo ("<BR><BR>Describe Global<BR>");
$val3 = $obj->Describe();
echo ($val3);
?>
The HelloWorld just echos hello world, the LoginResuls returns a session id and the Describe returns the describe global results.
No errors. ??????
Hi Dave,
First of all thank you for your help !
We are running PHP 4.3.4 on our server but I also gave it a try in PHP5, but i get the same error. This is the error I get:
System.IO.FileNotFoundException: File or assembly name eaed0w5w.dll, or one of its dependencies, was not found.
File name: "eaed0w5w.dll"
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence assemblySecurity)
at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings)
at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings)
at System.Web.Services.Protocols.SoapClientType..ctor(Type type)
at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
at SalesForceTester.SforceService..ctor()
at SalesForceTester.sforceuser.returnstring()
=== Pre-bind state information ===
LOG: Where-ref bind. Location = C:\WINNT\TEMP\eaed0w5w.dll
LOG: Appbase = C:\PHP5\
LOG: Initial PrivatePath = NULL
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/eaed0w5w.dll.
In detail; I created my COM as follows:
This works fine on my XP Pro machine and a Windows 2000 Server. When I install it on our live 2003 server, I get the error message about the temporary dll. This seems like a know issue when you google for it and in most cases giving your IUSR rights on the winnt\temp folder should do it. Not in my case...
I get the error as soon as my I call a method in my COM DLL which initiates an SforceService. In other words, as soon as the SforceService constructor is called I get the error. I am really getting desperate ...
Maybe you can send me your VB.net project and give me some detail on how you registered it as COM etc. I'll then do exactly the same on our environment and hope that it will work overhere too.
Thanks in advance !
Hi Tom,
You don't have to do all the gacutil stuff (at least not for initial testing purposes).
In the properties of your vb project, you need to simply set a Configuration Property in the Build section. This is a checkbox to Register for COM Interop.
I basically followed the same steps as you, with the exception of the regasm and gacutil. One big difference, I developed the dll on the same machine as I tested it on. I mention this as Visual Studio may be doing the regasm and gacutil for me. I doubt the gacutil is required though. I do few enough actual deployments that the gac is pretty much still wizardry for me.
Attached is the project (c#) that I used to test. Rename the extension from zp to zip once downloaded.
Cheers
Dave,
Thank you so much for your project source code. But I have the same problem with it. The DLL works great on my XP machine, once I try it on our 2003 server I get the same "File or assembly name w4gdseyl.dll, or one of its dependencies, was not found" error.
Tom
Hi Simon
The accounts you are mentioning , all have write access to that directory (C:\winnt\temp), I even went so far I gave everyone full control (for testing ofcourse), but still I keep getting that error on 2003.
Tom
For everyone interested in this dll issue. I ended up logging a case at microsoft. After a week of investigation by the support tech the problem was fixed giving the internet guest account rights to cvtres.exe, cvtres.exe.config, csc.exe and csc.exe.config in the .net framework folder.
Tom
Tom,
Thanks for the update!