.Net user.config路径哈希 [英] .Net user.config path Hash
问题描述
大家好!
我有一个很大的问题.必须在Citrix Seamless系统上运行应用程序(但每个漫游基础结构都存在问题).
该应用程序独立安装在许多服务器上.每个用户都从那些服务器云"中获得一个随机服务器.在已安装的应用程序中,.NetFramework-Settings-Objects用于LocalUserConfigurations.
因此,由于在每台服务器上的"user.config-Folder-Hash"都不相同,因此每个用户都会松开其用户配置,尽管事实是我们将设置保存在LogOff上并写回,因为新的关闭应用程序后,为新的随机服务器创建哈希文件夹".该配置位于最后一个服务器的文件夹中.
因此,我想到了在开始之前计算此SHA1-Hash(如果哈希实际上是SHA1),然后将备份的设置复制到此文件夹中的方法.
但是我找不到,尽管有* .exe路径,但哈希是由什么组成的.
有人知道如何计算此哈希值吗?
任何answears将是一个很大的帮助.
还是有人有其他想法可以解决此问题???使用自定义的SettingsProvider更改应用程序在接下来的几个月中不是解决方案,但是我现在需要一个解决方案...
提前感谢
Hello Everyone!
I have a really big problem. An Application has to be run on a Citrix Seamless system (but Problem exists on every roaming infrastructure).
The Application is installed on many Servers independently. Every user gets a random Server from those "server-cloud". In the installed Application the .NetFramework-Settings-Objects are used, for LocalUserConfigurations.
So, because on each of the servers the ''user.config-Folder-Hash'' is different, every user looses his User-Configurations, despite the fact, that we save the Settings on LogOff and write them back, because the new "Hash-Folder", for the new random server, is created after closing the Application, & the config is in the Folder for the last Server.
So i had the idea to calculate this SHA1-Hash (if the Hash is really SHA1) before the start and copy the backuped settings into this folder as a workaround.
But i could not found, of what, despite the *.exe Path, the Hash is made of.
Does anyone know, how to calculate this Hash???
Any answears would be a REALLY BIG help.
Or does someone have any other idea to resolve this problem??? Changing the App with a self written SettingsProvider is not a solution for the next months, but i need a solution for now...
Thanx in advance
推荐答案
尝试阅读此链接 ^ ].
通常,用户设置位于<配置文件目录> \<公司名称> \<应用程序名称> _<证据类型> _<证据哈希> \<版本> \ user.config
<证据类型> <证据哈希>当您对应用程序进行数字签名和< Version>当您更改 AssemblyVersionAttribute 时,它会发生变化.
如果程序在漫游配置文件下运行,则必须指定本地"或漫游"下的设置",然后<配置文件目录>将会更改此设置.
更改 AssemblyVersionAttribute 时,可以将Properties.Settings.Value.Upgrade()函数调用为,然后将所有设置检索到新的user.config.
Try read this link Client Settings FAQ[^].
In general the user settings is located under <Profile Directory>\<Company Name>\<App Name>_<Evidence Type>_<Evidence Hash>\<Version>\user.config
<Evidence Type> and <Evidence Hash> will change when digital sign your application and <Version> will change when you change AssemblyVersionAttribute.
If the program runs under a roaming profile, you have to specify which Settings is under Local or Roaming and <Profile Directory> will change for this settings.
When you change the AssemblyVersionAttribute you can call Properties.Settings.Value.Upgrade() function to and you then retrieve all settings to the new user.config.
您好!
谢谢你的帮忙.我的问题是,是否有可能在应用程序外部创建该哈希文件夹,然后再应用程序使用它(在更改或关闭该应用程序时,该文件夹将由.Net-Framework创建,并且正确文件夹不存在).
要创建此文件夹,我将不得不知道是否有可能,以及程序集的所有信息,以计算该文件夹的哈希->.创建文件夹,然后从其中的其他位置写入user.config.
这样,我可以克服漫游配置文件带来的citrix问题,每个用户都可以像在真正的漫游配置文件中一样使用他的个人设置".
谢谢,
问候,
克里斯
Hello!
Thank you for the answear. The Question for me is, if it is possible to create this Hash-Folder outside of the application, before the application uses it (the folder will be created by the .Net-Framework, when changing, or closing the Application, and the correct folder does not exist).
To create this folder I would have to know if its possible, with all the information of the assembly, to calculate the hash for the folder -> create the folder, and then write the user.config from elsewhere in it.
That way i could overcome the citrix problem with roaming profiles, and every user could use his ''personal settings'' like in a real roaming profile.
Thanks,
Greets,
Chris
这篇关于.Net user.config路径哈希的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!