I would like to thank Neil Mackenzie for this post. His input on below exception [as comment in my previous post ] is content of this post .
In my previous post, I suggested solution of above exception , and I got a comment from one of my reader that there is an easier way to solve above exception as well. So I decided to make a post on the other way of solution as well.
Very first I won’t say solution discussed in previous post is harder than solution discussed in this post or vice versa.
Usually we read connection string as,
DataConnectionString is name of the connection string in setting of WebRole.
To avoid above exception read connection string as
1. First get the configuration setting value
2. Parse that
I hope this post would be useful to you in getting rid of above exception.