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

335votes
21answers

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
225votes
8answers

"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
119votes
25answers

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
entity-framework-migrations
87votes
8answers

Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'

I am using WinHost.com to host my site. The SQL Database/membership system works perfectly on my local computer, but when uploaded to the server it doesn't work. I've followed all steps correctly. And I have contacted support for my service but it's been over 2weeks and no reply. I keep [...] read more
sql
sql-server
stored-procedures
68votes
20answers

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
54votes
11answers

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
40votes
11answers

The network path was not found

I'm running my code and getting this error. But what does it mean? > The network path was not found 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 [...] read more
.net
database
networking
33votes
12answers

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 'DOMAIN\NAME-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
22votes
7answers

Paging with Entity Framework 7 and SQL Server 2008

I'm trying to use paging (that is .Skip(...).Take(...) in Entity Framework 7. It works OK with Microsoft SQL Server 2012 and 2014, but fails with the following error on SQL Server 2008: > System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near 'OFFSET'. Invalid usage of the option NEXT in the FETCH statement. I've [...] read more
asp.net-mvc
sql-server-2008
paging
entity-framework-core
9votes
5answers

How to wait for MSSQL in Docker Compose?

I have a service (an ASP.NET Core Web application) that depends on MSSQL. The services are orchestrated using Docker compose, and I want docker compose to first start the database and wait for it to be ready before running my service. For that, I am defining the docker-compose.yml as: version: [...] read more
c#
sql-server
docker
asp.net-core
docker-compose
7votes
0answers

How to fix: 'After MS SQL Server restart alipne .net core 2.2.5 container which 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 which we have SQL, containers gets high CPU and some internal thread hangs. Helps only restart of container. We investigated that there are some tcp connection in state [...] read more
c#
sql
docker
.net-core
alpine
6votes
7answers

How to get Guid from SqlDataReader uniqueidentifier

SQL Server 2008 (version 10.50.2550). I have a select query to return a single column of type uniqueidentifier. I want to get this into a C# variable of type Guid. All of the following methods result in exceptions. reader is of type SqlDataReader. using (var reader = command.ExecuteReader()) { if [...] read more
c#
sql-server
sql-server-2008
data-migration
6votes
3answers

.NET Core API can't connect to database via docker-compose

I'm developing a .NET core web API with a MSSQL Server database. I tried to containerize this into a Docker container and use Docker Compose to spin up this service. But my API cannot connect to the database. The following error occurs: > Application startup exception: System.Data.SqlClient.SqlException (0x80131904): A network-related [...] read more
sql-server
docker
.net-core
docker-compose
containers
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
3answers

EF Core 2 tries to create same table twice

I have a project using EF Core 2. I created a migration. When running the migration it returns with the following error: infoinfo: System.Data.SqlClient.SqlException (0x80131904): There is already an object named 'Clients' in the database. 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) at [...] read more
entity-framework
entity-framework-core
4votes
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
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
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
4votes
2answers

How to solve 'Cannot authenticate using Kerberos' issue doing EF Core database scaffolding in Linux(Ubuntu 18.04)? Are there any solutions?

everyone. I've been trying to develop simple starting AspNetCore application with EntityFrameworkCore to connect and work with MS SQL server database. And manage all this by Rider IDE, tool for Database client(DBeaver) and dotnet command line interface(dotnet ef). I'm using database first approach(create database on mssql server, fill it with [...] read more
asp.net-mvc
ubuntu
kerberos
sql-server-2017
ef-core-3.0
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
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
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
entity-framework-migrations
3votes
2answers

The MARS TDS header contained errors - ASP.NET Core + EF Core 2.1.4 + Azure SQL Server

I have an ASP.NET Core app [Microsoft.AspNetCore.App 2.1.4] with EF Core 2.1.4 [DbContext pooling enabled] and data stored on an Azure SQL database. Occasinaly [once in 1-2 days] I get unrecoverable error stating System.Data.SqlClient.SqlException (0x80131904): The incoming tabular data stream (TDS) protocol stream is incorrect. The MARS TDS header contained [...] read more
sql-server
asp.net-core
azure-sql-database
entity-framework-core
2votes
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
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
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

Dynamics CRM 2011 Import Organization from different locale fails on SQLException

I'm struggling with a Dynamics 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 all * One Windows server 2008 r2 [...] 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
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
2answers

EF Core Code-First Migration Changing Primary Key from Int to Long Failed

I'm using Dotnet Core 3.1 with Entity Framework Core 3.1.3 using Code-First with Azure SQL Database. During the development, I want to change the Primary Key of a table from int to long from the Model class in dotnet core project and use add-migration. However, when using Update-Database, there are [...] read more
.net-core
entity-framework-core
azure-sql-database
1vote
1answer

Dapper - find items in list that are not in table

I have a list of IDs (dynamically generated), and I want to find which of them do not exist in a table. I'm using Dapper and Microsoft SQL Server. Dapper allows IEnumerable parameters to be passed into queries and used as variables, which is nice, but I can't seem to [...] read more
c#
sql-server
dapper
1vote
0answers

Deleting row from file table using LINQ in .NET Core 3.1

I have an SQL Server with FILESTREAM enabled and a file table populated with a number of rows. I want to be able to delete a selected row from this table using LINQ in .NET Core 3.1. In my infrastructure layer, I have implemented the following: public async Task<bool> DeleteReport(Guid [...] read more
linq
asp.net-core
filestream
filetable
1vote
3answers

Why can't I add WORKGROUP\.. as a user in SQL Server?

Backstory: I've spent over 20 hours trying to connection to my Sql Server database through my Windows Service and every time I fix exception I find another. As a test I have protected override void OnStart(string[] args) { EventLog.WriteEntry(ServiceName + " started"); PageLoadTimer.Enabled = true; using(var conn = new SqlConnection("Data [...] read more
c#
.net
sql-server
windows
1vote
1answer

Asp.net core in docker Unhandled exception. SqlException (0x80131904): .., but then an error occurred during the pre-login handshake

I'm getting the error "Unhandled exception. Microsoft.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - Unknown error 203)" when I start asp.net core application container using docker-compose in CI/CD flow from gitlab (self-hosted) runner [...] read more
sql-server
asp.net-core
docker-compose
entity-framework-core
gitlab-ci
1vote
1answer

Getting SqlException and ObjectDisposedException in Asp.net core 5 webapi

I have a repository for albums table (album entity) and I do filtering and paging in repository as you see: public IQueryable<Album> GetAllAlbums(AlbumQueryParameters queryParameters) { var albums = _cache.Get<IQueryable<Album>>("_AllAlbums"); if(albums == null){ albums = _context.Albums; _cache.Set<IQueryable<Album>>("_AllAlbums", albums, ApplicationDefaults.MemoryCachingOption); } if(queryParameters.ArtistId != null) { albums = albums.Include(a => a.ArtistToAlbums) .SelectMany(a => [...] read more
c#
asp.net-core
asp.net-web-api
entity-framework-core
1vote
3answers

Violation of PRIMARY KEY constraint 'PK_XY'. Cannot insert duplicate key in object 'dbo.XY'

Using EF Core, I have a Zone that can have multiple Sol (soils), same Sol can be attached to multiple Zone: public class Sol { // ... public ICollection<Zone> Zones { get; set; } = new List<Zone>(); } public class Zone { // ... public ICollection<Sol> Sols { get; set; [...] read more
c#
.net
entity-framework-core
ef-core-5.0
1vote
1answer

Attempts to open an SQL Connection to a database on a local drive result in System.Data.SqlClient.SqlException

I am working in Visual Studio (2019 V 16.8.4) using c#. All components are up-to-date. Working within a newly created "Windows Forms App (.Net Framework)" project, I am trying to create a simple database (which I successfully generated in VS) and access it through a single V.S. form that has [...] read more
c#
.net
sql-server
windows
1vote
0answers

Entity Framework tries to create database on production server while it already exists

I have developed a an Api web Application which users entity framework as an ORM. Recently our production server has changed and we moved our application. we have already restored the database on server and set the connection string Integrated Security to false. we have provided the username and password [...] read more
asp.net-mvc
entity-framework
production
1vote
0answers

IdentityServer4: Failed to retrieve access token, An error was encountered while handling the remote login

I'm trying to build a basic project using IdentityServer authentication. The past days I've been picking up bits and pieces from everywhere, but mostly from FullStackMarc. At the moment I'm able to get to the point where the Client-application requests a token from the IdentityServer. Then IdentityServer redirects to the [...] read more
oauth
identityserver4
asp.net-core-3.1
1vote
1answer

Entity Framework Core: Unable to catch SqlException

I'm trying to implement some optimistic locking when inserting rows into a database table. What I'm trying to do is, acquire a row from the database. If a row with given key does not exist, it is inserted first. I'm currently testing this for high concurrency scenarios. The idea is: [...] read more
c#
asp.net-core
entity-framework-core
asp.net-core-signalr
1vote
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
1vote
1answer

'Procedure Has Too Many Arguments' Error Although I Have Only Two

I checked the other posts related to this problem but could not find any answers. I have a post action method for my hotel api and in the Hotel Repository I have this CreateHotel method below. I just enter two arguments and there's two arguments in the stored procedure too [...] read more
c#
sql
.net
sql-server
dapper
1vote
3answers

Uploading large file to Azure db gives error (ASP.NET website)

I created a simple asp.net website. There's only 1 page, with a file upload control and an upload button. This is how it's supposed to work: When the user browses to the file and clicks upload it will save the actual file to a new record in my AZURE database. [...] read more
c#
asp.net
vb.net
azure
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

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
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

How to identify the address, port and protocol of an encrypted connection string, used in a MVC application on Windows Server?

We have a client that has recently migrated to our servers but they don't have access to their website programmer. The Application is based on dotNet MVC and Microsoft SQL Server. after restoring website on our Windows 2016 Server with MS SQL 2017 installed on local host, we encounter an [...] read more
windows
sql-server
windows-server-2016
asp.net-mvc
database-connection
0votes
0answers

An error occurred using the connection to database 'myDb' on server 'tcp:xx.xxx.xxx.xx'. SQLServer - Google Cloud

I'm having a problem deploying my app. The error, below, says that there is an error connecting to the database. Here is my connection string: "Server=tcp:'sql server public IP';Database=MyDB;User Id=sqlserver;Password=passwd" The strange thing is that, when I connect through my local computer, adding a firewall rule, everything is ok, but [...] read more
sql-server
cloud
google
database-connection
0votes
2answers

Network Exception thrown after session timeout

My site will run fine and I can go through the entire site, but after my session times out, when I make another request to a page I get this exception: Server Error in '/' Application. The system cannot find the file specified Description: An un-handled exception occurred during the [...] read more
networking
database
web-applications
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
1answer

ABP.IO How to change DbTablePrefix for all Modules

Sorry, I can't ask a question on Changing table prefix and schema of ABP.IO so I am creating another. In the documentation for ABP.IO it mentions changing table schemas ( https://docs.abp.io/en/abp/latest/Entity-Framework-Core-Migrations), I've also looked at the git issue (https://github.com/abpframework/abp/issues/1429) referring to the addition of the AbpCommonDbProperties and the comment about [...] read more
database
schema
customization
abp
0votes
1answer

Introducing FOREIGN KEY constraint 'FK_Jobs_AspNetUsers_UserId' on table 'Jobs' may cause cycles or multiple cascade paths

I have the following entities in my project, and I get an error when trying to update my database(SQL Server). I have looked around stack overflow, seen some people having the exact same problem as me, but when I try their fixes, I still get the same error. I have [...] read more
c#
asp.net-core
.net-core
entity-framework-core
0votes
0answers

Azure cannot log in SQL server

I would like connect to SQL server via Azure Data Studio. But when was trying do that i get some error : Microsoft.Data.SqlClient.SqlException (0x80131904): > A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the [...] read more
sql
sql-server
azure
0votes
0answers

SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified While Code First Migrations

Environment Information: Main System: Mac Book Air 2013 Running My Window 8.1 on Parallel Desktop Visual Studio 2019 SSMS 2017 So basically I am running my window on parallel desktop in mac machine. I am building asp.net mvc web application using code first approach. When I initiate the process of [...] read more
c#
.net
sql-server
macos
entity-framework
0votes
0answers

Deleting foreign keys by fluent Nhibernate

I have a problem inserting data into the table after deleting data. It works the first time or if I restart the app then it works. public class SingleTestCycle { public virtual int Id { get; protected set; } public virtual int OpeningTime { get; set; } ... public virtual [...] read more
fluent-nhibernate
0votes
1answer

Violation of PRIMARY KEY constraint in Entity Framework Core

I have a .NET5 Blazor Server application using EFCore5. I have two entities that have a many-to-many relationship with each other. Let's call them 'Books' and 'Tags'. EFCore provides the BookTag join table. On my page, I have a form that is populated with the book details and has a [...] read more
c#
entity-framework
blazor-server-side
.net-5
ef-core-5.0
0votes
1answer

Elastic Watcher not returning results

I am trying to simulate a watch and see if the actions are triggering fine. But my problem is the search returns no results. My query 1. Checks for a particular index. 2. Checks for a range 3. Check for the servicename field to be a particular value. This is [...] read more
elasticsearch
kibana
elasticsearch-watcher
0votes
1answer

The network path was not found error message

I am trying to deploy my site through Filezilla. I've created database in sql server 2012 and connect my visual studio with sql server. When I run it on local server it works fine, I can easily sign in and sign out but when I deploy it on web it [...] read more
c#
html
asp.net
0votes
1answer

I am trying to create a Login website by Connecting Database to Registration Page

protected void Page_Load(object sender, EventArgs e) { if(IsPostBack) { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["registrationConnectionString"].ConnectionString); con.Open(); string checkuser = "select count(*) from Table1 where UserName=' " + TextBoxUN.Text + "'"; SqlCommand com = new SqlCommand(checkuser, con); int temp = Convert.ToInt32(com.ExecuteScalar().ToString()); if(temp==1) { Response.Write("user already exists"); } con.Close(); } } protected void [...] read more
c#
asp.net
0votes
0answers

SqlException (Timeout) when reading data with EF Core while writing data with Dapper

We are having a quite large ASP.NET Core 2.0 application which uses dapper to write data and EF Core to read data. This decision was made some years ago due to performance issues when writing data with EF Core. The following sample code is used to write data: using (var [...] read more
c#
sql-server
asp.net-core-2.0
dapper
ef-core-2.2
0votes
2answers

Entity Framework force id[key] insert

I have json data with Ids, my goal is to take the json data and insert into database using Entity Framework, with the same id set as I'm using them as a foreign key in different table. But the problem is I'm getting error > Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert explicit [...] read more
c#
.net
sql-server
entity-framework
0votes
0answers

Error connecting to SQL Server from ASP.NET Core

I'm using this tutorial to create ASP.NET Core Web API CRUD https://www.codaffection.com/asp-net-core-article/angular-crud-with-asp-net-core-web-api/#Setup_Database I'm trying to run the command Update-Database but keep getting this error: Build started... Build succeeded. > Microsoft.Data.SqlClient.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
sql-server
asp.net-core
0votes
0answers

EntityFramework Core different queries between environments

I'm running a very simple database entity update using EntityFrameworkCore.SqlServer v 5.0.2 but I'm getting a weird behavior... On my local environment the update query is working just fine, but when I switch the environment to Production I get an exception. I debugged further and realized that in production EntityFramework [...] read more
c#
entity-framework
entity-framework-core
0votes
0answers

Docker Windows Container API with EFCore connecting to microsoft/mssql-server-windows-developer container

Fact 1. I've got 2 windows containers for: 1. MSSQL Server Developer Edition (microsoft/mssql-server-windows-developer) 2. Asp.Net Core API 5.0 (5.0.102) (solomiosisante/consequence:api) Fact 2. No problem accessing the SQLServer container data from Management Studio (SSMS). Fact 3. No problem when I run the API project from Visual Studio accessing the SQLServer [...] read more
asp.net
sql-server
docker
entity-framework-core
.net-5
0votes
2answers

How can I make a migration with a new field that will be dynamically populated, for example by multiplying two other already existing fields in EF

I have entity ProductItem and the database is already updated by migration with this template: public class ProductItem { public ProductItem() { Price = 0; Discount = 0; } public string Name { get; set; } public double Price { get; set; } public int Discount { get; set; } [...] read more
c#
sql-server
entity-framework
entity-framework-migrations
0votes
0answers

Cannot create PostgreSQL database in Ubuntu by using azure data studio

I cannot create PostgreSQL database in ubuntu by using azure data studio although I install PostgreSQL extension. The error: > Microsoft.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is [...] read more
database
postgresql
azure-data-studio
0votes
0answers

Asp.net core SqlException on Digital Ocean Linux Server

I am developing an Asp.net core application and deploying it to a Digital Ocean Linux Server Droplet. I have manually installed Sql Server 2019 Express (free). All works fine, but overnight something seems to be happening, and the next day when I try to access my application from the browser [...] read more
asp.net
sql-server
asp.net-core
entity-framework-core
digital-ocean
0votes
1answer

Deploying SQL Server database with dbup on Docker

At our company we use a couple methods of updating database models. we use sqlproj and dacpacs as well as we have a .net core app using DbUp. I have successfully containerized using dacpac based of this article automating-sql-server-2019-docker-deployments Now I am working on Db Up. There are a few [...] read more
sql-server
linux
docker
docker-compose
dbup
0votes
1answer

how to change auto increment int to guid

How do I change my data type for my auto-increment int to a GUID? I'm attempting to change the data type of my pk defined like so: [Id] INT IDENTITY (1, 1) NOT NULL ...to a guid. In my model, I've simply changed the data type enter image description here [...] read more
c#
.net
entity-framework
entity-framework-6
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

Specified username in connection string gets replaced at runtime

I have a web site project as an entry point and defined the connection string there: "ConnectionStrings": { "DataPlaygroundConnection": "Server=DataPlayhouse;Database=BusinessHandshake;User ID=bhuser1;Password=bh@12345;MultipleActiveResultSets=True;Connect Timeout=360;App=Company - Portal - Staging" } I started facing issues just recently that when running, I'd get Login failed for user 'bhuser1' error. But the credentials are working as [...] read more
sql-server
blazor-server-side
clean-architecture
0votes
0answers

Intermittent SQL Server connection problem on Linux

I am hosting a .NET Core application in Linux (Ubuntu) with SQL Server. The application uses entity framework to read/write to the database hosted on the same server. The connection string I am using is Server=localhost,1433;Database=mydb;User=sa;Password=XXXXX I intermittently get the following error reported in the logs when adding a new [...] read more
sql-server
.net-core
entity-framework-core
sql-server-2019
0votes
2answers

.NET Core API not connecting to SQL Server running on Docker

I have this error when trying to execute request to my Rest API running on Docker: > Microsoft.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that [...] read more
sql-server
docker
.net-core
0votes
0answers

LocalDB deployment on client's machine

I have created a setup file for a WPF application with Database in MDF format and I'm trying to test the application and to connect it to the attached database, but I'm still getting this error : Error on Connection settings System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'admin'. Error Number [...] read more
sql-server
localdb
sqlexception
0votes
0answers

ILogger - SpanId vs TraceId vs HttpContext.TraceIdentifier

I was running code from this repo and generating an error from the Book.API, I get an error page like this: image [https://user-images.githubusercontent.com/6237247/105782172-9a36f680-5f39-11eb-882a-cd496032e22f.png] The request ID is |574e8e13-4e9d31fed64d4793. When I look at the log entry in the file, I see: { "Timestamp": "2021-01-25T18:07:24.6565993-06:00", "Level": "Fatal", "MessageTemplate": "BADNESS!!! Cannot open database [...] read more
.net-core
razor-pages
ilogger
0votes
2answers

How can I open database "MyDB" requested by the login. when the login failed?

I am installing SQL server express on the machine using AdvancedInstaller. AdvancedInstaller calls the following script to (successfully) create the DB: -- Inline SQL script IF NOT EXISTS(SELECT name FROM master.sys.databases WHERE name = N'MyDB') BEGIN create database MyDB END As the installer continues, it also creates tables and stored [...] read more
c#
sql-server
database
permissions
0votes
1answer

Entity Framework 6 / SQL Server triggers - getting error

I have an EF6 solution that I would like to add a trigger on a table to log changes to a new table. This is due to an integration we are doing to an external database. Basically, they want a log of changes that are made to a table for [...] read more
c#
sql-server
entity-framework
azure-sql-database
0votes
0answers

Executing SQL Script causes error in procedure called by trigger

I'm also new to DevOps, but let me see if I can explain my situation, also if anyone has any advice on doing post deployment scripts and can share their experiences I will be most grateful. I use SQL Source control from Redgate, Git and Azure DevOps. I have managed [...] read more
sql
authentication
azure-devops
0votes
0answers

.Net Core 3.1 MSSQL backend in Docker setup: Docker-compose up producing connection failure

docker-compose.yml version: "3.9" services: web: build: . ports: - "8000:80" container_name: web_application depends_on: - medicalmgr medicalmgr: image: "mcr.microsoft.com/mssql/server:2019-latest" environment: SA_PASSWORD: Pw@mm2021 ACCEPT_EULA: Y ports: - "1433:1433" container_name: mmm_mmsql_2019 dockerfile FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env WORKDIR /app COPY . . RUN dotnet restore && \ dotnet publish -c Release -o out # [...] read more
c#
.net
sql-server
docker
connection
0votes
1answer

NLog writes to all targets from my machine but fails writing to Database target on application server

Quick summary before getting into the nitty gritty > (NLog version 4.7.2) ASP.NET Core 2.2 web application correctly logs to file & database targets from local machine. As soon as it's deployed to staging application server, file logging continues but database logging doesn't work and gives no errors in internal [...] read more
c#
asp.net-core
iis
nlog
0votes
0answers

Migration Error when when updating database

These are my 2 classes: public class CartableActConfig : IEntityTypeConfiguration<CartableActModel> { public void Configure(EntityTypeBuilder<CartableActModel> builder) { builder.ToTable("CARTABLE_ACT", ClaimContext.DEFAULT_SCHEMA); builder.HasKey(t => t.CartableActId); builder.Property(p => p.CartableActId).UseHiLo("CartableActSequence"); builder.Property(t => t.CartableActId).ValueGeneratedNever().IsRequired(); builder.Property(t => t.ActCode).IsRequired(); builder.Property(t => t.CartableStateId).IsRequired(); builder.Property(t => t.ChangeDate).IsRequired(); builder.HasDiscriminator<string>("Discriminator") .HasValue<CartableActRegisterModel>("register") .HasValue<CartableActCompleteModel>("complete") .HasValue<CartableActReferredModel>("referred") .HasValue<CartableActDepartmentResponseModel>("depresponse") .HasValue<CartableActFirstSummeryModel>("firstsummery") .HasValue<CartableActFinalSummeryModel>("finalsummery") .HasValue<CartableActComitteeMeetingModel>("comitteemeeting") .HasValue<CartableActSatisficationModel>("satisfication"); builder.Property(t => t.CartableActId).HasColumnName("CARTABLE_ACT_ID"); builder.Property(t => [...] read more
c#
entity-framework
asp.net-core
migration
server-side
0votes
0answers

System.Data.SqlClient.SqlException (0x80131904): System.Net.Security.Native error shows up for localhost server but not on an online server?

so I've been stuck with this error for a few days now and I can't see to get it to work. I'm trying to get a my unity application (computer platform, not android) to connect to my localhost server (I use Microsoft SQL Server Express) using Microsoft SQL Server Manager. [...] read more
c#
sql-server
unity3d
server
ssms
0votes
1answer

.Net EF I can't update the data in my db. Getting an Invalid column name exception

This is the request handler I have for updating: public async Task<UpdateEmployeesResponse> Handle(UpdateEmployeesRequest request, CancellationToken cancellationToken) { var data = _context.Employees .FirstOrDefault(person => person.Auth0ID == request.UpdateEmployee.Auth0Id); var skill = _context.Skill.FirstOrDefault(skill => skill.Id == request.UpdateEmployee.SkillLevel.Id); var employeeProgrammingLanguages = _context.EmployeeProgrammingLanguages.Where(_ => _.EmployeeId == data.Id); var programmingLanguagesList = new List<ProgrammingLanguage>(); var element = [...] read more
c#
.net
entity-framework
linq
0votes
0answers

How I can set a pair key in a model in MVC C#

I have a LenguajesPorProyecto model the PK is ProyectoId and LenguajeId properties this: public class LenguajesPorProyecto { public int LenguajeId { get; set; } public Lenguaje Lenguaje { get; set; } public int ProyectoId { get; set; } public Proyecto Proyecto { get; set; } [StringLength(1)] public char Nivel { [...] read more
c#
asp.net
asp.net-mvc
asp.net-core
0votes
1answer

System.Data.SqlClient.SqlException (0x80131904): Invalid column name

I am getting this error while trying to execute the attached code. Please help. I am getting values as list array in controller method successfully but when I try to read data from sql database I am getting error. CONTROLLER METHOD: [HttpPost] public JsonResult searchdata(List<string> firstField, List<string> secondField, List<string> thirdField) [...] read more
sql
asp.net
asp.net-mvc
ado.net
0votes
0answers

Windows Azure Open Server Request Client with IP address 'XXX.XXX.XXX.XX' is not allowed to access the server

I use Azure to deploy my database. I'm having trouble using the Azure platform and don't know how to fix it. When my backend code tries to connect to db, I get the same error like that "2021-01-01T18:27:13.198490+00:00 app[web.1]: fail: Microsoft.EntityFrameworkCore.Database.Connection[20004] 2021-01-01T18:27:13.198500+00:00 app[web.1]: An error occurred using the connection to [...] read more
azure
ip
firewall
0votes
0answers

SqlDataAdapter.Fill method is throws SqlException when the BUILTIN/Administrators language is British English

our c# application uses SqlDataAdapter to fetch data from the DB to present in a report. For some reason the SqlDataAdapter.Fill method is throwing below SqlException when the BUILTIN/Administrators language is British English. When it is English, it is working fine. I debugged my C# code but didn't get a [...] read more
sqlexception
sqldataadapter
0votes
1answer

Deploy Winforms application connected to SQL Server at centralized system

I have installed SQL Sever Express on my system and built an app (Winforms) in visual studio by creating a database in my SQL Server. Now my application is complete, I have to install my app on my client (4-5 pc) all or on the same LAN and after installation [...] read more
sql-server
visual-studio
winforms
deployment
0votes
0answers

Log more detail to Event Viewer for .Net Core applications?

We have a custom application that runs as a separate IIS site and in it's own application pool. On our server we have multiple instances of the same application running for different clients.... When there is a .NET Runtime error I'm not finding anything that helps me trace it back [...] read more
.net
event-viewer
0votes
1answer

Cannot connect to MySQL database from Monodevelop in Linux Mint

I can't connect to a MySQL database from C#. Upon trying to run the executable it spits out this error (this is the beginning of it): > Unhandled Exception: System.Data.SqlClient.SqlException (0x80131904): Snix_Connect (provider: SNI_PN7, error: 40 - SNI_ERROR_40) Snix_Connect (provider: SNI_PN7, error: 40 - SNI_ERROR_40) at System.Data.SqlClient.SqlInternalConnectionTds..ctor (System.Data.ProviderBase.DbConnectionPoolIdentity identity, System.Data.SqlClient.SqlConnectionString [...] read more
c#
mysql
linux
monodevelop
gtk#
0votes
0answers

Entity Framework stored procedure linked server Issue

We are baking T-SQL stored procedure s/views in EF migrations (model below) so no one has to be on release night and it's been working fine until now. The stored procedure is manually created with no issues in SSMS, but when the migration is run by the build server, we [...] read more
sql-server
entity-framework
tsql
0votes
1answer

Conversion failed when converting the nvarchar value 'abc' to data type int in nopcommerce 4.3

I want to search GTIN option in admin product list. So, for that I am providing GTIN value in ProductLoadAllPaged store procedure. Now, when I search GTIN value from product list at that time throw datatable error and from console application get message that System.Data.SqlClient.SqlException (0x80131904): Conversion failed when converting [...] read more
sql
sql-server
stored-procedures
nopcommerce
sqlexception
0votes
0answers

Must declare the scalar variable error for stored procedure in nopcommerce 4.3

I want to search GTIN option in admin product list. So, for that I am providing GTIN value in ProductLoadAllPaged store procedure. Now, when I search GTIN value from product list at that time throw datatable error and from console application get message that System.Data.SqlClient.SqlException (0x80131904): Must declare the scalar [...] read more
sql-server
stored-procedures
nopcommerce
scalar
sql-query-store
0votes
0answers

Foreign key constraint error when saving data to database

I am trying to save data into the Doctor table in the database. The table structure is shown below. The error I get when saving > Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. Microsoft.Data.SqlClient.SqlException (0x80131904): The MERGE statement conflicted with the FOREIGN KEY [...] read more
c#
entity-framework
entity-framework-core
0votes
0answers

Using customized acumatica report designer reports in a different instance

[SqlException (0x80131904): Operand type clash: uniqueidentifier is incompatible with int] PX.Common.Async.Process(String uniqueKey, Method`1 method, Int64 waitTimeout) +398 PX.Reports.Web.WebReport.Render(HttpResponse response, String format, Int32 pageNumber, Boolean refresh, Boolean isAttacment, String locale) +1574 PX.Reports.Web.PageOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +329 PX.Reports.Web.HttpHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context) +237 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +872 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +220 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +94 read more
acumatica
0votes
1answer

Cannot insert "subclass" object into database using EF Core code first

I have two classes: Workout.cs: public class Workout { public int Id { get; set; } public string Name { get; set; } public ICollection<WorkoutSet> Sets { get; set; } public DateTimeOffset FromDateTime { get; set; } public DateTimeOffset ToDateTime { get; set; } } and I have subclass WorkoutSet.cs [...] read more
asp.net-core
entity-framework-core
ef-code-first
asp.net-core-3.1
0votes
1answer

Kubernetes .NET Application SocketExceptionFactory+ExtendedSocketException

We recently started encountering issues rolling our .NET Core app out in k8s in Azure, where the application couldn't find hostnames, like our Azure Database name. The problem seems intermittent as our old pods are still running fine, even when we bounce them, they come back fine. The issue below [...] read more
.net
azure
kubernetes
0votes
1answer

EF Core understanding migrations

I encountered some weird behaviour with EF Core 3.1 that made me wondering what is actually happening. So hopefully someone can explain this to me in all fine details. Scenario Let's say you have two projects. Project A (main) and project B (side-project). For both projects you can add/remove migrations, [...] read more
c#
sql-server
entity-framework-core
ef-core-3.1
0votes
0answers

How to fix error occurred during the login process while using DevExpress Xpo

I'm using XPO as the ORM to connect to my database but every time it throws this error - > DevExpress.Xpo.DB.Exceptions.UnableToOpenDatabaseException: 'Unable to open database. Connection string: 'data source=localhost\SQLEXPRESS;user id=employee_user;password=REMOVED;initial catalog=Employee;Persist Security Info=true;'; Error: 'System.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during [...] read more
c#
sql-server
devexpress
xpo
sql-server-2019-express
0votes
1answer

How do I update my Entities using Scaffoling process in EFCore 3.1 -- Execution Timeout Expired

I'm able to run my API and make calls which get data from the DB. Then when I try to update my Entities - after making db changes I get the error: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not [...] read more
entity
ef-core-3.1
scaffold
0votes
1answer

SQL Server suspending jobs - Error 0x80131904

I have an SSIS package which runs fine in debug mode from Visual Studio, however if It runs as a SQL Server job it hangs at step 2 which takes about twenty minutes in Visual Studio. The only thing I can think it could be is the SQL Server job [...] read more
sql-server
ssis
0votes
2answers

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
0answers

Dcoker: System.Data.SqlClient.SqlException (0x80131904) in .net core app

I have .net core app that connects to mssql with such connection string: Server=(local);Database=Test;User ID=sa;Password=123;max pool size=1000 My compose file looks like this: sql-server-db: image: microsoft/mssql-server-linux container_name: sql-server-db environment: - SA_PASSWORD=123 - ACCEPT_EULA=Y - MSSQL_PID=Developer ports: - "1439:1433" my-service: container_name: my-service image: my-service:1.0 environment: - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://+:80 depends_on: - [...] read more
docker
docker-compose
0votes
0answers

Can't run 'dotnet ef database update' because of insufficient privileges

I am at a confusing standstill with developing my .NET application and setting up the database. I am using a docker container image of mssql/sql-express. I've got it running and can log into the sys admin account. I created a login CommanderApi, database CommanderDb and created a user in that [...] read more
c#
sql-server
docker
entity-framework-core
0votes
1answer

[SqlException (0x80131904): Login failed for user 'DLU\DLU09$'.]

I have and old asp application that need to access a sql database I want to use network user but I'm getting this error > [SqlException (0x80131904): Login failed for user 'DLU\DLU09$'.] I have added DLU\DLU09$ as a user to the database and granted it access rights to the tables. read more
sql-server
database
vb.net
security
0votes
0answers

EF Core generated sql query is using the entity name as table name, not the custom table name set by the table naming convention

I have a custom table naming convention which prefixes B_ to the entity name. This works fine when I generate the migration scripts. However, when I execute any get method, the EF Core generated code doesn't generate the table name with the prefix. Instead it uses the Entity name itself [...] read more
entity-framework
entity-framework-core
0votes
2answers

Scheduled Task SQL timeout, but not when running manually

I have a problem where I have to run a C# Console application via a scheduled task. The scheduled task calls a Powershell script which sets some variables (like a connection string) and calls a C# console application which connects to a database with those arguments. The problem is that [...] read more
sql
powershell
scheduled-tasks
0votes
0answers

I am trying to perform a sql injection on asp .net website running on IIS 8.5 with .net version 4.is this site vulnerable to SQL injection or not

First, I tried figuring out if the site was vulnerable to SQL injection by adding a single quote at the end of the get parameters and this what i got Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and [...] read more
sql-injection
0votes
1answer

Azure AD authentication giving error for signing in admin of database after azure deployment of the web app

Link to SSMS snapshotI have created a web app in .NET MVC and added azure ad authentication to it. On running it on local host everything is working very correct. But when I deploy the application on azure web app and put that URL in redirect URI its throwing error [...] read more
c#
.net
sql-server
asp.net-mvc
azure-active-directory
0votes
1answer

Entity Framework migration error rename table

I tried to add new model to my project with code-first migration. The model looks like this: public class Renting { [Key] public int Id { get; set; } public string RequesterEmail { get; set; } public string RequesterName { get; set; } public int RoomNumber{ get; set; } public [...] read more
.net-core
.net-core-3.1
0votes
1answer

SQL VIEW Execution Timeout Expired

I am getting timeout issue for my view. But timeout is not consistent, it occurs only sometimes. When I run the query I didn't notice any issue, I'm not very sure where to look in this case to fix the timeout issue. ERROR: > System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired Here [...] read more
sql-server
query-optimization
-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
3answers

How to fix Incorrect syntax near the keyword "NOT" during Update-Database using Migration

I am new into software development. I am currently developing Asp.Net Core API. I have managed to do Add-migration successfully, the problem start when I need to Update-Database. The error is as follows System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near the keyword 'NOT'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException [...] read more
c#
asp.net
.net-core
asp.net-core-webapi
-1votes
0answers

SQL Server 2008 R2 Connection issue on OpenShift with C# code

I have deployment of C# code on openshift where it is unable to connect to SQL Server 2008 R2 database (SQL Server 2008 R2 RTM v10.50.1600) and getting the error shown below. The same code works fine with SQL Server 2012. My connection string is "SQLNumberingConnection": "server=X4.X6.XXX.XX,12110;database=XYZ;User ID=nnum;Password=XXX;Integrated Security = [...] read more
c#
sql-server
asp.net-core
containers
openshift
-1votes
1answer

Error creating and seeding database using Docker

When I run this code with IIS it is working, but if I am using Docker I get the below error. Could anybody help me solve this issue? public static void Main(string[] args) { var host = CreateHostBuilder(args).Build(); //Seed database using (var scope = host.Services.CreateScope()) { var services = scope.ServiceProvider; [...] read more
c#
docker
asp.net-core
asp.net-web-api
-1votes
1answer

How to open a downloaded github asp.net mvc project - in visual studio

I have downloaded a project from Github to my pc. Unzipped it and renamed the folder. Now inside the folder I have some files as the below screen shot: enter image description here [https://i.stack.imgur.com/WHEB8.png] So when I tried to open it in visual studio 2019 by selecting the Vidly.sln from [...] read more
c#
asp.net
.net
asp.net-mvc
entity-framework
-1votes
2answers

Is there a way to handle SQLExceptions that are generated by SqlDataSource

I have been experiencing a problem with one of my vb applications where it is crashing at a certain time of day. In my code, there are only 4 places where that could be the cause of the crash. Three of them are from SQLDataSource queries and the other is [...] read more
vb.net
timeout
sqlexception
-1votes
1answer

Specified LocalDB instance name is invalid: Able to create migrations but not run them

I created a new XAF Blazor solution and was able to run it to create the database. I then added a database migration as per this questionHowever when I go to run the migration from within package manager I get Microsoft.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing [...] read more
visual-studio
entity-framework-core
resharper
entity-framework-migrations
xaf
-2votes
1answer

Adding data to SQL Server results in System.Data.SqlClient.SqlException: 'Invalid column name'

I'm totally new to C# and SQL Server. I'm building a simple program where it has patients and their data should be presented on the screen after it entered by the user but whenever I try to add data to the database I get this error: > System.Data.SqlClient.SqlException: 'Invalid column [...] read more
c#
.net
sql-server

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