Last post Jun 29, 2016 04:11 PM by abhishekagrwl25
Jun 29, 2016 07:23 AM|abhishekagrwl25|LINK
I have created two pages one is working fine but why I am getting the above error on my second page. I googled it and found solution that may be your machine.config doesn't have provider details in that, but one of my page is working fine. I can not understand
what the problem is.
Following is my connection string in web.config:
<add name="GovPrjConnectionString" connectionString="Data Source=DDD\PR;Initial Catalog=abc;Persist Security Info=True;User ID=sa;Password=****" providerName="System.Data.SqlClient"/>
Jun 29, 2016 08:04 AM|PatriceSc|LINK
Seems correct. You are sure this is this one that doesn't work? The other page that works doesn't use the same connection string (and provider ???)
What if you compare both?
Jun 29, 2016 08:46 AM|abhishekagrwl25|LINK
Other page using same connection string and providername and works fine, that's why I am confusing why this is not working, is this because of any other reason..??
Jun 29, 2016 04:03 PM|PatriceSc|LINK
Humm. So you have a single connection string (I mean not two connection string with the same value but really a SINGLE connection string ?) If yes, could the problem be in your code? Do you read the connection string yourself? Do you have a data control
that points to this named connection string ?
If not (ie you have a connection string named "a" and a connectionstring named "b") I would swap them. If then the page that work doesn't work any more and the page that doesn't work now works, it would show that those connection string are NOT identical.
For now Id bout this is really an issue with your SqlClient provider.
Jun 29, 2016 04:11 PM|abhishekagrwl25|LINK
Yes I have used a dropdownlist filled by a sqldatasource data source and i have not defined provider name for that, that was the error, the problem was with my code only.
Thanks for your suggestion