Windows error 0x80131904, -2146232060

Detailed Error Information

COR_E_SqlException[1]

Comment System.Data.SqlClient.SqlClientException

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode19 (0x013)
NameFACILITY_URT[2][3]
DescriptionThe source of the error code is .NET CLR.[2][3]
Error Code6404 (0x1904)

Questions

278votes
15answers

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated

I have many users on my web site (20000-60000 per day), which is a download site for mobile files. I have remote access to my server (windows server 2008-R2). I've received "Server is unavailable" errors before, but am now seeing a connection timeout error. I'm not familiar with this - [...] read more
c#
asp.net
sql-server-2008-r2
timeout
sqlcommand
162votes
7answers

"The certificate chain was issued by an authority that is not trusted" when connecting DB in VM Role from Azure website

I am experiencing error when connecting MY DB which is in VM Role(I have SQL VM Role) from Azure Website. Both VM Role and Azure Website are in West zone. I am facing following issue: > SqlException (0x80131904): A connection was successfully established with the server, but then an error [...] read more
azure-web-roles
azure-vm-role
100votes
18answers

There is already an object named in the database

Update-Database failed from Package Manager Console. I've used Entity Framework 6.x and code-first approach. Error is "There is already an object named 'AboutUs' in the database." How can I solve this problem? internal sealed class Configuration : DbMigrationsConfiguration<Jahan.Blog.Web.Mvc.Models.JahanBlogDbContext> { public Configuration() { AutomaticMigrationsEnabled = true; AutomaticMigrationDataLossAllowed = false; } protected [...] read more
database
entity-framework
ef-code-first
entity-framework-6
ef-migrations
56votes
15answers

Error message: (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)

I am trying to deploy my website on windows server 2003. Am i missing something or what is wrong from the following error message, how can I correct it? Thank I am having the error message: > A connection was successfully established with the server, but then an error occurred [...] read more
sql
asp.net-mvc
windows-server-2003
sql-server-2005-express
48votes
9answers

Win32Exception (0x80004005): The wait operation timed out

I'm running an ASP.NET Web Pages page that upon initial load pulls a list of items from a SQL server. This query runs in a second or so and loads the page within 2 seconds. The return is about a 1000 records, give or take. I'm pulling Hostnames from a [...] read more
sql-server-2008
asp.net-webpages
26votes
9answers

System.Data.SqlClient.SqlException: Login failed for user

Working with my project in debug I have no issues. However running it in IIS I am getting this error: System.Data.SqlClient.SqlException: Login failed for user 'domain\name-PC$'. Stack Trace [SqlException (0x80131904): Login failed for user 'CAPLUGSLLC\OETINGER-PC$'.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +6749670 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +815 System.Data.SqlClient.TdsParser.TryRun(RunBehavior [...] read more
c#
iis
sql-server-2012
connection-string
24votes
10answers

System.Data.SqlClient.SqlException: Invalid object name 'dbo.Projects'

My MVC app is returning SqlExceptions when trying to access any table in my database. Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'dbo.Projects'. My app us linq for the data layer. If I use an old dll it works fine, (so doesn't seem to be a problem with the DB) just [...] read more
asp.net-mvc
linq-to-sql
16votes
3answers

Entity Framework Scaffold-DbContext Login failed for user

I am trying to build an API using Visual Studio 2017 and .NET Core 2 with Entity Framework Core. I am following the directions from This Link. I am on the section titled: Reverse engineer your model The command they give to run is as follows: Scaffold-DbContext "Server=(localdb)\mssqllocaldb;Database=Blogging;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir [...] read more
c#
entity-framework
azure
azure-sql-database
asp.net-core-2.0
7votes
2answers

The wait operation timed out

I am relatively new to MVC code first application development and I was trying to host an MVC code first application in a VPS. when tried to browse the website after publishing the application I was getting a wait operation timed out error. I tried to do a bit of [...] read more
sql-server
asp.net-mvc
6votes
2answers

Math Absolute In Ef Core?

I am trying to build a query like this var d = dbContext.Picks .Where( /* some conditions */ ) .GroupBy(x => new { gameDiff = x.Schedule.GameTotal.Value - x.TieBreakerScore.Value }) .Select(g => new { name = g.Key.firstname, count = g.Count(), gameDiff = Math.Abs(g.Key.gameDiff) }) .OrderByDescending(x => x.count) .ThenBy(x => x.gameDiff) .Take(top) [...] read more
c#
entity-framework
asp.net-core
ef-core-2.2
5votes
1answer

Error connecting to MS SQL from one server but not the other

We got a MS SQL server and two web site servers. I'm in the process of moving all the sites from one of the web site servers to the new one. My asp.net sites are not able to connect to the external ms sql server after I've moved them to [...] read more
sql-server
iis
web-server
windows-server-2012
5votes
2answers

SQL Server 2008 R2 Express + Wildcard SSL Certificate

Wildcard certificates (for example, *.example.com) simply did not work in SQL Server 2008 or lower. But Encrypting Connections to SQL Server on MSDN states, plain as day, that > SQL Server 2008 R2 supports wildcards certificates. Excellent. So I set up SQL Server 2008 R2 Express on a machine, and [...] read more
sql-server-2008
ssl-certificate
5votes
1answer

How do I create an NHibernate IUserType for a Time in Sql Server 2008/2012?

I am trying to create an NHibernate IUserType for the Noda Time LocalTime type which would logically map to a time type in Sql Server 2008/2012. I am able to get values saving and loading from the database. However, I can't write queries involving comparison of local times like _session.Query<SchedulingTemplate>().Where(x [...] read more
nhibernate
nodatime
5votes
2answers

Entity Framework "The wait operation timed out" on simple DeleteAll

We have an MVC web application that I inherited that loads, let's call it MyCategory and all of its children into a webform, takes edit, then saves on save clicked. The way the application works is to first delete all data for the parent level entity in the model, then [...] read more
asp.net
sql-server
entity-framework
linq
5votes
6answers

SQL Server Agent - SSIS Package - Error 0x80131904 - Timeout expired

There's been a string of random occurrences of the following error in the SQL Server Agent scheduled jobs lately that I have been unable to find a solution to. The error occurs infrequently, but usually once a week for a daily scheduled job, but in any number of different jobs [...] read more
sql-server
ssis
sql-server-2012
sql-server-agent
5votes
1answer

Entity Framework throws exception on updates only - Invalid object name 'dbo.BirdBrain.service'

I've created an EF Core model from an existing database and all operations on entities work EXCEPT for updates; on updates EF Core is using an incorrect database name. eg. When I perform an update I get a SqlException: Invalid object name 'BirdBrain.dbo.services'.. BirdBrainContext is the name of my DbContext, [...] read more
c#
sql
sql-server
entity-framework
ef-core-2.2
4votes
1answer

Random connection failures between IIS8 and MSSQL 2012 in RackSpace Cloud

Background For years I hosted all of my server functionality, including IIS, Apache, MySql, and MSSQL on a single server instance, yikes! As my client base grew this led to persistent SQL Timeouts when the server got busy. Over the past year I've reorganized this into three servers, one Windows [...] read more
windows-server-2012
timeout
sql-server-2012
iis-8
.net-4.0
4votes
2answers

Membership.GetUser(), Unable to connect to connect to SQL Server Database

I started using ASP.net MVC4, and I created a project with the Internet Application Template. I added some custom fields to the UserProfile default Model and Table, I also renamed it as "UserModel", and it's working just fine (login, register, etc.) I'm now trying to perform an SQL request to [...] read more
c#
asp.net-mvc-4
asp.net-membership
4votes
3answers

Can't connect to my own MDF file. Cannot open user default database. Login failed.Login failed for user... and other errors

SQLSEXPRESS service IS running!! I have I program I wrote some time ago and it works. It was written in MS Visual Studio with local MDF file. How is it possible to edit this file from Microsoft SQL Server Management Studio? I don't see this file in the list of [...] read more
sql-server
sharing
mdf
3votes
2answers

How do I disable TLS 1.0 without breaking my IIS/ASP.NET websites?

We are running Windows Server 2008 R2. TLS 1.0 has been non-PCI compliant for some time now, and disabling it via the windows registry is easy. In the past, though, disabling TLS 1.0 has caused 2 problems for us: 1. It's impossible to connect to the server via Remote Desktop. [...] read more
windows-server-2008-r2
iis-6
tls
pci-dss
3votes
0answers

Cannot connect to sql server by IP Address but using the hostname works

After upgrading to the newest version of windows (windows 10 build 10586) I am no longer able to connect to a remote sql server by ip address. Here is the error I see: > [SqlException (0x80131904): Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake [...] read more
networking
sql-server
windows-10
3votes
0answers

SQL Server 2012 Connection Timeout Expired

I am running MS-SQL Server on Windows Server 2012. From time to time I get this Exception: > Server Exception : System.Data.SqlClient.SqlException (0x80131904): 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 [...] read more
sql-server
windows-server-2012
3votes
1answer

EF Migrations - There is already an object named '' in the database

I am having trouble adding a new table to my database. these are the commands I entered when trying to add the new migration: Add-Migration AdminSett > Scaffolding migration 'AdminSett'. The Designer Code for this migration file includes a snapshot of your current Code First model. This snapshot is used [...] read more
c#
entity-framework
migration
ef-migrations
3votes
2answers

.NET Core canĀ“t connect to SQL DB

I build a new .net Core Web API with connection to SQL DB. I have problems to connect the API with my Database I tried a local DB "DefaultConnection": "Server=(localdb)\\MSSQLLocalDB; Initial Catalog=ib; Integrated Security=SSPI", and a remote (see appsettings.json). Remote: Microsoft SQL Server Express (64-bit) 11.0.2100.60 System: Microsoft Windows NT [...] read more
c#
asp.net-core
3votes
0answers

How to connect to a new server with similar old connection string info

Here in the company I'm working, we have migrated the current DB table structure and the Stored Procedures to a new DB; working so far. The problem we are facing is that there isn't any way to get our app connected to the new DB. The reason? Probably some problem [...] read more
c#
sql-server
xml
winforms
entity-framework
3votes
2answers

I cannot connect to SQL Server through Visual Studio Code on Mac

I'm a new user to Mac OS and I'm using Visual Studio Code as a text editor. I want to create my very first SQL. I've been following step by step on this sites : https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-develop-use-vscode Also i have also installed the OpenSSL following the step by steps on this [...] read more
sql-server
visual-studio-code
macos-sierra
3votes
1answer

Change data type from int to long of key property in model .net Core 2.2

I want to change the data type of the primary key of a model in ASP.Net core 2.2 from int to long since it is about to run out of the int range. The application was done code-first and uses SQL server as database. Changing the data type in the [...] read more
c#
asp.net-core-mvc
entity-framework-core-2.2
2votes
1answer

EF Core 3.0 SumAsync triggers aggregate function exception

I am in the process of upgrading to EF Core 3.0 and .NET Core 3.0, but some of my queries stopped working. Here is an example: I have a table called Bins, I have another table which is called BinItems, now it has, of course, a one to many relationship. [...] read more
c#
asp.net-core
entity-framework-core
asp.net-core-3.0
ef-core-3.0
2votes
0answers

Altering SQL Server user defined types with default value still enforce me to pass new column

We added a new column to SQL Server user defined table with a default value. So I am expecting the old code to work and use default value but I got an error back from ado.net > System.Data.SqlClient.SqlException (0x80131904): Trying to pass a table-valued parameter with 8 column(s) where the [...] read more
c#
sql-server
2votes
3answers

Scaffold-DbContext "Login Failed" "Error Number:4060,State:1,Class:11"

My ASP.NET MVC core application should connect to an existing MSSQL LocalDB file via Entity Framework. Database-first development requires reverse-engineering the existing database. Following the instructions in the official documentation, I am running the following command in the NuGet Package Manager Console: Scaffold-DbContext "Server=(localdb)\mssqllocaldb;Database=DatabaseName;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models However I am [...] read more
sql-server
asp.net-core
asp.net-core-mvc
entity-framework-core
localdb
2votes
1answer

Why does Entity Framework Core 2.2 C# respond with an error while inserting a new entity with an existing nested entity

I am working on a ASP.NET Core 2.2 project and I am using Entity Framework Core 2.2 as the ORM for accessing an Azure SQL database. I have the following two entities/tables which are related to eachother (One-To-Many relationship). [Table("Users")] public class UserEntity : BaseGuidEntity { .../// other properties [ForeignKey("Language")] [...] read more
c#
.net
sql-server
asp.net-core
entity-framework-core
1vote
0answers

AZURE_KEY_VAULT provider in SSRS

I've recently set up Always Encryption on an on-prem SQL Server db with the column master key in Azure Key Vault. If I SELECT from the table in SSMS with 'Column Encryption Setting=Enabled' I can read the column in plain text so _I'm pretty confident* the encryption is functioning as [...] read more
encryption
azure
visual-studio-2017
ssrs
1vote
2answers

How to find missing permission in MS SQL server

Problem description:I am trying to use SQLDependency on a table of a commercial product (TAC Reservation Assistant). The DB is a large Microsoft SQL 2016 database on which we don't have db_owner rights (only TAC does). I am now trying - together with support staff of TAC - to grant [...] read more
sql-server
1vote
1answer

Dynamic CRM 2011 Import Organization from different locale fails on SQLException

UPDATE : Issue solved, see answer below. I'm struggling with a Dynamic CRM 2011 , when trying to import an existing organization - coming from a customer's Window Domain, not ours. THE SETUP Two servers. * One windows server 2008 r2 x64 Standard (locale fr-FR) for the Front-end, WebApp and [...] read more
microsoft-dynamics-crm
1vote
0answers

Exception when upgrading organization from crm 4 to 2011- invalid column names

In development and QA environments we've upgraded dozens of organizations from dynamics v.4 to v. 2011 without a hitch. Naturally, when we try to upgrade our first prod organization, we run into a previously unseen error during the import process. It seems like the new schema for the 'Organization' table [...] read more
microsoft-dynamics-crm
1vote
1answer

Team Foundation Server (TFS) 2017 Failing to create backup

So we've had backups running for a few years now, and in the last few days it started backing up extra times. I went to reconfigure the backups to verify the settings and got an error saying it can't backup the dummy database. [Info @12:03:50.669] +-+-+-+-+-| Running Confirming Permissions: Confirming [...] read more
team-foundation-server
1vote
0answers

Azure VPN cannot connect to sql server

We have setup our VPN connection in Azure to our on-premises database, the connect is working with no problems. I have written a MVC app that tries to connect to our on-premise database in SQL Server and am getting the following error: System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred [...] read more
azure
azure-sql
azure-networking
1vote
1answer

Install SQL Server 2017 on Windows 10 Azure VM

I have one Azure Windows 10 VM set up as a workstation which has among other things: * Visual Studio 2017 * Python 2.7 * NodeJS * SQL Server 2017 When a coworker created a new Windows 10 VM and went to install SQL Server, he got an error. I [...] read more
sql-server
virtual-machines
azure
windows-10
1vote
0answers

Windows 2012 R2 Azure VM Cannot Connect To Local SQL Server

I created an Azure virtual machine running Windows Server 2012 R2 that I am using as a web server to host a couple different web sites. This is my first time ever doing something like this and I am struggling to get it to work. I installed IIS 8.5 and [...] read more
windows-server-2012-r2
azure
iis-8.5
1vote
0answers

SQL Connection Problems between two servers

I have two Windows Server 2012 R2 servers HOST1 and HOST2. HOST1 has a web application that talks to a SQL Server 2014 instance on HOST2. When pulling larger amounts of data, notably during scheduled integrations, HOST1 encounters errors that cause processes to fail. There problem is always one of [...] read more
networking
windows-server-2012-r2
1vote
2answers

C#/SQL Server: Login failed when connecting from remote machine

I've got an SQL Server 2008 Express set up on one machine and am trying to connect with my C# app to the server from another machine (both Win 7). The server machine has a user account for me in the system. The SQL Server is configured to use Windows [...] read more
windows-7
sql-server-2008
windows
1vote
1answer

what instance name in connection string for Dynamic management Views

I want to run the following query :: SELECT S.* FROM sys.dm_exec_requests S JOIN sys.dm_exec_sessions R ON r.session_id = s.blocking_session_id It works when i run it in SQL Server Console. But I haven't been able to do the same thru code. I am using the following connection string: "Data Source=localhost\\sqlexpress;Initial [...] read more
sql-server-2008
networking
remote-access
1vote
1answer

Powershell Remoting always logs in as anonymous

I need some help in automating deploying some applications on my domain. The deployment process follows this basic flow in a Powers Shell script: 1. Stop services 2. Copy out applications 3. Log into at least 1 remote server and run "\Services\Shipping\ShippingService.exe /deploy" 4. Start services. I'd like to cut [...] read more
active-directory
powershell
1vote
1answer

Inserting a related entity of a related entity not able to populate Foreign Key of Main Parent Entity

I am working with Entity Framework Core 3.0 and am having issues with inserting objects into navigation properties and properly maintaining the Parent Foreign Key. I have 2 Model Classes EntityType.cs public class EntityType { public int TypeId { get; set; } public string Name { get; set; } public [...] read more
c#
entity-framework-core
1vote
1answer

Code First EF Concurrency Token with Guid

I am trying to use a Guid as the concurrency token but everytime I try to insert a record there is an exception about null value not being able to be added. Generated SQL and Exception Message: Failed executing DbCommand (4ms) [Parameters=[@p0='?' (DbType = Guid), @p1='?' (Size = 10) (DbType [...] read more
c#
entity-framework
core
1vote
1answer

How to setup NLog to show sqlexception linenumber in log?

I have a stored procedure which can generate an error. However, NLog writes only text message like that > 16:08:37.7139|ERROR|ConsoleApplication35.Program|System.Data.SqlClient.SqlException (0x80131904): Arithmetic overflow error converting expression to data type int. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) But SqlException also has a LineNumber property How to force NLog to write [...] read more
.net
sql-server
nlog
1vote
2answers

ASP.NET Windows Authentication - Login failed for user 'NT AUTHORITY/ANONYMOUS LOGON'

This is my first web application (ASP.NET MVC), and I'm having issues I hope someone can help me out on. I'm trying to get Windows authentication working, but I keep getting the following error after deploying the project to IIS: > Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. SqlException (0x80131904): [...] read more
sql
asp.net
iis
1vote
0answers

Problem with Identity C# request with Entity Framework 1and1(Ionos)

the queries (list of products etc) to the database works, except the queries with Identity (Authentication) Here is my connection chain: <add name="DefaultOnline" connectionString="metadata=res://*/Models.Model3.csdl|res://*/Models.Model3.ssdl|res://*/Models.Model3.msl;provider=SQLOLEDB.1;provider connection string=&quot;data source=db******.hosting-data.io;initial catalog=db****;User ID=db*****;Password=Kf2Kp57-~;multipleactiveresultsets=false;application name=EntityFramework&quot;" providerName="System.Data.EntityClient" /> And this is example for connection string from MS SQL Ionos: Provider=sqloledb;Data Source=db******.hosting-data.io,1433;Initial Catalog=db*******;User Id=dbo******;Password=*****; [Win32Exception (0x80004005): The [...] read more
sql-server
asp.net-mvc
entity-framework
web-config
connection-string
1vote
2answers

Blazor / Entity Framework Database Login Failure, Suddenly Started Appearing?

There are a lot of related issues referencing similar database error messages, but typically they have to do with folks that are setting up databases in SQL server, but not entirely encapsulated under Blazor/Entity Framework. I've been building a Blazor Web Assembly app which has three projects (Client, Model, Server). [...] read more
sql-server
entity-framework
entity-framework-core
localdb
1vote
3answers

Xamarin SqlServer cant get a connection

Im building with the Entity Framework on xamarin a app where i compare some data. But when im starting my "fetchdata" function i recive the Error: System.Data.SqlClient.SqlException (0x80131904): Snix_Connect (provider: SNI_PN7, error: 35 - SNI_ERROR_35)Snix_Connect (provider: SNI_PN7, error: 35 - SNI_ERROR_35) And now where my hole setup is ready to [...] read more
android
.net
sql-server
xamarin
core
1vote
1answer

Stored Procedures in EF Core 3.0

How to use stored procedures in EF Core 3.0 ? I have tried the following var user = await _context.Query<User>().FromSql("EXECUTE dbo.spGeneral_Authenticate").FirstOrDefaultAsync(); var user = await _context.Query<User>().FromSqlRaw("EXECUTE dbo.spGeneral_Authenticate").FirstOrDefaultAsync(); var user = await _context.Set<User>().FromSql("EXECUTE dbo.spGeneral_Authenticate").FirstOrDefaultAsync(); var user = await _context.Set<User>().FromSqlRaw("EXECUTE dbo.spGeneral_Authenticate").FirstOrDefaultAsync(); EF core translating the SQL in wrong way. I got the [...] read more
.net-core-3.0
ef-core-3.0
1vote
1answer

Server Error in '/' Application. The network name cannot be found

I am working on a Web Application in ASP.NET Framework 4.5. SQLSERVER Database is connected to the project. Everything was working fine, I have completed the project. Before publishing the project I changed the connection string to the online server database. The site was published successfully. To do a few [...] read more
c#
asp.net
sql-server
visual-studio
sql-server-2008
1vote
2answers

Using EF Core to invoke stored procedure and closing connection

I have an ASP.NET Core 2.2 application using EF Core. I have service class which typically use a DbContext for any CRUD operations. However in one of the method (Assign method below) I need to use stored procedure. So I am using the following code. Note that DbContext is injected [...] read more
c#
sql-server
entity-framework-core
ef-core-2.0
ef-core-2.2
1vote
1answer

How to connect to a Sql Server VM via private IP with Azure Website

I have an Azure VM with port 1433 endpoint created. The internal IP is 110.119.38.72. In my Azure Standard Website Web.Config connstring if have: Server=110.119.38.72;Database=MyDB;uid=username;pwd=password; I am getting the error: [Win32Exception (0x80004005): Access is denied] [SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. [...] read more
asp.net-mvc
azure
azure-sql-database
1vote
2answers

Asp.Net Core: There is already an object named 'AspNetRoles' in the database

I created a new Asp.Net Core WebApi project and simply added IdentityDbContext, then i wrote in Nuget Package Console these commands: PM> Add-Migration Initial To undo this action, use Remove-Migration. PM> Update-Database Applying migration '20180516150423_Initial'. Failed executing DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] CREATE TABLE [AspNetRoles] ( [Id] nvarchar(450) NOT NULL, [...] read more
asp.net
database
entity-framework
asp.net-core
1vote
1answer

Xamarin Form: API receives always null data when posting from Xamarin Form after Archiving Android Application

Post Method in Xamarin Forms is shown below, public async Task VerifyMobile(OtpDto otpDto) { _httpClient.BaseAddress = new Uri("https://***.azurewebsites.net"); var jsonData = JsonConvert.SerializeObject(otpDto); var content = new StringContent(jsonData, Encoding.UTF8, "application/json"); HttpResponseMessage response = await _httpClient.PostAsync("api/Auth/VerifyMobile", content); } And API Method is like, [HttpPost] [Route("VerifyMobile")] public async Task<IActionResult> VerifyMobile([FromBody]OtpDto otpDto) { ... [...] read more
xamarin
xamarin.forms
xamarin.android
1vote
1answer

how to backup and restore mdf file in winform C# after deployment project?

I am developing a desktop application in c# visual studio 2013, where I want to create a feature in which a user is allowed to restore and backup the Database by itself. but problem is that it doesn't backup or restore database after deploy project. When I try to Backup [...] read more
c#
sql
winforms
backup
restore
1vote
2answers

Execute Reader wait operation time out error

stuck on this since few days please help. I have tried a lot of solutions like increase connection timeout in web config: below is my error code. Server Error in '/' Application. The wait operation timed out Description: An unhandled exception occurred during the execution of the current web request. [...] read more
c#
sql
asp.net
.net
executereader
1vote
0answers

How to set up SQL Server 2017 for async in-memory session from scratch

I am migrating an application that currently uses in-memory session storage, and as part of that migration, its backing database is being upgraded to SQL Server 2017, so I am keen to replace the in-process session state with Microsoft's new SQL Server async in-memory table support (asp.net session state with [...] read more
asp.net
sql-server-2017
asp.net-session
1vote
1answer

SQL Server Cannot find the object when executing stored procedure from windows service

I am attempting to insert data from an uploaded excel spreadsheet, and I'm getting the following error. > System.Data.SqlClient.SqlException (0x80131904): Cannot find the object "data_import" because it does not exist or you do not have permissions. I can run the stored procedure fine within SSMS, but when attempting to test [...] read more
sql-server
1vote
1answer

Converting One-To-One to a One-To-Many relationship Issues

I'm experiencing some extreme difficulty in changing a one-to-one relationship, to a one-to-many relationship without totally wiping out the database and starting over (which I cannot reasonably do to a production database). Entity Framework 6 with auto migrations enabled (also cannot change this). The original database schema called for a [...] read more
c#
entity-framework
0votes
0answers

Azure Studio connection Error with MS SQL on Linux Mint 19.2

I have MS SQL 2017 running on Linux Mint 19.2. I used "sqlcmd" to verify that it's running, and the reported version is "Microsoft SQL Server 2017 (RTM-CU16) (KB4508218) - 14.0.3223.3 (X64)" However, when I tried connecting to the database server using Azure Studio version 1.10.0 (For Linux) it failed [...] read more
networking
linux-mint
sql-server
0votes
0answers

Failure obtaining db row lock: Execution Timeout Expired What this error describes

Quartz.Impl.AdoJobStore.LockException: Failure obtaining db row lock: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated. ---> System.Data.SqlClient.SqlException: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not [...] read more
database
sql-server
0votes
0answers

We've been using DCN as our best networking app and it crashed can it be fixed?

Server Error in '/' Application. Login failed for user 'DB_A3CF5B_dynamiccircle_admin'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'DB_A3CF5B_dynamiccircle_admin'. Source [...] read more
webserver
0votes
0answers

Cannot Connect From Amazon aws t2.micro windows 2012 instance to Amazon RDS SQL Express 2014

I cannot connect to RDS SQL Server 2014 Express instance from EC2 Windows 2012 server instance. 1. I cannot connect through UDL file, and also not through my asp.net mvc web application. Windows EC2 Instnace ID: i-0fe6390a77605e7f2 Availaibility Zone: us-east-2c RDS SQL Server Instnace ID: tandt-201901-2 RDS SQL Server Zone: [...] read more
windows-server-2012-r2
amazon-ec2
amazon-rds
sql-server-2014
0votes
0answers

Sql Exception 0x80131904 cannot log in

My program connects to a MSSql database. If it connects via LAN it works fine, if it connects from outside I get the error message 0x80131904 Error when logging in the user 'ProgProj'. (translation might not be the same as on the english version. On the german version its like [...] read more
login
ms-sql
0votes
1answer

SQL Login fails for app but not for SSMS

I wrote a simple test application in C# (4.5) which does nothing more than connect to a database and display a message. (Basically just to test the deployment and DB connection.) On my local workstation everything works fine. I installed SQL Express 2012, connect as the current user (integrated security), [...] read more
windows-server-2008
.net-framework
sql-server-express
0votes
2answers

Active Directory SQL Server Random Handshake Timeouts

We've installed active directory on a new server and joined our database server and web servers to this new domain. However, randomly, we'll get the following error. What would be the cause of the handshake timeout error we're sometimes seeing? The fact that it's not ALWAYS happening to me means [...] read more
active-directory
sql-server
0votes
0answers

Unable to connect to a new installation of sql server

I just installed SQL Server on my Windows Server 2012 R2 box. The installation went well but my apps can't connect to it. If I use the public DNS name for the server in the connection string, the stack trace looks like this: > [Win32Exception (0x80004005): Access is denied] [SqlException [...] read more
sql-server
sql
0votes
1answer

Getting Error while calling a UDF function with function name having special character ampersand in NAGIOS

While calling a UDF function in NAGIOS with function name containing ampersand '&', It returns an error > System.Data.SqlClient.SqlException (0x80131904): The multi-part identifier "dbo.udf_tarrif_t&TT" could not be bound read more
sql-server
0votes
1answer

How to get my VM on Azure to allow in My SQL Connection?

I have a Virtual Machine that is running my web api. I have then created a SQL Database through Azure(this db is not on the VM) and I put that connection string in my application. I get this when I try to run it. What do I need to do [...] read more
windows-server-2008-r2
sql-server
virtual-machines
azure
0votes
1answer

Intermittent DB connection failure

Recently I started to see intermittent errors in log files of my web application. Raising from different places of the application the error is always about failed connection to DB which is located on another server: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The [...] read more
windows-server-2008-r2
sql-server
iis-7
iis-7.5
dotnet-framework
0votes
0answers

Delete TFS Project Collection - SqlException

I'm trying to delete a team project collection in TFS 2010. Unfortunately after struggling with some old instances (some that don't even have databases anymore) I get an error even when attempting to delete a brand new instance. I go through the detatch process and get an error during the [...] read more
team-foundation-server
0votes
1answer

How can I troubleshoot an application connecting to SQL Server

I'm trying to get ASP.net StoreFront to Connect to SQL Server Express 2005, on Windows Server 2008. I followed This Microsoft Support article without success. Below is the error. [SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or [...] read more
windows-server-2008
sql-server
sql-server-2005
0votes
2answers

Hosting Website Issue

I have a web project which I want to post in to our company`s hosting server: IIS Vs.6.0. The name of the server which is running our whole websites is: testing.test.com and domain is testing.com I am added as a User in it as myname@testing.com. Now in the IIS Manager [...] read more
hosting
iis-6
asp.net
web-hosting
windows
0votes
0answers

Use a C# method to insert data into a SQL table with a column set as Uniqueidentifier type fails

Having initially tested in Sql the following commandINSERT INTO UserActivationDB (UserId, ActivationCode) VALUES (3,NEWID()) that works perfectly, I have been attempting to adjust a C# method to circumvent an Exception. private void Checkmail(int userId) { string constr = ConfigurationManager.ConnectionStrings["RegisterDB"].ConnectionString; string activationCode = Guid.NewGuid().ToString(); using (SqlConnection con = new SqlConnection(constr)) { [...] read more
c#
sql
methods
sql-insert
uniqueidentifier
0votes
0answers

Problem with Identity(Authentication) C# request with Entity Framework Amazon Elastick BeanStalk and Amazon Rds

I use : .net 4.5 my database : amazon rds Sql server express, my hosting : elastick beanstalk I have problem only when i try connect with identity (authentification) i have message : timeout I have (list product etc) and it works (i see a list a products in my [...] read more
c#
.net
amazon-web-services
entity-framework
asp.net-identity
0votes
0answers

ASP.Net code first project The wait operation timed out

I never thought publishing a website could be so hard. After all the trouble it finally published without errors. However when i run it and trying to use db it times out. Server Error in '/' Application. The wait operation timed out [Win32Exception (0x80004005): The wait operation timed out] [SqlException [...] read more
sql
asp.net
azure
0votes
0answers

SQL Server 2017 login failed by SSL provider

I have ASP.NET Core 2.2 application that is using Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64) Nov 30 2018 12:57:58 Copyright (C) 2017 Microsoft Corporation Standard Edition (64-bit) on Windows Server 2019 Datacenter 10.0 <X64> (Build 17763: ) (Hypervisor) Suddenly application went down for 1 hour yesterday. When [...] read more
sql-server
asp.net-core-2.1
sql-server-2017
ef-core-2.2
0votes
1answer

Issue connecting to SQL Server with new ASP.NET Core application

I've deployed a new .NET Core app to a production web server, and I'm having trouble connecting to a SQL Server database on another server. The web server currently has applications running on ASP.NET web forms and connecting to the database successfully. The application is developed in ASP.NET Core 2.1. [...] read more
sql
asp.net
sql-server
asp.net-core-mvc
0votes
2answers

How to get rid of Exception The statement or function must be executed in the context of a user transaction?

I'm working on asp.net 4.0 web application. On button click at the same moment with different browser, I'm getting this exception. To reproduce the issue I have created multithread and able to reproduce the issue. web application calls wcf service for database activity. > System.Data.SqlClient.SqlException (0x80131904): The statement or function [...] read more
c#
asp.net
sql-server
wcf
0votes
1answer

how to target sql server 2008 with EF Core

Building a razor pages application usign ef core 2.1.1. Development DB server localDB, target SQL server SQL 2008 r2. I get the following error on the target server: > System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near 'OFFSET'. Invalid usage of the option NEXT in the FETCH statement. I suppose the generated SQL [...] read more
ef-core-2.1
0votes
2answers

With Azure, Remote connection to SQL server database through AWS works locally, but not when deployed

Here is the connection string I am using in the webconfig file. <add name="NBAdatabase" connectionString="Data Source=fipsfseed.crgivfdotoce.us-east- 2.rds.amazonaws.com,1433;Initial Catalog=NBAreseeded;User ID=asfsADMIN;Password=645afsw;" providerName="System.Data.SqlClient"/> This works fine locally. However, when I publish it to Azure, I get this error when going to a page that involves a database hit. > [Win32Exception (0x80004005): Access is [...] read more
sql-server
asp.net-mvc
azure
0votes
0answers

Invalid object name 'umbracoLock' error in Umbraco 7

We are running Umbraco 7.15.1. We have experiencing lots of the same db update error log messages. 2019-10-29 07:53:29,921 [P159632/D2/T16] ERROR Umbraco.Web.Strategies.ServerRegistrationEventHandler - Failed to update server record in database. System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'umbracoLock'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) [...] read more
sql-server
umbraco7
petapoco
0votes
1answer

What might cause linked server query to fail when executed using SqlCommand?

Background My C# application is a Windows service which allows a user to configure SQL queries that involve linked servers to move data around similar to an ETL (Extract Transform Load) application. The queries have been tested directly in SSMS and work without any problems. Below is an example query [...] read more
c#
sql
sql-server
linked-server
0votes
1answer

How to integrate an ASP.Net intranet with Active Directory?

I'm currently working on an intranet portal for my company, it will remain internal, only users with accounts on our domain will have access to it. At the moment, I use forms authentication method, and authenticate users against the Active Directory domain with System.DirectoryServices. I also interrogate the AD with [...] read more
asp.net
sql-server
iis
0votes
0answers

How can I make two foreign keys to a single table in Visual Studio EF?

public class Menu { [Key] public int idMenu { get; set; } [MaxLength(30)] public string descripcion { get; set; } } public class DetalleMenu { [Key] public int idDetalleMenu { get; set; } public int MenuID { get; set; } [ForeignKey("MenuID")] public Menu idMenu { get; set; } public int [...] read more
c#
.net
entity-framework
code-first
0votes
0answers

When use TransactionScope get System.Reflection.TargetInvocationException

We are using TransactionScope for the transaction, IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted Timeout = 20 min TransactionScopeOption = TransactionScopeOption.RequiresNew can not understand this exception Exception Message of System.Reflection.TargetInvocationException: > System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Transactions.TransactionException: The operation is not valid for the state of the [...] read more
sql-server
transactionscope
0votes
0answers

How can I use IdentityServer 4 and SQL Server?

I followed http://docs.identityserver.io/en/latest/quickstarts/7_entity_framework.html#database-schema-changes-and-using-ef-migrations to use SQL Server with IdentityServer 4 Getting error while try creating Database, IdentityServer4 > Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'Id', table 'is4aspiddb.dbo.AspNetUserClaims'; column does not allow nulls. UPDATE fails. read more
sql-server
identityserver4
using
0votes
1answer

ConnectionStrings not working when I publish solution

When I publish my project I get this error: > System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'serverusername'. at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString The reason why Im getting the error is cause I'm using windowns authentication for that connectionString. It works well in my local machine but when I publish different server [...] read more
c#
asp.net
sql-server
0votes
0answers

Add-Migration works but I can't update-database with EF Core

When adding the migration, everything goes well (Entity Framework Core 2.2.6-servicing-10079 initialized 'ConsultarDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: None), but when updating-database errors occur that I see no reason to happen I tried to change in the migration itself created some fields, but continued with the same problem. This is [...] read more
c#
.net-core
entity-framework-core
0votes
0answers

Is it possible to use EF Core 3 FromSqlRaw to create new object list

I am working on a query with linq that uses a DbSet with FromSqlRaw. I am trying to get a different object list. var habitaciones = await _context.HabitacionDisponibilidad .FromSqlRaw("pg_get_habitacionDisponibles {0},{1},{2},{3},{4},{5}", edificio.EdificioId, sm.Huespedes, sm.FechaInicial, sm.FechaFinal, EstatusDisponibilidad.Disponible, cantidadNoches) .Select(p => new HabitacionDisponible { EdificioId = p.EdificioId, HabitacionDisponibilidadId = p.HabitacionDisponibilidadId, HabitacionId = p.HabitacionId, [...] read more
linq
ef-core-3.0
0votes
1answer

How to connect to a SQL Server instance with C# using Visual Studio

I am unable to connect to SQL Servers that have the '\' char which is used when connecting to a server instance. Any other type of server works without any issues. Any support or resource on this issue would be extremely helpful as I have exhausted my possible solutions. Thanks! [...] read more
c#
sql
sql-server
visual-studio
0votes
0answers

while scaffolding-DbContext from Azure database storage

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) After installing EntityFrameworkCore I am trying to scaffold the DbContext from the database deployed on Azure storage. I don't [...] read more
asp.net-core-scaffolding
0votes
0answers

Entity Framework Core 2.2.4 Duplicate insertion DbUpdateException deleted the original record. Is this even possible?

When a duplicate insert exception occurs, I found the original row got deleted when the illegal insertion tried to occur due to some bug in our code. Is this happening because of using the DeleteBehavior.ClientSetNull action? What am I missing here? Nowhere in the code are we deleting records - [...] read more
c#
entity-framework-core
0votes
1answer

ASP.NET Storing TimeSpan in EF Database

I am trying to store timespan objects in a EF Sql Database as: public class Test { [Required, Key] public int TestId { get; set; } public TimeSpan Time { get; set; } } modelBuilder.Entity<Test>().HasData( new Test {TestId = 1, Time = TimeSpan.FromDays(5)} ) But I get the error: System.Data.SqlClient.SqlException [...] read more
asp.net
entity-framework
0votes
0answers

ASP.NET [SqlException (0x80131904): Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.] Error

I am newby in asp.net. I want to develop basic website on server which contains 2 gridview(Getting data from SQL) for listing information. When i debug my project on server it is working(mysite/default.aspx) but without on server my site is not working and get error as follows; What is the [...] read more
sql
asp.net
authentication
0votes
1answer

Error while connecting to asp.net MSSQL database on godaddy server

I bought a windows "ultimate shared hosting" from godaddy. I've uploaded all the files that are required, the site works. When I created a database on myLittleAdmin and got the connection string from it. I put that connection string to my web.config file which is hosted on godaddy, but gives [...] read more
c#
asp.net
sql-server
shared-hosting
0votes
1answer

SharePoint 2010 Web Part Error - Exception from HRESULT: 0x80131904

A client of ours recently encountered a problem with a web part I wrote a while back. This web part is an advanced search which returns results based on information entered into a text box and the criteria selected from a drop down. This web part has been functional on [...] read more
c#
sharepoint
sharepoint-2010
0votes
1answer

EF Core DeleteBehavior.Cascade may cause cycles or multiple cascade paths

I have the following entities (which are reduced for brevity); public class Trader : AuditableEntity { public int? UserId { get; set; } public ApplicationUser User { get; set; } public int? AccountManagerId { get; set; } public ApplicationUser AccountManager { get; set; } public List<TraderContactHistory> ContactHistory { get; set; [...] read more
entity-framework
entity-framework-core
0votes
0answers

How to keep a Winforms application installed in various PCs always connected to a database in SQL server express

I have created a Winforms application and I installed it on 6 different PCs within the same network. However, everything works fine for the most part, but sometimes all of a sudden, they stop communicating with the SQL server. The exception the application throws is ErrorSystem.Data.SqlClient.SqlException (0x80131904): A Network-related or [...] read more
c#
sql-server
winforms
sql-server-express
0votes
0answers

The parameter is incorrect, SqlException (0x80131904)

I'm trying to upload my ASP.NET MVC project to my website, I managed to upload it via "Publish" option in Visual studio, and then, I opened a database on GoDaddy's website using Plesk ( both my host and the database is on GoDaddy ), and trying to change the web.config [...] read more
c#
asp.net
asp.net-mvc-4
0votes
1answer

SQL Server: A connection was successfully established with the server, but then an error occurred during the login process

Our application sometimes throws out this error: > System.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - An existing connection was forcibly closed by the remote host.) ---> System.ComponentModel.Win32Exception (10054): An existing connection was [...] read more
sql
.net
sql-server
.net-core
0votes
1answer

Why is SQL Server using a different user to create the session?

I am trying to connect to SQL Server database from a .NET Core web application, here is the connection string I am using: Server =.; Database = DBNAME; User Id = tb; Password = pass; Trusted_Connection = True; MultipleActiveResultSets = True;. The previous setup generates an exception: > An error [...] read more
c#
sql-server
asp.net-core
ado.net
entity-framework-core
0votes
1answer

Tutorial ASP.NET Core Identity: Cannot generate create database

I am using Visual Studio 2019 Version 16.4.0 Preview 1.0, .NET Core 3.0 . I follow this tutorial https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity?view=aspnetcore-3.0&tabs=visual-studio#create-a-web-app-with-authentication In CMD, I create localdb Microsoft Windows [Version 10.0.17134.1006] (c) 2018 Microsoft Corporation. All rights reserved. C:\Users\xxxxxxx>sqllocaldb create "v13.0" LocalDB instance "v13.0" created with version 13.1.4001.0. C:\Users\xxxxxxx> error PM> Update-Database Microsoft.EntityFrameworkCore.Infrastructure[10403] [...] read more
asp.net-core
entity-framework-core
asp.net-core-identity
asp.net-core-3.0
0votes
1answer

Hangfire doesn't create tables in IIS

I have installed Hangfire in my ASP.Core 2.2 project using this guide https://docs.hangfire.io/en/latest/getting-started/aspnet-core-applications.html . When I delete my MyProject_devMSSQL db and run Update-Database only my custom tables are created. After I run the project, the Hangfire tables are added. In appsettings.production.json I have configured the db to be MyProject_prod and [...] read more
sql-server
asp.net-core
hangfire
0votes
1answer

How to fix " A network-related or instance-specific error occurred while establishing a connection to SQL Server" error in ASP.NET

I published my site on plesk, in login form when I enter username and password I get error. I should say that my login form is based on asp.net configuration and roles and users are set there. > System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection [...] read more
asp.net
sql-server
plesk
0votes
1answer

Getting a failure to connect to SQL Server in process request

I have an ASP.NET application that is providing a logon page for an application. It's written in C#. The application is using forms authentication and Active Directory to do the authentication. When I click on the logon button, it goes back through the page_load method and then throws the following [...] read more
c#
asp.net
sql-server
forms-authentication
0votes
1answer

Installation is getting failed while installing MSSQL cluster in Kubernetes setup (Ubuntu-18.04)

I am facing the below error while installing MSSQL cluster in Kubernetes setup. Error: Starting cluster deployment. Cluster controller endpoint is available at XX.XX.XX.XX:30080. Cluster control plane is ready. [Request 112e9901-602d-4400-89cf-203df5db34f1] Cluster mssql-cluster does not exist. Data pool resources cleanup failed System.Data.SqlClient.SqlException (0x80131904): A transport-level error has occurred when receiving [...] read more
sql-server
docker
kubernetes
0votes
1answer

Can't access LocalDB on other computers, through application

I have made an application which uses a LocalDB, to refer to some predefined values as part of some mathematics that it does. I have created an Installer project so that when the application gets installed, a copy of the DB is sent to [ProgramData][ProductName], which is mapped as the [...] read more
c#
sql-server
localdb
sqlexception
programdata
0votes
0answers

Ef core foreign key violation but the key exists and it is filled when the entity is added

I have a problem with Entity framework core. The problem is, that i'm trying to add a Booking. The booking has a list of orders, and a order has a foreign key to a supplier. When i insert, i get a foreign key violation even though the id is filled. [...] read more
c#
asp.net-core
entity-framework-core
0votes
0answers

Trouble connecting to DB in .NET Core app while following tutorial

Ok, here's my issue. I'm following the tutorial here: https://docs.microsoft.com/en-us/aspnet/core/data/ef-rp/intro?view=aspnetcore-2.2&tabs=visual-studio And when I get to the section where you first test the app, I get a connection error for my database. I haven't touched the connection string (the tutorial doesn't say to). But the error I get is this (through [...] read more
.net-core
0votes
1answer

Can post to server DB from localhost, but when published to server I get "error: 52 - Unable to locate a Local Database Runtime installation."

I have a simple web app that interacts with a Microsoft SQL Server 2016 Standard Edition that is hosted on it's own server, in the same environment. When I run the app locally, it connects just fine and posts to the DB with no problem. After I published the app [...] read more
asp.net
sql-server
asp.net-mvc
sql-server-2016
0votes
0answers

DNN Error: DotNetNuke.Site ExportImport Installation failed while upgrade CMS from versions 9.1 to 9.3

I am getting this error message when upgrading site from 9.1 to 9.3.1. Can Does someone suggest how to get rid of this error? StartJob Starting Installation Info Starting Installation - SiteExportImport Info Starting Installation - Assembly Info Assembly already registered - bin\DotNetNuke.SiteExportImport.dll Info Creating backup of previous version - [...] read more
dotnetnuke
dotnetnuke-9
0votes
1answer

Can't connect to docker sql server from NET Core 2.2 Web API

While collecting knowledge of coding .NET Core Web API in combination with docker, I came across an error that I can't solve. I already did research on the internet, but somehow none of the provided solutions worked for me. I have a web service called Catalog.API (similar to the eShopOnContainers [...] read more
c#
sql-server
docker
asp.net-core
asp.net-core-webapi
0votes
1answer

What's the best way to upgrade from umbraco 7.6 to 7.15.1 (including db upgrade)

I am trying to upgrade the site from v 7.6 to v. 7.15.1. I have done the upgrade on localhost which included updating the db. Now I transferred my files from localhost o the test site and on there I am getting an error in log: ERROR Umbraco.Core.UmbracoApplicationBase - An [...] read more
upgrade
umbraco7
0votes
0answers

Azure SQL user and connection string for Asp.Net MVC EF web app

I have an Asp.Net MVC webapp and I get the following error when I try to create a new Azure SQL user for the DefaultConnection. > [SqlException (0x80131904): Login failed for user 'myNewSQLuser'.] On SQL Server Object Explorer I connected to the master database using the Server Admin login and [...] read more
asp.net-mvc
entity-framework-6
azure-sql-database
0votes
0answers

EF core 2 ASP.NET intermittent network errors

I have a EF Core 2 Dbcontext injected in the usual way into all Controllers of a Web API: services.AddDbContext<KpiContext>(options => options.UseSqlServer(config.ConnectionStrings.KpiDB, providerOptions => providerOptions.EnableRetryOnFailure())); This is injected into controllers in the standard way as, say, kpidband then it's passed to a static method which does this: somestaticmethod(KpiContext kpidb) { [...] read more
c#
asp.net
entity-framework-core
0votes
0answers

Timeout error when installing latest stable release of 2SXC module

When I try to install the latest release of 2SXC I get the following error. Anyone come across this before? Anyone know how to fix it? I am trying to run the latest DNN on Azure. StartJob Starting Installation Info Starting Installation - 2SexyContent Info Starting Installation - Script Info [...] read more
module
dotnetnuke
2sxc
0votes
0answers

SQL Server DbCommand Timeout with .Net Core container under load

I'm running a .Net Core container on Open Shift Enterprise V3 pointing to a SQL Server database. I have a .Net Core REST API with a put method which adds or updates a record in the database. The table I am adding/updating had 3000 records and has indexes. This works [...] read more
sql-server
asp.net-core
entity-framework-core
containers
0votes
0answers

Connection issues with Azure SQL Hybrid to local SQL Server

I have an App Service installed on Azure. I try to write data in a local SQL server database (through ADO.Net commands). The sql server has a hybrid connection installed and configured. The status of the connection is "connected". The SQL user can connect and write data through SQL Management [...] read more
sql-server-2014
azure-hybrid-connections
windows-server-2019
0votes
0answers

How to fix: 'After MS SQL Server restart alipne .net core 2.2.5 container wich use it has one CLOSE_WAIT tcp connection - CPU of dotnet rise'

I have problem with App that is hosted on official asp-dotnet-core-alipne container and SQL Server on other server. After restart server on wich we have SQL , conainers gets high CPU and some internal thread hangs. Helps only restart of container. We investigated that there are some tcp connection in [...] read more
c#
sql
docker
.net-core
alpine
0votes
1answer

EF Core Migration Failure: Error Number:4902,State:1,Class:16

I recently rolled back an EF Core migration, which deleted an existing database table, called the "Tag" table, with a Foreign Key to a "Subject" table. The "Subject" table has a one to many relationship with a "Tag" table. One Subject has many Tags. When attempting to "update-database" to re-establish [...] read more
c#
razor
entity-framework-core
0votes
1answer

Microservice cannot connect to database

I'm trying to learn microservices with docker and have a lot of trouble with that. docker-compose: version: "3.2" networks: frontend: backend: services: catalog: build: context: .\src\Services\ProductCatalogApi dockerfile: Dockerfile image: microservices-v1.0.0 environment: - DatabaseServer=mssqlserver - DatabaseName=CatalogDb - DatabaseUser=sa - DatabaseUserPassword=ProductApi(!) container_name: catalogapi ports: - "5000:80" networks: - backend - frontend depends_on: [...] read more
asp.net
sql-server
docker
docker-compose
0votes
1answer

Refreshing Azure Active Directory access token in ASP.NET Core with dependency injection for SQL Database

I have an ASP.NET Core website (with Razor pages) that is using an Azure SQL Database with Entity Framework Core. I create the database context in the Startup.cs for dependency injection. The tricky part is that I'm using Azure Active Directory authentication against the database with Managed Identity from my [...] read more
c#
azure
asp.net-core
entity-framework-core
azure-sql-database
0votes
0answers

dotnet ef database update not working for specific migation

I am working on dotnet core developing a WebApi and have the following project structure in my VS Solution: Solution Project |-Project.Data |-Project.Entities |-Project.WebApi |-Project.WebApi.Test Inside the Project.Data, I have the migrations folder with the initial files that were created when enabling, adding and updating the DB the first time. [...] read more
c#
.net-core
ef-code-first
ef-core-2.0
ef-core-2.1
-1votes
1answer

Error in job agent when running a package in SSISDB catalog (SQL Server)

I created a simple package in visual studio. Then I deployed this package in SSISDB catalog which is on a different server. I am using Job agent to execute this package with a proxy account. But I am getting this error in Job Agent: "Excuted as user: *\test**. Microsoft (R) [...] read more
sql-server
ssis
-1votes
1answer

ASP Application on IIS crash

ASP application always hangs and didn't work on IIS during rush hours connections Also other scripts like PHP are working properly on IIS. The problem only with ASP. I'm receiving this error when i'm trying to open the ASP script. ================================================================ Server Error in '/' Application. Timeout expired. The timeout [...] read more
windows-server-2008
iis-7
asp.net
-1votes
2answers

"Cannot insert explicit value for identity column in table" when inserting object with EF Core

I am trying to insert a new row to my table, using EF Core, SQL Server and C#, but I am having trouble getting EF Core to use the identity column properly. Here's what I am doing: I am creating a new object using the Entity Framework generated class (I've [...] read more
c#
sql-server
entity-framework
entity-framework-core
-1votes
2answers

System.Data.SqlClient.SqlException (0x80131904) when trying to send data to Database

Hello everyone this is the code i wrote in order to get the data from a simple form and import it into my DataBase: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.Sql; using System.Data.SqlClient; using System.Data; public partial class Default2 : System.Web.UI.Page { protected [...] read more
c#
sql-server
ado.net
-2votes
1answer

Why do im receving the Cors Error :...has been blocked by CORS policy

Why I still face this error > Access to XMLHttpRequest at 'http://localhost:21063/api/clints' from origin ' http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. even though I enabled it in my asp.net core web apiStartup.cs services.AddCors(options => { options.AddPolicy("enableCors", builder => { builder.WithOrigins("http://localhost:4200") [...] read more
angular
asp.net-core
cors
-2votes
2answers

Cannot launch my asp.net core application in Production

I have a Windows Server 2016 VM environment I just deployed a .NET Core application to. I cannot launch the application in my production environment. Initially the error I was getting was around port 5000 being in use, and Kestrel not being able to use the port. I went back [...] read more
sql-server
asp.net-core
ssl-certificate
-3votes
1answer

(0x80131904): Login Failure

I am setting up a simple server, and am having some connection issues. I know that there are others who have posted on this but I still cannot figure it out. using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; namespace DormWeb { public partial [...] read more
c#
sql
azure
azure-sql-database
-3votes
1answer

ConnectionFactory creating too many connections from .net core registered service

I have inserted a connection factory based LinqToDB service in the .Net Core. Startup.cs services.AddScoped<IDatabase, Database>( provider => { IConfigurationSection sqlConfig = Configuration.GetSection("Database"); IDataProvider dataProvider = new SqlServerDataProvider("SqlServer", SqlServerVersion.v2008); return new Database(dataProvider, new WorkspaceConnectionFactory( sqlConfig["clientId"], sqlConfig["clientSecret"], sqlConfig["authority"], sqlConfig["target"], sqlConfig["connectionString"]).createConnection()); }); with this implementation of factory namespace Workspace.Common.LinqToDB { public class [...] read more
c#
asp.net-core
azure-sql-database
dbconnectionfactory

Comments

Leave a comment

(plain text only)

Sources

  1. https://github.com/dotnet/coreclr/blob/v1.1.0/src/inc/corerror.xml
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx
  3. winerror.h from Windows SDK 10.0.14393.0

User contributions licensed under CC BY-SA 3.0