1

I am trying to host an application on IIS 7.0, this application is using a third party dll EFTidynet.dll for removing unwanted html code in the application. when i am running this application using Visual Studio 2010, its working fine, but when i hosted this application on IIS 7.0 its giving the error of Could not load file or assembly 'EfTidyNet' or one of its dependencies.

I have already added the name in the assemblies section on web.config but still no success.

Can anybody help me out.

Chandra
  • 94
  • 1
  • 9

2 Answers2

0

EfTidyNet (on codeproject.com) seems to contain only one DLL. The directions say that it needs to be registered in the GAC.

I usually create a folder in my c:\inetpub\ folder named "Bin" or "DLL" or "GAC". It makes it much easier to find registered files (that I'm using for IIS). Microsoft has plenty of good instructions on GACing a file. http://msdn.microsoft.com/en-us/library/dkkx7f79(v=vs.110).aspx

tgolisch
  • 6,549
  • 3
  • 24
  • 42
  • helo tgolisch I got zero success. – Chandra Aug 20 '14 at 12:00
  • I would like to help you but you really haven't given me much information. I don't know what you have done or what symptoms you are seeing. Has anything changed? How do you know? Have you tried anything to isolate the problem? – tgolisch Aug 20 '14 at 19:22
  • Yes, I have tried to register the assembly in GAC but I was not able to register it in GAC, because it requires the Strong name for assembly. I tried to Sign the Assembly but its not being sign. I have tried many tools for the same. In my Scenario I have hosted my application in IIS7.0. and I have used the Eftidynet for cleaning up the bad html. when I tried to access the site by iis its gives me error of EFtidynet dll could not be load and not able to load its dependency. – Chandra Aug 21 '14 at 04:56
  • It sounds like you have isolated your problem: you cannot GAC the assembly because it is not signed. Maybe you could search S/O for instructions about signing an assembly. Keep trying until you succeed. Then you can GAC your dll and it will all work. – tgolisch Aug 21 '14 at 14:05
0

On my development machine, I was having the same error message, followed by:

An attempt was made to load a program with an incorrect format.

Apparently, EfTidyNet is a 32-bit DLL, which didn't work too well on my 64-bit version of Windows 8.

The error disappeared after I enabled 32-bit applications in the advanced settings of the application pool of the web site, as explained here: Could not load file or assembly exception

Community
  • 1
  • 1
Ruud Helderman
  • 10,563
  • 1
  • 26
  • 45