Hey
I posted this on the asp.net forum, and they suggested to put it here. Sorry for the formatting.
I really hope you can help me!
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/e3bcbf6f-c51a-4c53-89f2-8e083c5e8981
I have been searching many sites and forums. I am developing on the same set of dlls as this post:
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/d5a92d8e-1c11-44af-b635-4f89471a3351
The issue I have is that these are the new c++ dlls from the same source. There is one main dll (agproxy.dll), and 3 dependency dlls: utility.dll, sockets.dll, async.dll.
When natively consuming the dlls in an application it works 100%. When I use the run debug on a web service in VS2008 (.NET 2.0) it works. (dlls get encapsulated in the wonderful MS exe that holds the debug env.)
BUT as soon as I publish to IIS... fails.
Unable to load DLL 'agproxy.dll': A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)
Here is some information...
We use an unsafe class, and pass some values by ref in the following manner:
[WebMethod]
public string OpenUsingLocal()
{
int blah;
// This method will create a new transaction.
try
{
ft2_open_transaction(0, &blah, 2);
}
catch (Exception ex)
{
return ex.Message;
}
return "Success";
}
[DllImport("agproxy.dll")]
public static extern int ft2_open_transaction(int invoicehandlex, int* transactionhandle, int timeout);
I have also tried manually setting permission on the folder and dlls to full access for all IIS users and the Everyone account to just see if it works.
Any help would be appreciated!
I have a log from process monitor here. As you can see the search pattern and how it loads the files... I have only pasted from the IIS process w3wp.exe.
w3wp.exe QueryOpen C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\nomadtest\e0b02f7d\7d2f67bb\assembly\dl3\5dcabd59\1c759893_4943ca01\agproxy.dll NAME NOT FOUND
w3wp.exe QueryOpen C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\nomadtest\e0b02f7d\7d2f67bb\assembly\dl3\5dcabd59\1c759893_4943ca01\agproxy.dll NAME NOT FOUND
w3wp.exe QueryOpen C:\WINDOWS\system32\inetsrv\agproxy.dll SUCCESS CreationTime: 10/5/2009 2:58:35 PM, LastAccessTime: 10/5/2009 5:06:33 PM, LastWriteTime: 8/26/2008 6:32:40 AM, ChangeTime: 10/5/2009 3:30:23 PM, AllocationSize: 155,648, EndOfFile: 155,648, FileAttributes: A
w3wp.exe CreateFile C:\WINDOWS\system32\inetsrv\agproxy.dll SUCCESS Desired Access: Read Data/List Directory, Execute/Traverse, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
w3wp.exe CreateFileMapping C:\WINDOWS\system32\inetsrv\agproxy.dll SUCCESS SyncType: SyncTypeCreateSection, PageProtection: PAGE_EXECUTE
w3wp.exe QueryStandardInformationFile C:\WINDOWS\system32\inetsrv\agproxy.dll SUCCESS AllocationSize: 155,648, EndOfFile: 155,648, NumberOfLinks: 1, DeletePending: False, Directory: False
w3wp.exe CreateFileMapping C:\WINDOWS\system32\inetsrv\agproxy.dll SUCCESS SyncType: SyncTypeOther
w3wp.exe CreateFileMapping C:\WINDOWS\system32\inetsrv\agproxy.dll SUCCESS SyncType: SyncTypeOther
w3wp.exe CloseFile C:\WINDOWS\system32\inetsrv\agproxy.dll SUCCESS
w3wp.exe Load Image C:\WINDOWS\system32\inetsrv\agproxy.dll SUCCESS Image Base: 0x10950000, Image Size: 0x28000
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\agproxy.dll SUCCESS Offset: 147,456, Length: 8,192, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\agproxy.dll SUCCESS Offset: 4,096, Length: 32,768, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\agproxy.dll SUCCESS Offset: 36,864, Length: 32,768, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\agproxy.dll SUCCESS Offset: 69,632, Length: 32,768, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\agproxy.dll SUCCESS Offset: 102,400, Length: 12,288, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\agproxy.dll SUCCESS Offset: 114,688, Length: 16,384, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\agproxy.dll SUCCESS Offset: 131,072, Length: 8,192, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\agproxy.dll SUCCESS Offset: 139,264, Length: 8,192, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe QueryOpen C:\WINDOWS\system32\inetsrv\utility.dll SUCCESS CreationTime: 10/2/2009 11:25:05 AM, LastAccessTime: 10/5/2009 5:06:33 PM, LastWriteTime: 8/26/2008 6:32:34 AM, ChangeTime: 10/5/2009 3:30:23 PM, AllocationSize: 176,128, EndOfFile: 176,128, FileAttributes: A
w3wp.exe CreateFile C:\WINDOWS\system32\inetsrv\utility.dll SUCCESS Desired Access: Read Data/List Directory, Execute/Traverse, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
w3wp.exe CreateFileMapping C:\WINDOWS\system32\inetsrv\utility.dll SUCCESS SyncType: SyncTypeCreateSection, PageProtection: PAGE_EXECUTE
w3wp.exe QueryStandardInformationFile C:\WINDOWS\system32\inetsrv\utility.dll SUCCESS AllocationSize: 176,128, EndOfFile: 176,128, NumberOfLinks: 1, DeletePending: False, Directory: False
w3wp.exe CreateFileMapping C:\WINDOWS\system32\inetsrv\utility.dll SUCCESS SyncType: SyncTypeOther
w3wp.exe CreateFileMapping C:\WINDOWS\system32\inetsrv\utility.dll SUCCESS SyncType: SyncTypeOther
w3wp.exe CloseFile C:\WINDOWS\system32\inetsrv\utility.dll SUCCESS
w3wp.exe Load Image C:\WINDOWS\system32\inetsrv\utility.dll SUCCESS Image Base: 0x10eb0000, Image Size: 0x2d000
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\utility.dll SUCCESS Offset: 163,840, Length: 12,288, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\utility.dll SUCCESS Offset: 4,096, Length: 32,768, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\utility.dll SUCCESS Offset: 36,864, Length: 32,768, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\utility.dll SUCCESS Offset: 69,632, Length: 32,768, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\utility.dll SUCCESS Offset: 102,400, Length: 16,384, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\utility.dll SUCCESS Offset: 118,784, Length: 8,192, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\utility.dll SUCCESS Offset: 126,976, Length: 16,384, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\utility.dll SUCCESS Offset: 143,360, Length: 12,288, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\utility.dll SUCCESS Offset: 155,648, Length: 8,192, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe QueryOpen C:\WINDOWS\system32\inetsrv\async.dll SUCCESS CreationTime: 10/2/2009 11:25:05 AM, LastAccessTime: 10/5/2009 5:06:33 PM, LastWriteTime: 8/26/2008 6:32:40 AM, ChangeTime: 10/5/2009 3:30:23 PM, AllocationSize: 90,112, EndOfFile: 90,112, FileAttributes: A
w3wp.exe CreateFile C:\WINDOWS\system32\inetsrv\async.dll SUCCESS Desired Access: Read Data/List Directory, Execute/Traverse, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
w3wp.exe CreateFileMapping C:\WINDOWS\system32\inetsrv\async.dll SUCCESS SyncType: SyncTypeCreateSection, PageProtection: PAGE_EXECUTE
w3wp.exe QueryStandardInformationFile C:\WINDOWS\system32\inetsrv\async.dll SUCCESS AllocationSize: 90,112, EndOfFile: 90,112, NumberOfLinks: 1, DeletePending: False, Directory: False
w3wp.exe CreateFileMapping C:\WINDOWS\system32\inetsrv\async.dll SUCCESS SyncType: SyncTypeOther
w3wp.exe CreateFileMapping C:\WINDOWS\system32\inetsrv\async.dll SUCCESS SyncType: SyncTypeOther
w3wp.exe CloseFile C:\WINDOWS\system32\inetsrv\async.dll SUCCESS
w3wp.exe Load Image C:\WINDOWS\system32\inetsrv\async.dll SUCCESS Image Base: 0x2460000, Image Size: 0x17000
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\async.dll SUCCESS Offset: 81,920, Length: 8,192, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\async.dll SUCCESS Offset: 4,096, Length: 32,768, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\async.dll SUCCESS Offset: 36,864, Length: 12,288, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\async.dll SUCCESS Offset: 49,152, Length: 8,192, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\async.dll SUCCESS Offset: 57,344, Length: 16,384, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\async.dll SUCCESS Offset: 73,728, Length: 8,192, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe QueryOpen C:\WINDOWS\system32\inetsrv\sockets.dll SUCCESS CreationTime: 10/2/2009 11:25:05 AM, LastAccessTime: 10/5/2009 5:06:33 PM, LastWriteTime: 8/26/2008 6:32:40 AM, ChangeTime: 10/5/2009 3:30:23 PM, AllocationSize: 86,016, EndOfFile: 86,016, FileAttributes: A
w3wp.exe CreateFile C:\WINDOWS\system32\inetsrv\sockets.dll SUCCESS Desired Access: Read Data/List Directory, Execute/Traverse, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
w3wp.exe CreateFileMapping C:\WINDOWS\system32\inetsrv\sockets.dll SUCCESS SyncType: SyncTypeCreateSection, PageProtection: PAGE_EXECUTE
w3wp.exe QueryStandardInformationFile C:\WINDOWS\system32\inetsrv\sockets.dll SUCCESS AllocationSize: 86,016, EndOfFile: 86,016, NumberOfLinks: 1, DeletePending: False, Directory: False
w3wp.exe CreateFileMapping C:\WINDOWS\system32\inetsrv\sockets.dll SUCCESS SyncType: SyncTypeOther
w3wp.exe CreateFileMapping C:\WINDOWS\system32\inetsrv\sockets.dll SUCCESS SyncType: SyncTypeOther
w3wp.exe CloseFile C:\WINDOWS\system32\inetsrv\sockets.dll SUCCESS
w3wp.exe Load Image C:\WINDOWS\system32\inetsrv\sockets.dll SUCCESS Image Base: 0x10ff0000, Image Size: 0x16000
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\sockets.dll SUCCESS Offset: 77,824, Length: 8,192, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\sockets.dll SUCCESS Offset: 4,096, Length: 32,768, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\sockets.dll SUCCESS Offset: 36,864, Length: 8,192, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\sockets.dll SUCCESS Offset: 45,056, Length: 8,192, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\sockets.dll SUCCESS Offset: 53,248, Length: 16,384, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
w3wp.exe ReadFile C:\WINDOWS\system32\inetsrv\sockets.dll SUCCESS Offset: 69,632, Length: 8,192, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O