0

I'm having a problem with a third party C# class library:
The given .net dll requires additional files to be in the same directory than the .dll (config files etc.).

When I load the library as reference into asp.net project everything works smoothly until first call to the library. I get exceptions from the library saying that the required files are missing.

Now the question is where should I put those required files into? I've tried obj/debug/, bin/ and including the files in the project and selecting "Always copy to output directory", but none helped.

I guess it's something to do with IIS and its way of handling the reference/additional files?

Edit: It's working fine in Windows Forms application, but not in ASP.NET web application.

user2279356
  • 29
  • 1
  • 4
  • Could this be related to this post with similar potential root cause - http://stackoverflow.com/questions/25865430/alternative-to-filestream-in-c-sharp-net – Vikas Gupta Sep 16 '14 at 10:04

2 Answers2

0

For that you need to read the documentation. The method throwing the error should be expecting the file in some other folder other than bin, debug or obj.

mrsrizan
  • 301
  • 1
  • 8
0

You can view source code of external class library with iLSpy or Reflector to find how exactly additional files are referenced. It's can be an application execute path (so it must be IIS shadow copy directory) or GAC.

Ruslan Dayanov
  • 308
  • 3
  • 10