question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Micorsoft.Data.SqlClient not working with Microsoft.Aspnet.Identity connections

See original GitHub issue

Hi there,

I need to use Micorsoft.Data.SqlClient provider now in my existing project which was using System.Data.SqlClient DB provider.

We have added the library dll’s from Nuget for Microsoft.Data.SqlClient already and also added the following lines in machine.config

<system.data> <DbProviderFactories> <add name="SqlClient Data Provider" invariant="Microsoft.Data.SqlClient" description=".Net Framework Data Provider for SqlServer" type="Microsoft.Data.SqlClient.SqlClientFactory, Microsoft.Data.SqlClient" /> </DbProviderFactories> </system.data>

Our web.config for connection string is using now:

providerName=“Microsoft.Data.SqlClient”

Normal DB connection seems working fine with Microsoft.Data.SqlClient But,

we are getting error while using Microsoft.AspNet.Identity.Owin in line as: AppUser = UserManager.FindByName(uname);

“The ADO.NET provider with invariant name ‘Micorsoft.Data.SqlClient’ is either not registered in the machine or application config file, or could not be loaded. See the inner exception for details.”

Inner Exception as: “{“Unable to find the requested .Net Framework Data Provider. It may not be installed.”}”.

Kindly suggest us the solution for this issue.

Thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
NitsSonicommented, Dec 18, 2020

I will possible test these changes next monday on 21st december 2020

0reactions
JRahnamacommented, Jan 14, 2021

closing due to inactivity. Feel free to reopen the issue if it still remains.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Micorsoft.Data.SqlClient not working with Microsoft.Aspnet. ...
Normal DB connection seems working fine with Microsoft.Data.SqlClient But,. we are getting error while using Microsoft.AspNet.Identity.
Read more >
Could not load file or assembly System.Data.SqlClient
1. Make sure that the 'System.Data.SqlClient' assembly is present in your project's output directory or in a location where it can be discovered ......
Read more >
asp.net core 5 application and microsoft.data.sqlclient
Hello, I'm working on an asp.net core 5 application. Trying to use Microsoft.Data.SqlClient on development machine and it works, ...
Read more >
A connection was successfully established with the server ...
I'm using Dapper package to communicate with Sql server database. After investigation, I found that this happens when I refer Microsoft.Data.
Read more >
Introduction to Microsoft.Data.SqlClient namespace
Learn about the Microsoft.Data.SqlClient namespace and how it's the preferred way to connect to SQL for .NET applications.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found