20 May 2014

Hafiz Adewuyi

ENCRYPT OR DECRYPT ‘hibernate-configuration’ section of an ASP.NET application configuration file

ENCRYPT

(1) Copy NHibernate.dll to the location of .NET framework

  • Open the location of the website on the file system, e.g. C:\inetpub\wwwroot\MyWebsite;
  • Open the bin folder (\bin);
  • From \bin, copy Nhibernate.dll to the location of Microsoft .NET framework. If you are using .NET framework 4.0, this location is likely to be: C:\Windows\Microsoft.NET\Framework\v4.0.30319;

Though, highly unlikely, if you happen not to find NHibernate.dll in your website /bin folder, you can get the dll from any other source.

This step is highly important. If skipped, command prompt will complain about not being able to find NHibernate.dll when you run the command. As a result, the encryption attempt will fail.

(2) Run command prompt (cmd.exe) as administrator

(3) Navigate to the location of Microsoft .NET framework using the command like so:

cd C:\Windows\Microsoft.NET\Framework\v4.0.30319

(4) Run the encryption command

Command: aspnet_regiis -pe "hibernate-configuration" -app "/WebsiteNameOnIIS"

Note that the highlighted section (WebsiteNameOnIIS) must be replaced with the name of the application as deployed on IIS. E.g. for an application deployed as MyWebsite on IIS, you will have:
aspnet_regiis -pe "hibernate-configuration" -app "/ MyWebsite"

You should get a Succeeded! message is the process was successful. If it fails, verify that the name of the application on IIS is correct and retry. Also, verify that you ran cmd.exe as administrator.

(5) Confirm encryption

Open the target configuration file and inspect hibernate-configuration section to confirm encryption.

DECRYPT

(1) Follow the same steps for encryption, except for step 4 where the command should be replaced with this:

Command: aspnet_regiis -pd "hibernate-configuration" -app "/WebsiteNameOnIIS"

* Note that the only change is that –pe is now –pd (e for encrypt, d for decrypt, I guess).



Read More

19 May 2014

Hafiz Adewuyi

Favourite words/phrases from mama's emotional 'address' on 'our' Chibok girls

  •  Prispal

  • WAYEC

  •  Continue

  • What of two teachers

  • Yuonly you waka come

  • Okay

  • Bloods

  • Shearing

  • Chaieh

  • Diaris Gooood oo
Read More

8 May 2014

Hafiz Adewuyi

TL; DR - Bad formatting intentional to dissuade you from reading

This note was written from beginning to end with the writer in an unbroken state of flow (akin to the state of timelessness you're in when playing your favourite video game).

From my perspective, the note below is a little too revealing and would most likely have gone to my anonymous blog :D. Unfortunately for me and luckily for your over-inquisitive biat*h ass, the way I feel this evening can be summed up in two simple words: "F*CK IT"! 

Read More