Posts

Showing posts with the label windows

Exception from HRESULT: 0x80131040

Image
Background: I just recently upgraded to Windows 10, and I must confess, the overall experience immediately got me. I love the fact that our good old start menu was back and better. The tile one was much of a controversy although I have been indifferent about it all the while. I particularly love Cortana, the search assistant who made me remember the office assistants that used to come with the office suite back then. The euphoria I experience was a perfect disguise, however, for the ambush that was ahead. Issue: I went ahead to open VisualStudio and launched the project I was currently working on. I pressed F5 to launch it, only to ram into a jam! The project I still successfully tested only a day before now threw an exception. From my experience, and this situation hasn't proved me wrong, every Microsoft upgrade always has a catch somewhere. This particular one forced me to begin to rectify a fault in an application that was initially 'bug-free' before my u...

Retrieve Source Code from Compiled .NET Program

Image
Background I found myself in this mess. I wrote a lovely windows service to handle data replication between two SQL Servers. I know this isn't the best way to go about it, but the requirement came in late into the project and the database design wasn't going to support automatic replication provided by SQL Server, so I had to develop this windows service. Unfortunately, I lost the source code and backup in a robbery incident and I'm left with just the compiled version deployed with a client. Issue A bug showed up which needed to be fixed, but I didn't have the source anymore. I would have had to go through the stress of re-writing the entire code which took about a month to complete initially if I didn't run into this solution. I'm feeling great right now! Solution It happens that there are a couple of projects targeted at de-compiling .NET codes. I found two: 1 .NET Reflector 2. Just Decompile I tried the .NET reflector and it worked like m...

Enabling Write Access to A folder in IIS

Image
Issue Sometimes in web development, we may want to grant WRITE access to a folder probably for file upload purposes or mostly in my own case, PDF file generation purposes. The challenge however, is that all folders are read only which means your application will always throw errors whenever you attempt a write operation. Solution Locate the folder in windows explorer Right click on the folder and select properties In the securities tab, click edit, then click add in the new dialog box that shows up Type IIS AppPool\ApplicationPoolName (you need to replace ApplicationPoolName with the name of the application pool in IIS that your web app is running under) Click Check Names to resolve the name, then click Ok  Under permissions for ..., check Modify under allow.  Click Ok on all dialog boxes Note Some people will grant Modify or Full Control right to Everyone for the folder, note that this posses a huge security risk and should never be your approach to r...