Wednesday, 28 October 2015

How to Encrypt a connection string (ASP.NET)

1. Navigate to the path below; Ensure that you have .Net framework 4 installed. 
  • C:\Windows\Microsoft.NET\Framework\v4.0.30319
2. Run this command

aspnet_regiis.exe -pef connectionStrings "path containing config file" -prov "RsaProtectedConfigurationProvider"

For example
aspnet_regiis.exe -pef connectionStrings "C:\inetpub\wwwroot\FinPay00 " -prov "RsaProtectedConfigurationProvider"

Monday, 5 October 2015

How to solve Error 5 (Access is denied.) while restoring SQL Server 2008 Database.

Today I experienced a scenario where I was trying to restore a SQL Server 2008 Database and I was getting the error below.Apparently it was because of permissions.

Restore failed for Server 'localhost\sqlexpress'.  (Microsoft.SqlServer.Express.Smo)
Additional information:
System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'c:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\[my database name].mdf'. (Microsoft.SqlServer.Express.Smo)

How I solved it
I solved it by running sql management studio as administrator and I was able to restore the database successfully.Hope this saves some one's day because I spent 2 days trying to resolve this.

Ugandan Telecoms: Were you ready for this Simcard Re-registration Ocassion!!!!

There was a recent directive from Uganda communications commission calling upon Ugandans to re-register their simcards this time using thei...