Skip to main content

Adobe Acrobat Activex Control issues with 64bit machines. Error "Class not registered HRESULT 0x80040154..."

I justed moved from a 32 bit laptop to a 64 bit laptop. The project we are working on uses Acrobat Reader activex control to show PDF documents. When I ran the project on my system from VS 2008 the application threw exception while trying to load the PDF viewer control. The error returned was
"Class not registered HRESULT 0x80040154..."
The issue turned out to be that the solution was compiled for "Any CPU"\x64 bit architecture. Once i changed the build configuration to x86 and recompiled the error was resolved. It intially seemed like the component was not installed correctly and i tried to reinstall Acrobat Reader multiple times before hitting the correct solution.

Happy Coding


Popular posts from this blog

Caching Images downloaded from web on Windows Phone Isolated storage

I was helping on a Windows Phone application where the requirement was to cache the images the phone downloads on the isolated storage for offline viewing.
I wanted a solution which was simple and as transparent as possible. While researching I found  someone wrote a Silverlight converter for loading images from isolated storage. Taking that as a base I created a converted which can
Load image from web (http + https), and persist it to isolated storage.In case of network connectivity issues can load the same image from isolated storage. It does that by mapping the http url to a isolated storage location.In case the network is down and the image is neither there in cache, loads a default image, passed as parameter to converter.Here is the gist for the implementation.

To use the converter
Import the name space.Declare the converter as resource.Set the Image Source Property to use this converter like this 

IIS Url Rewrite and HTTP POST data

If you play around with IIS Url Rewriting rules and try to do redirects on an HTTP POST you loose your POST data.

To make sure you get the post data you have to set the `redirectType` to `Temporary` within your rules. So the action configuration looks like this

<action redirectType="Temporary" type="Redirect" url="http://{HTTP_HOST}{REQUEST_URI}"> </action>
You may think what scenario warrant a POST request redirect. We faced one such scenario while doing SSO with a federated Identity Provider (IP)  such as Google, Azure AD. In federated authentication scenario once the user is authenticated by the IP, it redirects back to your site with claim tokens in a POST request over secure channel (https). In our case we wanted to redirect to user back http after receiving the request. But any redirects were causing loss of token. By doing a 307 (Temporary) redirect we were able to preserve the post data.