Load resource stream that reside in a .dll loaded in a web service

G

Guest

Hi,

I have a dll with some resource files embeded. one of the functions of the dll, try to load one of the reources into a stream object.
i'm calling this dll from a web service app, and the load simply fails.
any idea why ? ( when i had the resource embeded in an exe file it worked fine )

example:
public void Dll_Func()
{
// the resource is called Order and it resides on the root of the tree
// in the solution explorer ( no suffix to the file name )
ResourceName = "MyDll.Order";
Assembly assembly = Assembly.GetEntryAssembly();
Stream resultStream = assembly.GetManifestResourceStream( ResourceName );

if ( resultStream == null )
throw new Exception( "Error " );
}


many thanks !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top