Hi,
I have a sql connection in startup.cs
services.AddDbContextPool(c => c.UseSqlServer(Configuration.GetConnectionString("PosSistemDatabase")));
if I use this structure, I have a error message (down)
services.AddDbContextPool(c => c.UseSqlServer("Server=(local);Database=PosSistemDB;Trusted_Connection=False;User Id=sa;Password=PassWord1*"));
if I use this structure, there is no problem why ?
(on IIS 10) if I use visual studio debugging, there is no problem all of them
public void ConfigureServices(IServiceCollection services) { services.AddMvc(); services.AddDbContextPool(c => c.UseSqlServer(Configuration.GetConnectionString("PosSistemDatabase"))); //services.AddDbContextPool(c => c.UseSqlServer("Server=(local);Database=PosSistemDB;Trusted_Connection=False;User Id=sa;Password=!frigo2010!")); services.AddDistributedMemoryCache(); services.AddSession(); //services.AddSession(options => //{ // // Set a short timeout for easy testing. // options.IdleTimeout = TimeSpan.FromSeconds(10); // options.Cookie.HttpOnly = true; //}); // Add detection services container and device resolver service. services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>(); }
Error.
An error occurred while processing your request.
Request ID: 0HLB3FQ6THAF4:00000005
Development Mode
Swapping to Development environment will display more detailed information about the error that occurred.
Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the applicatio