as follow are the steps to encrypt & decrypt web configuration. using aspnet_regiis.exe, which supports RSA encryption in webfarm scenario
1. Open command prompt
2. From command prompt, You must go to folder: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
3. Write this code to Encrypt : aspnet_regiis.exe -pef "appSettings" "C:\temp".
4. Write this code to Decrypt : aspnet_regiis.exe -pdf "appSettings" "C:\temp".
Note:
- '-pef' means to encrypt; '-pdf' means to decrypt
- 'appSettings' is the section that want to be encrypted
- that folder 'temp' in drive C is the physical location where the web configuration file should exist
5. whoaalaaa... there you go. it was encrypted or decrypted.
phfeww... i thought that it was encrypt/decrypted on other planet...
thanks to http://odetocode.com/blogs/scott/archive/2006/01/08/encrypting-custom-configuration-sections.aspx
Warning: This encrypt can only be decrypt in the same computer and cannot be share to other computer to decrypt.
if you want to share or use other computer to decrypt, you must use custom keys and the RSA provider, for more details klik here: http://msdn2.microsoft.com/en-us/library/68ze1hb2(en-US,VS.80).aspx
or http://www.c-sharpcorner.com/blogs/BlogDetail.aspx?BlogId=229
Best Regards,
Fedrik
18 January 2011
08 January 2011
Cannot open list of databases on remote sql2008. The server principal [db_user_name] is not able to access the database "index" under the current security context. (Microsoft SQL Server, Error: 916)
This actually happens on my sql2008 remote server on my web server hosting.
Suddenly i cannot open my database with error like this:
" The server principal [db_user_name] is not able to access the database "index" under the current security context. (Microsoft SQL Server, Error: 916) "
After a short searching & browsing on the net, i found something that help solved the problem (thanks to my.re-invent.com for their knowledgebased).
The cause of this error is because we try to access database that we do not own. This is caused by SQL 2008 Management Studio attempting to query certain system settings that we do not have access to.
Solving problem steps are:
1. Open SQL Management Studio 2008 on your local Computer
2. In the Object Explorer, click "Databases"
3. On Menu, select View | Object Explorer Details
4. Right click on the column headers
5. uncheck the following items:
That will fix the problem.
Suddenly i cannot open my database with error like this:
" The server principal [db_user_name] is not able to access the database "index" under the current security context. (Microsoft SQL Server, Error: 916) "
After a short searching & browsing on the net, i found something that help solved the problem (thanks to my.re-invent.com for their knowledgebased).
The cause of this error is because we try to access database that we do not own. This is caused by SQL 2008 Management Studio attempting to query certain system settings that we do not have access to.
Solving problem steps are:
1. Open SQL Management Studio 2008 on your local Computer
2. In the Object Explorer, click "Databases"
3. On Menu, select View | Object Explorer Details
4. Right click on the column headers
5. uncheck the following items:
-Size (MB)
-Database Space Used (KB)
-Index Space Used (KB)
-Space Available (KB)
-Default File Group
-Mail Host
-Collation
6. Right click on databases and select refreshThat will fix the problem.
Subscribe to:
Posts (Atom)