Windows服务使用隔离存储

Windows服务使用隔离存储,windows,service,storage,isolatedstorage,isolatedstoragefile,Windows,Service,Storage,Isolatedstorage,Isolatedstoragefile,我的windows服务似乎无法使用独立存储(很可能是因为我做错了什么)。 该服务正在本地系统下运行。 每次我运行代码时,对隔离存储文件夹没有任何更改。 有人能告诉我为什么会这样吗。 我已经在Windows7和Windows8.1上试过了 IsolatedStorageFileStream configFile = new IsolatedStorageFileStream("UIsolate.cfg", FileMode.Create); // create a wri

我的windows服务似乎无法使用独立存储(很可能是因为我做错了什么)。 该服务正在本地系统下运行。 每次我运行代码时,对隔离存储文件夹没有任何更改。 有人能告诉我为什么会这样吗。 我已经在Windows7和Windows8.1上试过了

IsolatedStorageFileStream configFile = new IsolatedStorageFileStream("UIsolate.cfg", FileMode.Create);

            // create a writer to write to the stream
            StreamWriter writer = new StreamWriter(configFile);

            // write some data to the config. file

            writer.WriteLine("test");

            // flush the buffer and clean up
            sr.Close();
            writer.Close();
            configFile.Close();

在服务中使用隔离存储有什么实际意义吗?它已经运行了很多特权,允许它在任何地方进行写操作,并且已经很难在不隐藏文件的情况下进行诊断。您肯定是在错误的目录中查找文件,系统帐户使用的配置文件很难找到。c:\windows\system32\config\systemprofile我想。是的,我必须这样做,因为这是一项重要的任务,我被告知道威尔,我们没有告诉你这样做。这个网站最适合那些被允许做正确事情的程序员,没有人需要将错误行为合法化。所以不是论坛。我知道你没有。这是大学任务的一部分。我不必让服务在本地系统下运行。如果有人告诉我该怎么做,我可以改变。