Post the relevant part of the config? Also what error you get? do you get an exception? How did you run the code at run-time (how are you passing the parameters?)
Without any info its difficult to guess what you problem could be!