shantanu

shantanu

  • NA
  • 6
  • 0

problem in axwebbrowser.navigate

Dec 14 2006 10:51 AM
Hi , I am using VS .NET 2003 on XP SP2. when I am using the axwebbrowser.navigate() in my code, its actually locking the file which I supply to it as URL. I am pasting the code below: ################################################################################### public string Xml { set { StreamWriter writer; object missing = System.Reflection.Missing.Value; missing = null; _fileName="C:\\XMLFiles\\"+Guid.NewGuid() + ".xml"; using (writer = new StreamWriter(_fileName, false)) { writer.Write(value); } _ctrlWeb.Navigate( _fileName, ref missing, ref missing, ref missing, ref missing ); if (_previousFileName.Length > 0) { File.Delete(_previousFileName); } _previousFileName=_fileName; } } ################################################################################### I think that most probably the navigate function is not going to the new url & hence locking the older URL, hence I am getting an exception of "File already in Use by another process" in the delete function. I really do not know how to rectify this. Would really appreciate any inputs in resolving this.

Answers (2)