Friday, April 16, 2010

Classic ASP on IIS 7, PDF on Windows 7

Vijay Pais was back again on a drowsy afternoon with certain other issues
He was on his way of migrating our Corporate Intranet.

Migration
Destination Server : Windows Server 2003, IIS 6.0, Oracle Express
Source Server: Windows 7, IIS 7.0, Oracle Express.

Issue 1: Classic ASP website not running on IIS 7.0.

By default, IIS 7.0 runs on Integrated Mode. It has to be changed to Classic for Clasic ASP to Run. And few other steps.

Alex Thissan has already put it on his web log.


But issues didnt leave us, were hooked on another interesting thing,

Issue2: PDF files not opening up on Windows 7.

Though the IIS 7 running on Windows 7 is configured for .pdf MIME types, it fails opening up the file. Microsoft accepts this issue in their knowledge base article and suggest a HOTFIX (KB: 979543) as resolution.


Requested microsoft for this fix file setup, got it installed and PDFs started opening up.

Happiness was back at faces, as there was minutes left out for the weekend bash.

Wednesday, April 14, 2010

The name 'CastDBNull' does not exist in the current context

The name CastDBNull does not exist in the current context

Generating Data Access Layer using Guidance Package for VS2008 ?(ISimpleDomainObjectFactory)?

using Microsoft.Practices.EnterpriseLibrary.Data

Define this in your code.

public static class CastDBNull
{
public static T To(object value, T defaultValue)
{
if (value == DBNull.Value) return defaultValue;
return (T)Convert.ChangeType(value, typeof(T));
}
}

Sunday, April 11, 2010

The media family on device Microsoft SQL Server, Error: 3241

The media family on device 'D:\Web_Applications_Sabin\HOF\LPT\HOF_NEW_BACKUP.bak' is incorrectly formed. SQL Server cannot process this media family.
RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)

I was trying to restore a database back up on my machine. Back up file was taken from a different machine. Got stuck up with the error.

Later I realised, it was due to the compatibility issue as the Back up was taken from SQL Server 2008 Express and I was restoring on SQL Server 2005 Express.

Resolution.
Generate Script (.sql) from the destination server and execute in the source server.