Hi,
I am having no luck with this issue and cant find any help anywhere! Its such an annoying error...
I have a program that when executed, creates an instance of itself and then runs a method (that has been written in its base class). This works fine, and looks like this;
public static void Main(string[] args) {
ObjectOne myObject = new ObjectOne();
myObject.performUpdate();
}
I have a windows service that wakes up at a certain point, and calls a webmethod located on a web service. This method calls a static method in another class which does the exact same thing as the program above. It looks like this;
public static void update() {
ObectTwo myObject = new ObjectTwo();
myObject.performUpdate();
}
Both of these classes run the 'performUpdate()' method, which is located in their shared abstract base class. The first one (the exe) runs fine. The second one which is initiated by the webmethod fails with an "Object reference not set to an instance of an object". I have narrowed it down to the problem. When the 'performUpdate()' method is called.... amongst other things, it creates a web-reference - and begins calling other webmethods. It is the instansiation of this web-reference that is failing. The exact same code used by the other derived class works fine, but when it is accessed by a class that was created by the webmethod, it fails. I enabled my exceptions to break on anything, and reran it. The detailed error is rather large and is posted below. ANY help with this would be awesome...
TBS.US.ServiceAgents.USWebService.XmlSerializers' failed to load in the 'LoadFrom' binding context of the AppDomain with ID 76. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'TBS.US.ServiceAgents.USWebService.XmlSerializers, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'TBS.US.ServiceAgents.USWebService.XmlSerializers, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
followed by a load of ; (where TBS.US.ServiceAgents.USWebService is my webservice....)
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/tbs.us.updateserver.webservice/1844467a/7fae2d21/TBS.US.ServiceAgents.USWebService.XmlSerializers.DLL.