I created a WebService on the order of a WindowsUpdate type of functionality.
I call the following routine, and once I've done that, my Windows
Application stays around as a running process forever (or until I kill it
with task manager). This is very odd. The application does not appear to
hang, it seems to work perfectly. It even appears to exit, but looking in
task manager you can see that it stays in memory. There must be something I
have to do to properly dispose of my web service, but I'm not sure what it
is. Can anyone help? (Yes, I call the dispose method, but that doesn't
appear to do anything).
public string[] getVersions()
{
FileVersionInfo myFileVersionInfo;
string[] tempList;
string fileName;
string[] dirs = Directory.GetFiles("http:\\xxxxx\\modules");
tempList = new string[dirs.Length];
for(int x = 0; x < dirs.Length; x++)
{
myFileVersionInfo = FileVersionInfo.GetVersionInfo(dirs[x]);
fileName = dirs[x].Substring(dirs[x].LastIndexOf("\\")+1);
tempList[x] = fileName + "," +
myFileVersionInfo.FileMajorPart + "." +
myFileVersionInfo.FileMinorPart + " Build " +
myFileVersionInfo.FileBuildPart + "." +
myFileVersionInfo.FilePrivatePart;
}
return tempList;
}