Generic error in getting redirect Url - Object reference not set to an instance of an object.