aspnet / MusicStore

[Archived] MusicStore test application that uses ASP.NET/EF Core. Project moved to https://github.com/aspnet/AspNetCore
1.3k stars 878 forks source link

Ubuntu environment 14.04 - Sql Server Connection - RC1 - 1.0.0-Rc1-Final - Coreclr #572

Closed madhavan281981 closed 8 years ago

madhavan281981 commented 8 years ago

Hello Folks, I am learn asp.net5 and was going through the sample MVC MusicStore application (from dev branch) with RC1 (1.0.0-Rc1-Final - Coreclr - X64, dnvm) installed in both windows and linux platform. The Startup.cs checks for the running platform windows/linux. If the running platform is Linux, it store the information in InMemoryDatabase. When i try to change this option (similar to else section connect to a Sql Server) and run against Azure Sql DB it gives me SNI Handle error in Ubuntu 14.04 environment.

http://blogs.msdn.com/b/webdev/archive/2015/11/18/announcing-asp-net-5-release-candidate-1.aspx

Error
Microsoft .Net Development Utility CoreClr-X64-1.0.0-rc1-16202
The type initializer for 'System.Data.SqlClient.TdsParser' threw an exception.
info : [MusicStore.Program] System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SNILoadHandle' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'sni.dll': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
at System.Data.SqlClient.SNINativeMethodWrapper.SNIInitialize(IntPtr pmo)
at System.Data.SqlClient.SNILoadHandle..ctor()
at System.Data.SqlClient.SNILoadHandle..cctor()
--- End of inner exception stack trace ---

Is the Rc1 release package missing some dependencies? Any thoughts/inputs will be helpful.

Thanks Madhavan

BrennanConroy commented 8 years ago

@natemcmaster

natemcmaster commented 8 years ago

Possible duplicate of https://github.com/dotnet/corefx/issues/3760. What's strange is that is occured on Ubuntu. Usually this is a Windows issue.

There are several known issues in SqlClient on Linux in RC1. See https://github.com/aspnet/EntityFramework/pull/3689#issuecomment-158201904 and https://github.com/dotnet/core/blob/master/release-notes/README.md#data.

BrennanConroy commented 8 years ago

What version of System.Data.SqlClient are you using? I glanced at the assembly for 23516 and it doesn't even have a call to SNIInitialize

Eilon commented 8 years ago

Closing this as it appears to be an older known issue.