Tuesday 3 July 2012

Access 2000 web page showing HTTP 500 internal server error

We had to move our web server to a new Windows 2008 R2 server.

Everything copied over ok using Web Deploy to copy over IIS settings.

We had a problem with a website that had an Access 2000 backend database.

  • Connection issues
  • HTTP 500 internal server errror

 

Connection issues

Firstly it wouldn't connect at all. We found that this was due to the Win 2008 not having the correct Jet drivers. (It has changed to ACE).

HTTP 500 internal server errror

The next issue was that some pages were showing Server 500 errors when users clicked on them. It looked to be when users were trying to modify the database. In one case the issue was due to the database file becoming read only when it was moved to the new server. and in the other case it was because the lock file (.ldb) file had been copied over with the main database file. Once the lock file was deleted it all started to work as it should.

Hope this saves people some time

Sunday 3 June 2012

Plain text email not wrapping correctly

It has been a while!

Now that summer have finally arrived in the UK I thought I should come out of my blogging hibernation.

Here is an interesting one to start with.

At work i have been developing a system that requires a log to be emailed to users. For this particular application I was developing in Delphi but the same problem seems to occur with many other languages.

The problem was that any emails that were sent from my system were stripped of there line breaks. At first I thought that the issue was in Delphi. After a bit of debugging I found that delphi was send the information correctly as separate lines. Even the outlook notification was displaying the line breaks correctly. However when the full email was opened all text appeared on one continious line.

After a frustrating few hours I found a stackoverflow post.

Some of the solutions suggested were:
  • Convert the email to HTML format so that '
    ' breaks can be inserted when required.
  • Add extra \r\n at the end of each line
  • Add %0D%0A at the end of each line
  • Add a (.) dot at the end of each line.
  • Re instated line breaks in Outlook by going into Format -> Unwrap text when viewing the email.
I decieded to go for the dot solution and it worked fine.

Hope this helps someone.