具有漫游配置文件的应用程序/用户设置
大家好,任何帮助将不胜感激。
我们有一个应用程序安装在多个位置,但在一个特定站点上遇到了问题。简而言之,重新启动后不会保存应用程序设置(My.)。该应用程序是在 VB.Net v3.5 框架中构建的,我们在其他地方没有遇到任何问题。
该特定站点正在使用漫游配置文件,网络管理员确保我们将正确的权限应用于用户帐户,并将所有应用程序数据保存到服务器。我已要求网络管理员检查应用程序数据目录中是否存在用户设置文件 user.config,但他说它不存在。
在我们的应用程序中,我们将数据库的连接字符串存储在用户范围下的应用程序设置中。如果不存在连接字符串,或者存在连接字符串但无法建立与数据库的连接,则会显示一个表单,要求用户提供数据库凭据。每天早上,当用户第一次启动计算机并打开应用程序时,系统会要求他们提供这些凭据,但如果他们关闭应用程序并重新启动,则不会要求他们提供这些凭据。这向我们表明设置正在保存,但是一旦电脑重新启动并且应用程序第一次打开,就会要求他们提供数据库凭据。这似乎是重新启动后设置不会保留。
任何想法/反馈将不胜感激。
Hi Guys any help would be much appreciated.
We have an application that’s installed at several locations but we are having an issue at one particular site. In short the application settings (My.) are not being saved after a reboot. The application is build in VB.Net v3.5 Framework and we are not experiencing any issues elsewhere.
This particular site is using roaming profiles and the network administrator ensures us that the correct permissions are applied to the user account(s) and all application data is being saved to the server. I’ve asked the network admin to check for the existence of the user settings file user.config in the Application Data directory and he says it doesn’t exist.
In our application we store the connection string to the database in the application settings under the user scope. If no connection string is present or if one is present and a connection to the database cannot be made then a form is shown asking the user for the database credentials. Each morning when the users boot the machine and opens the application for the first time they are asked for these credentials but if they close the application and restart it they are not asked for them. This indicates to us that the settings are being saved but once the pc is rebooted and the application is opened for the first time they are asked for the database credentials. This seems like the settings are not persisting after a reboot.
Any thoughts/feedback would be much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想知道是否是代码访问安全性阻止了文件被写入?
如果问题站点的系统管理员已实施组策略文件夹重定向,用户的本地/漫游配置文件可能存储在网络文件共享上。代码访问安全性对于让代码从网络资源读取/写入非常挑剔。
很抱歉,我没有比这更多的详细信息,而且我在谷歌上没有找到任何可靠的结果,但搜索“代码访问安全性”,“完全信任” “以及您能想到的任何网络/文件共享关键字都可能让您走得更远。
I'm wondering if it's Code Access Security preventing the file from being written?
If the sysadmin at trouble site has implemented group policy folder redirection, the user's local/roaming profile could be getting stored on a network fileshare. Code Access Security is fairly picky about letting code read/write to/from network resources.
I'm sorry that I don't have more details than this, and I didn't find any sure-fire hits on google, but searching for "code access security", "fulltrust" and any network/fileshare keywords you can think of may get you farther.