Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASP.Net Core 1.1 App running inside docker container cannot connect to Remote Sql Server on Windows #22561

Closed
rgottumu opened this issue Jun 29, 2017 · 6 comments

Comments

@rgottumu
Copy link

I have an ASP.Net Core Web API running on .Net Core 1.1 is not able to connect to a sql server which is in my network but outside of docker container. I always get connection time out error.

Connection Timeout Expired. The timeout period elapsed during the post-login phase. The connection could have timed out while waiting for server to complete the login process and respond;

App works fine when running outside of the docker container.

Dockerfile:

FROM microsoft/aspnetcore:1.1
WORKDIR /contest
EXPOSE 85
EXPOSE 1433
COPY /out .
ENTRYPOINT ["dotnet", "contest.dll"]

any help is appreciated. Thank you.

@karelz
Copy link
Member

karelz commented Jun 29, 2017

Did you try to do the same thing in just .NET Core, without ASP.NET Core? (basically minimal repro)
It would help us identify where the problem might be.

@rgottumu
Copy link
Author

Tried with a .net core console application, same error.

@karelz
Copy link
Member

karelz commented Jun 30, 2017

Can you please paste the code?

@karelz
Copy link
Member

karelz commented Jun 30, 2017

Did you get chance to try .NET Core 2.0 Preview2?

@rgottumu
Copy link
Author

rgottumu commented Jul 5, 2017

sorry for the late reply.. I tested on various environments and finally figured out the root cause. My dev sql instance is still on Sql Server 2008 R2 (RTM). I can connect every instance that I have.

@Petermarcu
Copy link
Member

Ok, sounds like this issue can be closed. Thanks!

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 2.1.0 milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants