System.IO.FileNotFoundException: File or assembly name <random>.dll, or one of its dependencies, was not found.

May 21 2004 3:21 PM
Trying out web services by following some examples. Here is my code: using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Web; using System.Web.Services; namespace StringProc { [WebService( Namespace="http://NetExam.org/StringProc")] public class Strings : System.Web.Services.WebService { public Strings() { InitializeComponent(); } private IContainer components = null; private void InitializeComponent() { } protected override void Dispose( bool disposing ) { if(disposing && components != null) { components.Dispose(); } base.Dispose(disposing); } #endregion [WebMethod()] public String ToUpper(String inputString) { return inputString.ToUpper(); } [WebMethod()] public String ToLower(String inputString) { return inputString.ToLower(); } } } Here is the error I get when I try to invoke one of the methods: System.IO.FileNotFoundException: File or assembly name uidr7lsj.dll, or one of its dependencies, was not found. File name: "uidr7lsj.dll" at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark) at System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence assemblySecurity) at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly() at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly() at System.Xml.Serialization.Compiler.Compile() at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings) at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings) at System.Web.Services.Protocols.XmlReturn.GetInitializers(LogicalMethodInfo[] methodInfos) at System.Web.Services.Protocols.XmlReturnWriter.GetInitializers(LogicalMethodInfo[] methodInfos) at System.Web.Services.Protocols.MimeFormatter.GetInitializers(Type type, LogicalMethodInfo[] methodInfos) at System.Web.Services.Protocols.HttpServerType..ctor(Type type) at System.Web.Services.Protocols.HttpServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response) at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) === Pre-bind state information === LOG: Where-ref bind. Location = C:\WINNT\TEMP\uidr7lsj.dll LOG: Appbase = file:///c:/inetpub/wwwroot/StringProc LOG: Initial PrivatePath = bin Calling assembly : (Unknown). === LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). LOG: Attempting download of new URL file:///C:/WINNT/TEMP/uidr7lsj.dll. Any help would be REALLY appreciated... I just copied the sample code I found and can't figure out what is wrong with the code. :( Thanks.

Answers (3)