开发者

Encrypting a web.config file and supplying the path to the file

I am encrypying my .NET config file using this command and it works just fine:

aspnet_regiis -pe "connectionStrings" -app "/SampleApplication" 

For this to work though I have to have a virtual directory called SampleApplication pointing to the folder my web.config file is under.

Is there a way to just specify the path to the file and not have to have a virtual dir?

I tried with

aspnet_regiis -pe "connectionSt开发者_如何学Crings" -location "c:\FoldercontainingWebConfigFile"

but i get the error: " path attribute must be a relative virtual path". And cannot contain any of ":" "\" etc...

I am looking here: http://msdn.microsoft.com/en-us/library/k6h9cz8h%28v=vs.80%29.aspx

Is there any way to do this?


I got it with!

-pef "sectionName" "full path to directory containing web.config file"


Have a look at this tool - it loads all your IIS sites and vdirs, and lets you pick the file (and section) you want to encrypt/decrypt.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜