Powered by Blogger.

Sunday, February 16, 2014

The underlying provider failed on Open error in Asp.Net Entity framework



This error will come if any issue will be in connection string. This error mostly come if we are using Entity framework i.e. ADO.Net entity data model . You have to check properly in config file. when we are using Ado.net entity data model there in designer we have to connect the database and set the connection string.

In the Entity data model wizard there are two options comes when generate model.

1- Yes include sensitive data in the connectionstring
2- No exclude sensitive data from the connection string



If you will choose second option than it will not set your password in connection string in your web.config file. So when you will do any database operation that time the error will come as: The underlying provider failed on Open.

You have to check your config file and in connectionstring you have to set password. Than this error will be resolved.

Also you can check my previous posts on:

- If Else statements in JavaScript Example

- File upload and thumbnail creation in Asp.Net

- Steps to create wcf service and host wcf service as windows service in C#.Net



0 comments

Post a Comment