Creating a "trusted" xml file in C#
I created an xml file in C#, but there is an annoying thing that when i open t开发者_Python百科he file there is a yellow message from windows on the top of the window that says its trying to protect me, and ask me if i trust this file. is there a way to create the file so the message won't show up?
You need to digitally sign the XML document if you want to get the trusted behavior out of it (i.e. no yellow warning bar). Below is how to do that (you'll need a digital certificate from a trusted root authority though, like Verisign).
- http://msdn.microsoft.com/en-us/library/ms229745.aspx
- http://www.west-wind.com/WebLog/posts/257599.aspx
Edit: If you don't have a signing certificate from Verising etc. you can use a workaround like this:
go into Internet Options > Advanced then down to the Security section, and tick the box for "Allow active content to run in files on My Computer*"
Here is the source: http://www.leonmeijer.nl/archive/2008/04/27/106.aspx
精彩评论