Windows 7 计算机上安装的服务未从其配置文件中读取
我有一个 .Net 3.5 Web 服务,可以完美地安装在我的旧 XP 机器上。我最近得到了一个漂亮的新 Windows 7 盒子,一切都运行良好。昨天我记得我需要在我的新机器上安装此服务并尝试执行安装。
安装后我做了一个快速测试,它似乎工作正常。当天晚些时候,我进入配置文件并做了一些小更改。重新启动服务后,我沮丧地发现服务没有接受更改,并且它继续使用旧值。
有人可以解释这怎么可能吗?我在这里完全困惑了。
I have a .Net 3.5 web service that installs perfectly on my old XP box. I recently got a beautiful new Windows 7 box and everything has been working wonderfully. Yesterday I remembered that I need to instal this service on my new box and attempted to perform the install.
After the install I did a quick test and it seemed to be working correctly. Later in the day, I went into the config file and made a small change. After restarting the service I was dismayed to discover that the change was NOT being picked up by the service and it continued to use the old values.
Can someone explain how this is possible? I am totally befuddled here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您很可能是 Windows 向后兼容性(又名 UAC 数据重定向)。
当以非管理员身份运行的程序尝试写入位于 Program Files 中的配置文件时,Windows 会将写入重定向到另一个(用户本地)目录。这意味着,一个用户看似可以写入该文件,但另一个用户将看到原始的 Program Files 版本。
You've most likely been a "victim" of Windows Backward Compatibility (aka UAC Data Redirection).
When a program running as non-admin tries to write to config files located in Program Files, Windows redirects the write to another (user local) directory. That means, a user can seemingly write the file, but another user will see the original, Program Files, version.