“The underlying provider failed on Open.”

I’m deploying my ASP.NET app to a brand new server with a fresh install of SQL Server 2008 Express. The db connection step failed with this error:

Message: The underlying provider failed on Open.
StackTrace:  at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) at System.Data.EntityClient.EntityConnection.Open() at System.Data.Objects.ObjectContext.EnsureConnection() at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)

I checked the connectionString, which uses Windows authentication, and it looked fine.

Somebody suggested to Allow Remote Clients in the Network DTC Access settings. That option is already enabled on my environment.

I looked at the Event Viewer, and noticed this entry:

Event Type:    Failure Audit
Event Source:    MSSQL$MSSQL
Event Category:    Logon
Event ID:    18456
User:        NT AUTHORITY\NETWORK SERVICE
Description:
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. Reason: Failed to open the explicitly specified database. [CLIENT: <local machine>]

So IIS is trying to access the database under the credential   'NT AUTHORITY\NETWORK SERVICE' .  I looked that the db settings via SQL Server Management Studio and, sure enough, that account is not listed as one of the users allowed to connect. So I added him. And the web app was able to connect successfully.

59 comments:

Liby George said...

You are a Life saver. I am new to SQL Server and the Web Application couldn't login to the SQL server. I tried so many other things but at the end, I saw your post and was able to get it on my first try.

Thanks

Liby

Thanh Hai Tran said...

Thanks, Liby, for your comment.

Oussama Dinia said...

thanks a lot. This was helpful, and time saving

tendras said...

i wasted a complete day before i got ur post.Thanks a lot

Anonymous said...

Thank you !

Unknown said...

Just saved me a ton of time. Thanks!

Kwex said...

I solved this problem by starting this service manually - "Distributed Transaction Coordinator". This turned out to be the MSDTC service it was looking for.

Hope this helps someone.

Kwex.

Chintan Udeshi said...

Thanks a lot Dude it really helped me out to solve the Error.......

Anonymous said...

Thanks a lot!

Anonymous said...

it works, thank you!

Anonymous said...

Thanks. It saved my time

Riya

Anonymous said...

many many thanks from Istanbul, Turkey :)

Unknown said...
This comment has been removed by the author.
Unknown said...

Please visit my article on Underlying service provider

Anonymous said...

i cant fix this issue, please help me

Unknown said...

hi i am using asp.net mvc 5 and sql server 2017 with windows authentication and can't solve this problem yet can you post a photo of solution

Santhosh said...

Thanks. I had the same issue, fixed now!

Unknown said...

Hi, Thanks for sharing a nice information, keep sharing with us.

Bitfinex Support Number
Bitfinex Phone Number
Bitfinex Number
Bitfinex Customer Support Number
Bitfinex Support

Amazon Prime said...

Informative blog post. Really wanting forward to browse a lot of. Fantastic. How to transfer bitcoin from coinbase

Prathima Hospitals said...

Thanks for this informative blog about fashion. This was thought out and put together. A lots blogs talk about nothing exist on the net. best hospitals in Hyderabad

Unknown said...

I recently found much useful information in your website especially this blog page. Among the lots of comments on your articles. Thanks for sharing Best Hospital in Somajiguda

Settle Via us said...

Very well written post. You have shared a wonderful article which is very helpful. Thanks for sharing, have a good day.
Skilled Visa Australia

Lavandep Smith said...

Get help for Ledger Wallet customer support contact Number.

Ledger Nano Wallet Customer Support Contact Number

Ledger Nano Wallet Customer Support Contact Number

Ledger Nano Wallet Customer Support Contact Number

Ledger Nano Wallet Customer Support Contact Number

Sai Sudha Hospital said...

Nice! Very informative article, thanks for sharing these unique information with us.
Best Fertility Specialist In Hyderabad

Melbourne Vacate Cleaning said...

Good post. Thank you so much for sharing this post. I really like your blog and thanks for sharing the information with us. End of Lease Cleaning Melbourne

Rohan said...

How to repair Binance account accessing drawback
If you're interested by fixing all the problems throughout a jiff, you'd wish to dial Binance Support Number +1【(817) 776-5501. If you're not awake to any resolution associated with the error you'll be ready to simply get connected with the professionals by dialing Binance Support variety instantly. The consultants will provide high-quality facilitate to the users thus users get obviate all the errors from the roots. they're very cooperative and place all efforts in fixing the matter of the users.Website: ​https://www.checkexchangeinfo.com/webexchanges/binance-support-number/

Rohan said...

it is to boot clear that these shoppers from time to time got to confront the school glitches that are essential to extend in worth by commonplace clients. to stay up a key tight ways that from the disjointed qualities, shoppers got to contact the Coinbase support number+1 (817) 776-5501 specialists connected with a foreign coinbase client support variety affiliation can ne'er provide you with down paying very little temperament to what a chance to type of school glitches you're continuing with. additional info visit here: https://www.checkexchangeinfo.com/webexchanges/coinbase-support-number/

Rahul Sharma said...

You have really created a nice blog. Thanks for sharing this information. glass fibre filters

The Luxury Trains said...

Hey your views are awesome. Thanks for sharing the information which I believe never heard before and will sure help me to explore some awesome new things for me.
Best Bluetooth speakers under 2000 India 2019

Ashley Rosa said...

Do you want to set-up two-factor authentication in Gemini exchange? Two-factor authentication is required to protect your account from unwanted activities that can harm your Gemini account. In order to attain steps related to setting-up two-factor authentication, you can dial Gemini customer support phone number and get accessible and pertinent results in the fraction of time. The team is always there to support you and no matter at what time you call, they will always be there to support you.

More info click here : Crypto customer support number

btcwalletexchange said...

If you want to resolve your database connectivity issues in error less manner, feel free to dial Binance support phone number and get all the required solutions and methods from the well-talented experts. The customer care experts are skilled in fixing all the issues and queries related to database connectivity in no time. Whether it’s an early morning or late night you are free to call Binance support experts them anytime at any point of an hour as they are available round the clock to provide fruitful assistance. They are available 24*7 hours day and night and also they are friendly in term of hearing your problem.
Binance customer support number

Website:https://bit.ly/2r0xzZS

David Johnson said...

Hacking of Binance account is quite discouraging as your all personal information and data is stored in it and you might lose that. To fix hacking issues in Binance account, you must take support from someone who has comprehensive acquaintance about the product and knows all the programs that help in dismissing the error in quick time. You can dial Binance Support Number and exclude all the queries and errors in minimal time with maximum exactness.

For More info:- Binance Customer Support Phone Number

David Johnson said...

Hacking of Binance account is quite discouraging as your all personal information and data is stored in it and you might lose that. To fix hacking issues in Binance account, you must take support from someone who has comprehensive acquaintance about the product and knows all the programs that help in dismissing the error in quick time. You can dial Binance Support Number and exclude all the queries and errors in minimal time with maximum exactness.

For More info:- Binance Customer Support Phone Number

Delores White said...

Are you unable to reset your password in binance? Looking for every possible solution but still unable to find it? To reset your password, you can always reach the professionals by dialing binance password reset number. The best thing about using this binance customer service is that it is available 24/7 and is free of cost so users can take their full time to understand the solution from the professionals. The customer professionals deliver result- oriented solutions. They have plethora of solutions related to your binance account issue and can fix it in short time without making much efforts.
https://www.cwspn.info/2019/12/why-need-of-binance-support-number-read.html

David Johnson said...

Are you dealing with failing of Binance two-factor authentication? If you don’t know how to deal with such errors and looking for solution, you can always take help from the team of skilled professionals who are there to assist you. You need to talk to them via calling on Binance Support Number which is functional around the clock and users can have conversation with the team anytime related to issues. Speak to the team anytime for availing quality solutions in no time.


For More info:- Binance Customer Support Number

jfnvnisunfd said...

Is your Blockchain account verified? Is your photo ID verification done? Do you want to confirm whether verification is done? To remove all the queries you can dial Blockchain customer support number {+ 1-833-993-0690} and get rid of all the issues or problems in the most hassle-free manner. The well-equipped experts have years of experience and can tackle all the problems or glitches in fraction of time. The experts will provide appropriate assistance to you at every step without any trouble.

Orlab Instruments said...

TRY THIS
kunkumadi face Oil

B Best Hair Oil

wheatgrass powder

B on

Balu Herbals

kaira watson said...

Thank you for sharing this informative content.Quickbooks Desktop Support Number help him to contact support for any help. Quickbooks is a accounting Software to easily confirm the account management to help them. In every manner Quickbooks is a powerful acounting Software to measure and help in business. You can need need any type of assistance
How to Create & Delete Budget in QuickBooks Desktop

thomas said...

Lockdown is running in the whole country due to coronavirus, in such an environment we are committed to provide the best solutions for QuickBooks Support Phone Number.
Contact QuickBooks Support Phone Number Arizona to get in touch.
Dial : 1-844-908-0801

QuickBooks said...

Lockdown is running in the whole country due to coronavirus, in such an environment we are committed to provide the best solutions for QuickBooks Support Phone Number.
Click Here to Know How to Delete Deposits in QuickBooks to get in touch.
Dial : 1-844-908-0801

Amily said...

Nice Blog !
QuickBooks Error 6177 typically occurs when the user tries to open the company file. Corruption in the QuickBooks company file,simply connect to our QuickBooks Error Support Phone Number 1-855-6OO-4O6O experts and get your queries answered concomitantly.

thomas said...

Lockdown is running in the whole country due to coronavirus, in such an environment we are committed to provide the best solutions for QuickBooks Support Phone Number.
Contact QuickBooks error 6073 to get in touch.
Dial : 1-844-908-0801

thomas said...

nice post!
Worried about QuickBooks error?Get in touch with QuickBooks expert for instant solution.
Dial QuickBooks Customer Service Phone Number Montana 1-844-908-0801

John Ripin said...

Cash App caters the platform to send and receive money hassle-free without any obstruction. The platform allows you to send approximately $250 in seven days span and receive up to $1000 in 30 days from an unverified account.
https://www.cryptowalletsupport.com/cash-app-refund/
https://www.cryptowalletsupport.com/cash-app-refund/
https://www.cryptowalletsupport.com/cash-app-refund/

Nino Nurmadi , S.Kom said...

Nino Nurmadi, S.Kom
ninonurmadi.com
ninonurmadi.com
ninonurmadi.com
Nino Nurmadi, S.Kom
Nino Nurmadi, S.Kom
Nino Nurmadi, S.Kom
Nino Nurmadi , S.Kom
Nino Nurmadi, S.Kom

Leena Mercy said...

Toll Free Number: - +1805-817-7455

Amazon Prime Activate My Tv

Perhaps the most bewildering and fascinating stage to watch. With Amazon Prime, you can stream boundless movies and TV scenes on the amazon prime video application. It is a social stage that offers induction to the clients of a monstrous assurance. An organizations like boundless video constant, Quick movements, specific permission to costs, and considerably more. You ought to just enroll these players and a short time later like streaming your # 1 shows and movies.

TechHypes said...

First You got a great blog .I will be interested in more similar topics. i see you got really very useful topics, i will be always checking your blog thanks 15 vs. 17-inch laptop for gaming

vivikhapnoi said...

Nice post brother, I have been surfing online more than 3 hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. In my view, if all web owners and bloggers made good content as you did, the internet will be much more useful than ever before. There is certainly a lot to know about this issue.I love all of the points you’ve made. I am sure this post has touched all the internet viewers.
vé máy bay từ texas về việt nam

vé máy bay khứ hồi từ đức về việt nam

chuyến bay từ anh về việt nam

chuyến bay nhân đạo từ úc về việt nam

Săn vé máy bay 0 đồng tu Dai Loan ve Viet Nam

chuyến bay nhân đạo từ canada về việt nam

Vyaparinfo said...


Really Nice Information It's Very Helpful Thanks for sharing such an informative post.
https://www.vyaparinfo.com/looking-for-bulk-buyers-in-india/
https://www.vyaparinfo.com/looking-for-distributors/

Ava Alfred said...

Hi! Amazing blog. Your blog gives me a thorough knowledge of the topic. In case you find any technical trouble in QuickBooks, dial QuickBooks Support Phone Number and get premium support service from experts.

Ava Alfred said...

Hey! Well-written blog. I hope you will post some more informative blogs on the same topic. In case you want technical support for QuickBooks, dial QuickBooks Customer Service Phone Number and get feasible solutions for QuickBooks problems.

Ava Alfred said...

Its very useful information. Get also solution at QuickBooks Customer Support Phone Number New York

Ravi Muchhal said...
This comment has been removed by the author.
Outbooks Australia said...
This comment has been removed by the author.
abrhospital said...

Thank You
ABR Hospital Nero Multispeciality Hospital Neurology Hospital In As Rao Nagar ABR Neuro Multispecialty Hospitals have a specialized and dedicated Emergency Stroke Program to treat acute stroke patients. ABR Hospitals is the located at Uppal and AS Rao Nagar, Hderabad for the treatment of neurological diseases
Neurology Hospital in As Rao Nagar

orthopedic Hospital said...

orthopedic prostheses

https://www.astromedicare.org/

Crypto Coin Expert's Blogs said...
This comment has been removed by the author.
Anila Watson said...

Great Post, I would like to bookmark your site to read more information. If you have an account on Binance and you are facing 2FA Error, Read How To Fix 2fa Verification Error on Binance.
You should also know Why is my 2FA code not working on Binance.

Các mẫu nhà đẹp said...


Mẫu nhà cấp 4 120m2 3 phòng ngủ 1 thờ có nhà tắm đẹp hiện đại

Kiểu dáng của các loại mẫu kệ tivi treo tường phòng khách

Biệt thự sang trọng có bể bơi cao cấp

VỊ TRÍ ĐẶT BẾP THEO CHUẨN PHONG THỦY

SƠN CHỐNG THẤM MAXILITE

MẪU BÀN PHẤN MÀU HỒNG ĐỘC LẠ