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

SqlClient for Windows: Native SNI depends on MSVCR110.dll #15407

Closed
divega opened this issue Oct 9, 2015 · 27 comments
Closed

SqlClient for Windows: Native SNI depends on MSVCR110.dll #15407

divega opened this issue Oct 9, 2015 · 27 comments
Assignees
Milestone

Comments

@divega
Copy link
Contributor

divega commented Oct 9, 2015

Using SqlClient can cause a DllNotFoundException on sni.dll. This has been reported a few times by customers trying to use SqlClient on coreclr-x64/x86 on Windows (see dotnet/aspnetcore#904 for detailed symptoms). One of the possible causes is that you may need the Microsoft Visual C++ 2012 Redistributable installed to get SqlClient to work.

Beta8 has not solved the problem, e.g. link /dump /imports sni.dll still shows MSVCR110.dll in the list of dependencies.

From an email thread with @ericstj it seems that it should use msvcrt.dll instead.

@mikedn
Copy link
Contributor

mikedn commented Nov 14, 2015

Note that the msvcr110.dll dependency will likely prevent SqlClient from working on Nano server, that would be pretty lame.

@ericstj
Copy link
Member

ericstj commented Nov 16, 2015

@divega that's correct. We build clrcompression.dll against msvcrt.dll today. Sni.dll needs to do the same. You should be able to control this in your project settings for SNI.dll.

/cc @weshaggard

@saurabh500
Copy link
Contributor

I looked at the sni.dll implementation and there are usages of _dupenv_s at three locations.
The _dupenv_s (...) function is used to retrieve the envrionment variables on windows.
The implementation of NamedPipe provider and resolution of SQL Server instance names on windows need to query the environment variables.

Apart from the dependency on the above function, the build properties should be changed to refer the C runtime from the Windows core system runtime.

@saurabh500
Copy link
Contributor

Another note: The _dupenv_s () function is used to retrieve the CLUSTER_NETWORK_NAME

@saurabh500
Copy link
Contributor

@mikedn As far as the Nano Server is concerned, this bug is not relevant. We need to build Managed SNI based SqlClient for Nano server. Currently the dlls generated for Linux and OSX are managed SNI based where TCP connectivity has been implemented.

@mikedn
Copy link
Contributor

mikedn commented Nov 17, 2015

@saurabh500 How would the managed SNI version would be selected on Nano server? As far as I can tell the managed SNI is selected at compile time so it would seem that we need different a SqlClient assembly for Nano, that may be a bit cumbersome.

@saurabh500
Copy link
Contributor

@mikedn yes the managed SNI is built at compile time.
The managed SNI is being developed to have parity with native SNI. Currently for windows we are using native SNI so that the features on windows are maintained. Once managed SNI is at par with native SNI we want to retire the native SNI in CoreFx.
This will allow us to run the managed version across different platforms.

@mikedn
Copy link
Contributor

mikedn commented Nov 17, 2015

@saurabh500 Sounds good, thanks for the information.

@juswes
Copy link

juswes commented Dec 29, 2015

I have installed Microsoft Visual C++ 2012 Redistributable, but this does not seem to resolve the issue on coreclr-x64-rc1-update1 with Windows Server 2008 R2.

@divega
Are there any other workaround or solutions available yet?

@kkurni
Copy link
Contributor

kkurni commented Jan 12, 2016

@juswes did you run this inside IIS ?

@kkurni
Copy link
Contributor

kkurni commented Jan 12, 2016

This issue seems to be related with https://github.com/dotnet/corefx/issues/5252

After installing VS C++ 2012 Redistributable still not solve the problem if the application is running inside IIS

@juswes
Copy link

juswes commented Jan 13, 2016

@KKhurin Correct, it only occurs when you run a published version of your web app in IIS on Windows Server 2008 R2. If you use the "web" comment from the command line the app works fine. I now installed everything on a Windows Server 2012 R2 server and then I can publish to IIS and run the web app just fine. So it seems this issue only occurs if you publish it to a Windows 2008 R2 server and run it in IIS.

@dbogatov
Copy link

Any workarounds at this time? I want to publish a webapp to Azure services, I have no control on what version of Win Server they are using?

Thank you!

@markentingh
Copy link

This is affecting my project as well. It's strange, because it works when I execute dnx web from command-line, but when I try to press play from Visual Studio, the error occurs when I try using the SqlClient class (while attempting to log into an account within the website).

I just reformatted my Windows 7 laptop with a new clean copy of Win 7 Pro + Visual Studio 2015 Community Edition, and this error has only happened on the new install. Before reformatting, the project worked just fine. I'm using rc1-final x64 coreclr.

@saurabh500
Copy link
Contributor

A fix was delivered into TFS to remove the dependency of sni.dll on mscvcr110.dll

@dwdickens
Copy link

I just had this error for the first time, after the latest Windows 10 update was automatically installed. I resolved it by copying msvcr110.dll into c:\windows. I found using process explorer that it wasn't able to find it, presumably the update 'updated' it.

@thiagonsiq
Copy link

Is there a fix for this issue? I'm still seeing it in my application deployed on AWS using IIS or by launching the application through the command line using the "web" command. I also confirmed the DLL is where it should be in the inetpub folder.

@saurabh500
Copy link
Contributor

This issue was fixed and SqlClient doesn't need MSVCR110.dll to run anymore.
What is the error that you are receiving? Also what version of Windows are you using for your service?

@thiagonsiq
Copy link

thiagonsiq commented Jul 6, 2016

I'm using Windows 7 on my dev machine and the application runs fine on Visual Studio 2015. When I publish it and deploy the application on my AWS Windows Server 2012 R2 server (IIS), i get this issue. I've also verified that the sni.dll file is in the path shown on the error message.

The error i'm getting is:

DllNotFoundException: Unable to load DLL 'C:\inetpub[app]\approot\packages\runtime.win7-x64.System.Data.SqlClient.sni\4.0.0-beta-23516\runtimes\win7-x64\native\sni.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

@NickCraver
Copy link
Member

@tsiqueira86 You are using a very outdated package there, pre-RC1 even. If you update to the RTM tools and packages, the problem will go away. There's nothing we can do unless this happens...the fix is in the updated packages.

@thiagonsiq
Copy link

Thanks! I'm downloading the new tools and will try when it's done. I'll reply here to confirm if it fixes the issue.

@ctonger
Copy link

ctonger commented Oct 30, 2016

I am getting this issue after publishing to AZURE and it is driving me mad for two days now:

the code which triggers this exception is in StartUp.cs when I try to configure app.UseRequestLocalization.

PS: Needless to say that it works perfect on my local machine, even when connecting to the AZURE DB,
` var contextBuilder = new DbContextOptionsBuilder();
contextBuilder.UseSqlServer(ConfigurationHelper.ConnectionString);
using (var dbContext = new DbContextForMigrations(contextBuilder.Options,ConfigurationHelper))
{
app.UseRequestLocalization(dbContext.GetRequestLocalizationOptions(ConfigurationHelper.DefaultLanguageCode));
}

`

On the context I have an extension method that creates the RequestLocalizationOptions. The exception is the following;

Application startup exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.TdsParser' threw an exception. ---> 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 ---
at System.Data.SqlClient.TdsParser..cctor()
--- End of inner exception stack trace ---
at System.Data.SqlClient.TdsParser..ctor(Boolean MARS, Boolean fAsynchronous)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, TimeoutTimer timeout)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open()
at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable.Enumerator.MoveNext()
at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.<_ShapedQuery>d__31.MoveNext() at System.Linq.Enumerable.SelectEnumerableIterator2.MoveNext()
at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor1.EnumeratorExceptionInterceptor.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at TriCon360.NetCore.Core.Extentions.DbContextExtentions.GetRequestLocalizationOptions(ApplicationDbContext context, String defaultCulture) in D:\Becom360 Applications\TriCon360.NetCore.Core\Extentions\DbContextExtentions.cs:line 44
at Becom360.NetCore.Web.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) in D:\Becom360 Applications\Becom360.NetCore.Web\Startup.cs:line 129
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.AspNetCore.Hosting.Internal.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
crit: Microsoft.AspNetCore.Hosting.Internal.WebHost[6]
Application startup exception
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.TdsParser' threw an exception. ---> 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 ---
at System.Data.SqlClient.TdsParser..cctor()
--- End of inner exception stack trace ---
at System.Data.SqlClient.TdsParser..ctor(Boolean MARS, Boolean fAsynchronous)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, TimeoutTimer timeout)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open()
at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable.Enumerator.MoveNext()
at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.<_ShapedQuery>d__31.MoveNext() at System.Linq.Enumerable.SelectEnumerableIterator2.MoveNext()
at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor1.EnumeratorExceptionInterceptor.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at TriCon360.NetCore.Core.Extentions.DbContextExtentions.GetRequestLocalizationOptions(ApplicationDbContext context, String defaultCulture) in D:\Becom360 Applications\TriCon360.NetCore.Core\Extentions\DbContextExtentions.cs:line 44
at Becom360.NetCore.Web.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) in D:\Becom360 Applications\Becom360.NetCore.Web\Startup.cs:line 129
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.AspNetCore.Hosting.Internal.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
warn: Microsoft.AspNetCore.Server.Kestrel[0]
Unable to bind to http://localhost:33020 on the IPv6 loopback interface.
System.AggregateException: One or more errors occurred. (Error -4089 EAFNOSUPPORT address family not supported) ---> Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -4089 EAFNOSUPPORT address family not supported
at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.Check(Int32 statusCode)
at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.tcp_bind(UvTcpHandle handle, SockAddr& addr, Int32 flags)
at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvTcpHandle.Bind(ServerAddress address)
at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.TcpListener.CreateListenSocket()
at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Listener.<>c.b__6_0(Object state)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Internal.KestrelEngine.CreateServer(ServerAddress address)
at Microsoft.AspNetCore.Server.Kestrel.KestrelServer.Start[TContext](IHttpApplication`1 application)
---> (Inner Exception #0) Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -4089 EAFNOSUPPORT address family not supported
at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.Check(Int32 statusCode)
at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.tcp_bind(UvTcpHandle handle, SockAddr& addr, Int32 flags)
at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvTcpHandle.Bind(ServerAddress address)
at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.TcpListener.CreateListenSocket()
at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Listener.<>c.b__6_0(Object state)<---

Hosting environment: Production
Content root path: D:\home\site\wwwroot
Now listening on: http://localhost:33020
Application started. Press Ctrl+C to shut down.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://tricon360.azurewebsites.net/
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 213.8363ms 500 text/html; charset=utf-8

@NickCraver
Copy link
Member

@ctonger what does your project.json look like? That looks like some very out of date packages that just need some newer version love.

@ctonger
Copy link

ctonger commented Nov 1, 2016

@NickCraver this is what I thought, but not really.

` "dependencies": {
"Microsoft.AspNetCore.Authentication.Cookies": "1.0.0",
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.0.0",
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.EntityFrameworkCore.Tools": {
"version": "1.0.0-preview2-final",
"type": "build"
},
"Microsoft.Extensions.Caching.Memory": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0",
"Microsoft.Extensions.Logging": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"AutoMapper": "5.1.1",
"Microsoft.Extensions.DependencyInjection": "1.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0",
"Microsoft.AspNetCore.Razor.Tools": {
"version": "1.0.0-preview2-final",
"type": "build"
},
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
"version": "1.0.0-preview2-final",
"type": "build"
},
"Microsoft.Extensions.SecretManager.Tools": "1.0.0-preview2-final",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0",
"NLog": "4.4.0-betaV15",
"System.Linq": "4.1.0",
"System.Linq.Queryable": "4.0.1",
"System.Linq.Parallel": "4.0.1",
"System.Interactive.Async": "3.0.0",
"Newtonsoft.Json": "9.0.1",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
"Microsoft.AspNetCore.Mvc": "1.0.1",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
"Microsoft.EntityFrameworkCore": "1.0.1",
"Microsoft.EntityFrameworkCore.SqlServer": "1.0.1",
"Microsoft.NETCore.App": "1.0.1",
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": "1.0.0-preview2-update1",
"Microsoft.VisualStudio.Web.CodeGenerators.Mvc": {
"version": "1.0.0-preview2-update1",
"type": "build"
},
"TriCon360.NetCore.Core": "1.0.0-",
"HtmlAgilityPack": "1.4.9.5",
"Tricon360.NetCore.Web.Components": "1.0.0-
",
"Microsoft.ApplicationInsights.AspNetCore": "1.0.0"
},

"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
"version": "1.0.0-preview2-final",
"imports": [ "dnxcore50", "dotnet5.6", "portable-net45+win8" ]
},
"Microsoft.EntityFrameworkCore.Tools": {
"version": "1.0.0-preview2-final",
"imports": [ "dnxcore50", "dotnet5.6", "portable-net45+win8" ]
},
"Microsoft.AspNetCore.Razor.Tools": {
"version": "1.0.0-preview2-final",
"imports": [ "dnxcore50", "dotnet5.6", "portable-net45+win8" ]
},
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
"version": "1.0.0-preview2-update1",
"imports": [ "dnxcore50", "dotnet5.6", "portable-net45+win8" ]
}
},

"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"dnxcore50",
"portable-net45+win8"
]
}
},

"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},

"runtimes": {
"win10-x86": {},
"win10-x64": {}
},

"publishOptions": {
"include": [
"wwwroot",
"Views",
"appsettings.json",
"web.config"
]
},

"scripts": {
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ],
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
}`

I initially thought that it may have to do with the fact that I used EF in startup. So I removed any possible instantiation prior to that a request is processed in the MVC Pipelin, and I can confirm that I get the exception as soon as the context is created no matter where. It only happens on AZURE. Locally it works perfectly fine. Even when connecting with the same connectionstring to the AZURE DB.

@acotterell1973
Copy link

So I'm having the same exact issue after publishing to AZURE as well. I made sure that I have the latest and gr3atest and to no avail. This is driving me nuts for 2 days as well. The classic case of, it works on my machine and not prod! :(

The runtime is set for "win10-x64": {}

@saurabh500
Copy link
Contributor

@ctonger can you open a separate issue for the problem you are facing?

@ctonger
Copy link

ctonger commented Nov 2, 2016

@saurabh500 Will do in a moment. Thanks!

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 1.0.0-rc2 milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jan 4, 2021
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