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

324votes
20answers

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
60votes
19answers

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
51votes
10answers

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

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

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

Invalid object name 'dbo.UserRoles'

I am getting this error: [SqlException (0x80131904): Invalid object name 'dbo.UserRoles'.], but I can't catch where error is. I can retrieve other data from other tables, but not this. conditions are: connection string in web.config: <add name="myStoreConnection" connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename='|DataDirectory|\myStore.mdf';Integrated Security=True" providerName="System.Data.SqlClient" /> context: public class AdminMyStoreConnection : DbContext { public [...] read more
sql
entity-framework
asp.net-mvc-4
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
1answer

SqlException - A transport-level error has occurred when receiving results from the server

I am coding a MVC 5 internet application and I have a recurring task that executes every hour. This task updates some model objects using a DbContext class. The application is deployed as an Azure website. I am getting the following error every few hours: > System.Data.SqlClient.SqlException (0x80131904): A transport-level [...] read more
c#
asp.net-mvc-5
entity-framework-6
sqlexception
hangfire
4votes
9answers

A connection was successfully established with the server, but then an error occurred - provider: TCP Provider, error: 0

My web site was working flawless in the old Host, But now i Moved to a new host Please pay attention: The Old host was a VPS on the same host So i'v stoped paying him and now i'm hosting on the same host as a shared host. So I [...] read more
tcp
system
provider
sqlexception
sqlclient
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

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
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
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
2votes
2answers

Can't connect to SQL Server Docker Container through Web API .NET Core

I am trying to connect to a Docker image SQL Server database through another containerized application (microservice) built with .NET Core 3.1 but I get the following error thrown by Docker: fail: Microsoft.EntityFrameworkCore.Database.Connection[20004] An error occurred using the connection to database 'ProductDb' on server 'localhost,1433'. fail: Microsoft.EntityFrameworkCore.Query[10100] An exception occurred [...] read more
sql-server
docker
.net-core
2votes
1answer

Generating non-nullable rowversion on SQL Server with EF Core 3.1

We are trying to generate a non-nullable rowversion column on SQL Server with EF Core 3.1 using Fluent API: public class Person { public int Id { get; set; } public byte[] Timestamp { get; set; } } public class PersonEntityConfiguration : IEntityTypeConfiguration<Person> { public void Configure(EntityTypeBuilder<Person> builder) { builder.HasKey(p [...] read more
c#
.net-core
entity-framework-core
ef-code-first
ef-fluent-api
2votes
0answers

EF core Scaffold-DbContext doesn't work : Execution Timeout Expired

I'm trying to scaffold Models from an existing database. Scaffold-DbContext "connectionString" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models But I got this error: > Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. * All required packages are installed (tried another connection [...] read more
c#
sql-server
entity-framework-core
database-first
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
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
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
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

Pass ID parameter to SQL from ASP .Net using stored procedure

I am trying to call up an UPDATE stored procedure in SQL by passing parameters and it need to update at a specific ID value. This is the error I keep getting: System.Data.SqlClient.SqlException: Procedure or function 'updateEmployeeRecord' expects parameter '@Id', which was not supplied. Stack trace; [SqlException (0x80131904): Procedure or [...] read more
c#
sql
asp.net
.net
stored-procedures
1vote
2answers

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
1vote
2answers

Multiple list item deletion SharePoint rest api "Exception from HRESULT: 0x80131904"

To delete all the list items in the SharePoint I have tried the following code but i am getting 500 Internal server error most of the time for REST calls. If list items are less then than 5 then the code is working fine. $.ajax({ url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('TestList')/items", type: [...] read more
sharepoint
sharepoint-2013
office365api
1vote
0answers

SSL_ERROR_SSL MSSQL handshake fail while seeding/migrating data in dockerized C sharp micro service

Trying to seed/migrate data from C# (C Sharp) micro service within MSSQL database container (Image is mssql-server-linux:2017-latest)... Connection is successful Exception message is as below exampleapi_1 | fail: Microsoft.EntityFrameworkCore.Database.Connection[20004] exampleapi_1 | An error occurred using the connection to database 'Domain.exampleManagement.Docker' on server 'DOMAIN-DB'. exampleapi_1 | fail: Puma.exampleManagement.API.Program[0] exampleapi_1 | An [...] read more
sql-server
docker
ssl
1vote
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
1vote
2answers

GCloud - Connecting App Engine Flex to Cloud SQL in other project

I'm trying to connect my app engine flex service to the cloud sql database that is in a shared project. I have added the app engine default and app engine flex user as SQL admin to the shared project. Now I'm trying to connect the app engine container to the [...] read more
asp.net
google-app-engine
google-cloud-platform
google-cloud-sql
1vote
0answers

The conversation handle "1FBDE14B-0A07-EB11-B81C-3CECEF20BFDC" is not found

I have used SQL Service broker and SQL Table Dependency and started SQL table dependency in a table for notifications on table data change. I have given all the permission to the database listed in the SQL table Dependency document. After some time, maybe in idle state, it is giving [...] read more
c#
sql-server
sqldependency
1vote
2answers

ASP.NET Core MVC webapp error after Azure deployment

I wrote an app in ASP.NET Core MVC with CRUD to deploy to Azure, using code first. I followed this tutorial: https://docs.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-dotnet-sqldatabase The tutorial is slightly out of date, but I am confident that I followed it properly. I also attempted to literally follow the tutorial with the sample app, [...] read more
c#
asp.net
asp.net-mvc
azure
asp.net-core
1vote
2answers

Connect to SQL Server from IIS (ASP.Net Core)

I spend hours trying multiple combinations to connect my asp.net core site hosted on an IIS Server to a remote SQL Server using just the SQL user and password without exit. This is my connection string in appsettings.json: "ConnectionStrings": { "Booking": "Server=SQLServerName;Database=Booking;User Id=XXX;Password=XXX;" } * I have tried to set [...] read more
asp.net-core
iis
1vote
2answers

Violation of PRIMARY KEY constraint Cannot insert duplicate key in object

I have a problem I am using lazy loading and virtual, but when using this it generates the following error > Violation of PRIMARY KEY constraint Cannot insert duplicate key in object How can I solve it? These are my classes: public class Producto { [Key] public Guid ProductoId { [...] read more
c#
entity-framework
blazor
1vote
2answers

Problem catching SqlException 547 with DeleteConfirmed class in ASP.NET Core MVC Controller

I have standard MVC Controller on simple database table (Products) with corresponding Model and all Views (Index, Detail, Edit and Delete). All functionalities works without problem if record doesn't have foreign key constraint. I've modified DeleteConfirmed class in my Controller so I can catch SqlException that happens when someone tries [...] read more
c#
asp.net-core
entity-framework-core
asp.net-core-mvc
1vote
1answer

ASP.NET Core Web 3.1 - IIS Express can fetch data from localdb but local IIS can not

I have a very weird problem as stated above. The code running is exactly the same, the only difference is the Debug profile used. I'm using Microsoft Visual Studio Community 2019 Version 16.6.3. When using the IIS profile the code says I have no Media in my database. enter image [...] read more
c#
asp.net-core
iis
.net-core
iis-express
1vote
1answer

Entity Framework Core - Error when trying to Add Migration after creating Model from existing database

I have .NET Core Project with Entity Framework Core. I created a model from an existing database using the following command Scaffold-DbContext "Server=.\SQLEXPRESS;Database=DBName;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models The Model was generated and I tried to add migration but the migration that is generated is actually trying to create anew the already [...] read more
c#
entity-framework-core
1vote
0answers

Linq query with too many includes exception

I am using EF6 and I have a query that selects only one entity from the database but with including all of the related entities. I am selecting only one using FirstOrDefault() method but sometimes this exception appears > System.Data.SqlClient.SqlException (0x80131904): Distributed transaction completed. Either enlist this session in a [...] read more
c#
entity-framework
linq
1vote
1answer

System.Data.SqlClient.SqlException after CREATE/ALTER/PRINT

I'm coming from 2 other questions, and am trying to understand why this exception happens. Entity Framework seed -> SqlException: Resetting the connection results in a different state than the initial login. The login fails.results-in-a-dif What does "Resetting the connection" mean? System.Data.SqlClient.SqlException (0x80131904) This code reproduces the exception. string dbName [...] read more
c#
.net
sql-server
ado.net
sqlconnection
1vote
1answer

provider: SSL Provider, error: 0 - An existing connection was forcibly closed by the remote host

In short, I wrote a console app that just calls a stored procedure in a SQL Server database. Then setup a Windows Task Scheduler event to call the console app's .exe file every 5 minutes. Most of the time it works, however about 10 times a day or so we [...] read more
sql-server
ssl
sqlexception
1vote
2answers

Creating SQL Server in Amazon, cannot connect to it using Azure Data Studio

I've created a SQL Server in AWS, here is the screenshot. enter image description here [https://i.stack.imgur.com/3wJm3.png] Then, I've pasted the endpoint, and try to connect using Azure Data Studio. enter image description here [https://i.stack.imgur.com/3dMXq.png] However; I couldn't connect to SQL Server I created through AWS. Here is the error message: [...] read more
sql-server
amazon-rds
azure-data-studio
1vote
1answer

Database deadlock on simultaneous API requests that insert to 2 tables

So i have endpoint in my api that accepts file with data. For each file i extract data and save it to Products table and at the same time i save filename and date added to diffrent SavedFiles table. Each product has fileId so that we know which file does [...] read more
c#
sql-server
asp.net-core
.net-core
entity-framework-core
1vote
4answers

Fixed Cannot open database requested by the login. The login failed

I try to execute this web application but it gave me this error messages when I try to register a user account in the web application: > System.Data.SqlClient.SqlException occurred HResult=0x80131904 Message=Cannot open database "rentalsystem" requested by the login. The login failed. Login failed for user 'MicrosoftAccount\corene100@outlook.com'. Source=.Net SqlClient Data Provider [...] read more
c#
asp.net
sql-server
visual-studio
sqlexception
1vote
1answer

Entity Framework is combining my table name and the Id name

This is an odd issue. My Entity Framework Core project is combining the table and the Id into one column like this: MonsterListMonsterId Here is the error: Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid column name 'MonsterListMonsterId' This is the controller that generates the error: var treasuresByMonster = await _context.MonsterTreasures.Where(q => q.MonsterId == id).ToListAsync(); [...] read more
entity-framework
entity-framework-core
asp.net-core-3.1
1vote
2answers

Azure SQL Single Database DTU Timeout Expired Error

I am using Azure SQL Single database DTU purchase model. The average load seems to be under 10%. From time to time I am receiving an error, now it's happening almost each day. I am using EF Core 3.1 for database access. The database is accessed from an API built [...] read more
sql-server
asp.net-core
entity-framework-core
azure-sql-database
azure-appservice
1vote
1answer

Moving my first Blazor solution to Azure - Build still pointing to local DB

I just loaded my first Blazor solution to Azure. Using Visual Studio, I developed on my local laptop with two databases. One for security, another for data. I have successfully deployed everything to the free Azure service created, and my local build reads data from the online Azure databases. But [...] read more
visual-studio
azure-web-app-service
blazor-server-side
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
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
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

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

SqlException (0x80131904): Cannot open backup device Operating system error 5(Access is denied.)

Hy I am getting sqlException while trying to backup SQL Server database programatically in ASP.NET core in hosted application. Backup works properly on local maching but after deploying it is throwing SQL exception. My code is string fileName = Guid.NewGuid().ToString()+".bak"; var filePath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot","DatabaseBackups", fileName); System.Console.WriteLine(filePath); string connectionString = [...] read more
c#
sql-server
asp.net-core
0votes
3answers

EF Core failed to execute database update command : " fail: Microsoft.EntityFrameworkCore.Database.Command[20102] "

Guys I'm trying to run dotnet ef database update command but during the executing of it, it trows me an exception: Failed executing DbCommand (12ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] CREATE TABLE [ProductSubCategory] ( [ProductId] int NOT NULL, [SubCategoryId] int NOT NULL, CONSTRAINT [PK_ProductSubCategory] PRIMARY KEY ([SubCategoryId], [ProductId]), CONSTRAINT [FK_ProductSubCategory_Product_ProductId] FOREIGN KEY [...] read more
c#
sql-server
database
entity-framework-core
dbcontext
0votes
2answers

How do you add column description for a foreign key in another table utilizing EF 6?

Referring to this previous post: How to add description to columns in Entity Framework 4.3 code first using migrations? I have successfully implemented the modified solution proposed by user Abdullah but I have encountered the exception below: > System.Data.SqlClient.SqlException HResult=0x80131904 Message=Object is invalid. Extended properties are not permitted on 'dbo.School.Students', [...] read more
c#
entity-framework
entity-framework-6
0votes
1answer

SQL Integrated Security connection string not working after application has been published

I am using integrated security to connect to a sql database. This is the connection string I am using: Server=CRAIG_DAFF\\SQLEXPRESS;Initial Catalog=LairageScanning;MultipleActiveResultSets=true;Integrated Security=True; While working in visual studio I have no problem connecting to the database. But when I install the application as service the application I get the following error: [...] read more
sql
sql-server
connection-string
0votes
2answers

Trying to connect to a database but getting network-related or instance-specific error along with error: 52

Trying to spin up a .NET project with SQL Server Management Studio but I am getting this error when I try to run a update-database in my Package Manager Console: > Specify the '-Verbose' flag to view the SQL statements being applied to the target database. System.Data.SqlClient.SqlException (0x80131904): A network-related [...] read more
c#
.net
sql-server
entity-framework
ssms
0votes
0answers

How to handle invalid login details to a SQL database from a webapp

I have a web app which contains a modal for the use to enter the details to the SQL server they want to connect to. If the user enters correct details it works as intended. Currently if a user enters incorrect value I get the following error. System.Data.SqlClient.SqlException HResult=0x80131904 Message=Login [...] read more
c#
asp.net
sqlconnection
0votes
0answers

Not able to connect Local MS SQL Server from an app inside Docker Container

I have created a simple .NET Core 3.1 Console app to connect to SQL Server using ADO.NET. It is working fine with dotnet run and returns the result. But when I deployed this app on docker, I get a network-related error. My console app code is as follows: using System; [...] read more
.net
sql-server
docker
0votes
1answer

Connection Error from C# and Works from SSMS

While trying to connect to SQLServer from C# the error # reported is 4060 and I get... > System.Data.SqlClient.SqlException HResult=0x80131904 Message=Cannot open database "MyDatabase" requested by the login. The login failed. Login failed for user 'DBClient'. Source=.Net SqlClient Data Provider StackTrace: When using the credentials from SSMS, all is good. [...] read more
c#
sql
sql-server
database-connection
0votes
0answers

Need explanation, why does EF core require using attach now

This code works fine month or more this is HttpPost Api endpoint witch add user to user groups var user = await _userManager.FindByEmailAsync(model.Email.ToUpper()).ConfigureAwait(false); // if user not finded or not activated return response var userUserGroups = await _context.UserGroupsUsers .Where(ugu => ugu.User == user) .Select(w => w.UserGroup) .ToListAsync() .ConfigureAwait(false); var userGroupsForAdd [...] read more
c#
sql-server
entity-framework-core
asp.net-core-webapi
asp.net-core-2.2
0votes
0answers

.net Core 3.1 Identity: SqlException: Invalid column name 'Discriminator'. Invalid column name 'Discriminator'

This is occurring directly after login. I've done some reading (61790251 29778041 20008827), but do not know where to apply [NotMapped], or if I should. I had been modifying ApplicationUserRole and IdentityContext but reverted or commented those changes. Exception I don't understand how to work out the problem from the [...] read more
asp.net-identity
.net-core-3.1
0votes
0answers

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

EF Core: Add records with decimal, non-identity PK

I have an existing database with multiple tables with decimal (numeric(14,0)) PK columns. I'm experimenting with different ways to insert multiple records in one action. I'm not sure if I can introduce sequences, so I've been trying to use HasDefaultValueSql("MAX(CASE_ATTRIBUTE_ID) + 1"). In a general use case, you could have [...] read more
c#
entity-framework-core
0votes
0answers

VS 2019 doesn't connect to SQL Server

I am developing an ASP.NET API using VS 2019 Enterprise. It suddenly doesn't let me connect to my SQL server. I tried both a local SQL Server with Windows authentication and a remote SQL Server with password authentication. I never had this problem until today. What could be the problem? [...] read more
sql-server
visual-studio
asp.net-core
0votes
1answer

Login failed for user 'NT AUTHORITY\LOCAL SERVICE'. error after data creation or edit

I'm implementing asp.net core 3.1 project and using sql server 2014. My app has got 4 controllers each of which has create, edit and delete actions. All of 3 controllers except one of them works fine whereas when I create or edit via the problematic controller, an error like the [...] read more
sql-server
asp.net-core
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
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
sql-server
asp.net-mvc
windows
database-connection
windows-server-2016
0votes
0answers

SCCM. All clients are shown as offline (gray icon). In bgbserver.log: SMS_NOTIFICATION_SERVER errors for ssl and sql

=) Recently I made settings for PXE and sccm site configuration (https communication clients), these edits did not help and I returned everything back. But from that moment on, all clients turned gray and errors appeared in the logs: 1. ERROR: can't retrieve SQL connection. Exception:System.Data.SqlClient.SqlException (0x80131904): A connection was [...] read more
sccm
0votes
1answer

How to correctly connect ASP.net Backend to local mysql server?

Problem: I am very new to ASP.net core. I am trying to connect my application to the MySQL database. So I create connectionString as follows. "ConnectionStrings": { "DevConnection": "Server=server=127.0.0.1;uid=root;pwd=mypwd;database=PaymentDetailDB;" } And in the startup.cs class I add this line to the ConfigureServices method. options.UseSqlServer(Configuration.GetConnectionString("DevConnection"))); Add-Migration "InitialCreate" was successfully run. But [...] read more
asp.net-core
0votes
1answer

Can't update database in ASP.NET Core

I've created a table named USERGOLD using Add-Migration and update-database and it works fine the table is created in SQL Server, but now I'm creating another table FoodMenu. I've created a model class and dbset, I used add-migration and the table is created in the migration, but when I run [...] read more
asp.net-core
0votes
1answer

MVC: Database connection problems

I have an application in asp.net mvc just created. I am trying to login to the app via twitter After the user logs in via twitter (which he/she successfully does) it hits following line in ExternalLoginConfirmation method // Get the information about the user from the external login provider var [...] read more
c#
asp.net
asp.net-mvc
entity-framework
database-connection
0votes
1answer

Newly created Azure App Service can't connect to existing Azure SQL Database

I created a new Azure App Service to test out staging. I deployed my existing application to it but it seems it can't access the already existing database. I always get this exception: Microsoft.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server [...] read more
azure
0votes
1answer

Azure DevOps (On-Prem) failed backup

While trying to do a backup of my Azure DevOps 2019 on Prem installation I was getting this error [Yesterday 9:51 AM] Spike, CBB TF401002: The SQL Server Database Engine failed to save the database backup to path \\servername\TFSBackup. Please grant SQL service account read/write access to that folder. [Yesterday [...] read more
sql-server
tfs
azure-devops
backup
0votes
1answer

VB.NET, SQL Server and list of dates

I have a query that takes as a parameter a list of dates. In VB.NET the dates are in a string ArrayList and I am using the String.Join() method to get them in a comma delimited list. The problem is when I do that double quotes are put at the [...] read more
sql-server
vb.net
parameters
0votes
1answer

MassTransit JobConsumer: (0x80131904): Incorrect syntax near the keyword 'UPDATE'

I try to start MassTransit/Sample-JobConsumer on EntityFramework Core, but having strange error > (0x80131904): Incorrect syntax near the keyword 'UPDATE' Steps to reproduce: 1. Clone MassTransit/Sample-JobConsumer 2. Remove PostgreSQL an install EntityFrameworkCore 3. Command Update-Database creates a correct databaseenter image description here [https://i.stack.imgur.com/MqtJm.png] 4. Start project JobService.Serviceenter image description here [...] read more
entity-framework
rabbitmq
masstransit
sqlexception
consumer
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
2answers

Sql connection C# login failed

i cannot connect via C# to my database and it's making me crazy. I know my credentials are good because I can open my SQLServerMangement with them and query the database. I always get login failed!! I'm trying with a buch of different connection string and nothing works. --> System.Data.SqlClient.SqlException [...] read more
c#
sql-server
sqlconnection
0votes
0answers

C# SqlException (0x80131904): Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction

Stackers, I am getting an exception Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction on the production server for my web application (Asp.Net Web Form with Telerik Controls + C# + SQL Database). I have added the stack trace of the exception in [...] read more
c#
entity-framework
webforms
sqlexception
distributed-transactions
0votes
0answers

Dockerizing .NET Core Web Api

I'm trying to dockerize .NET Core 2.x web api application for the first time. Here are my files: DOCKERFILE FROM mcr.microsoft.com/dotnet/core/sdk:2.1 AS build-env WORKDIR /app COPY *.csproj ./ RUN dotnet restore COPY . ./ RUN dotnet publish -c Release -o out RUN dotnet ef database update FROM mcr.microsoft.com/dotnet/core/aspnet:2.1 WORKDIR /app [...] read more
docker
asp.net-web-api
.net-core
0votes
1answer

Connection to SQL server suddenly stopped working

I had it working before. Only change I did is exporting database by generating script and importing it in server. Web server: IIS / ASP.NET web app Connection string: <add key="ConnectionString" value="Data Source=SERVER; Initial Catalog=tkl;Persist Security Info=True; User ID=tkl;Password=PASS; Connection Lifetime=150; Connect Timeout=150; Pooling=true;Min Pool Size=20;Max Pool Size=500" /> Error: [...] read more
sql
sql-server
iis
connection-string
0votes
0answers

EF Code First 6.1 Change PK Key from int to long

This is similar to EF Code First 6.1 Change ID from Int to Long but a bit more specific as I have code generated by EF but it doesn't work with my local db. Add-Migration generated the following migration: namespace NuGetGallery.Migrations { using System; using System.Data.Entity.Migrations; public partial class UpdateKeyToLong [...] read more
c#
.net
sql-server
entity-framework
0votes
0answers

Entity Framework: The parameterized query expects the parameter which was not supplied

This question is probably something simple because of my unfamiliarity with Entity Framework. I am debugging someone else's code. Dim quoteSql As String = $" SELECT TOP 1 * FROM HomeDWQuote WHERE RecID = @QuoteID ORDER BY RecID DESC" Using db As New Data.Auto.CRSContext() Dim dwQuotes = db.HomeDWQuotes.FromSqlRaw(quoteSql, {New SqlParameter("@QuoteID", [...] read more
sql-server
0votes
2answers

Server Error in '/KenticoCMS' Application. Clicking on Tools in CMS Desk in Kentico

I get this error when I click the Tools menu in CMS Desk in Kentico. I am not sure where to start trouble shooting. I have started down the path of copying the website down to run locally on my machine. Hoping that I might be able to get more [...] read more
kentico
0votes
1answer

Pass Array Parameter in SqlCommand with additional parameters

I have looked at several examples of passing an array as a sql parameter but I also need to pass some additional parameters. I am using the array to filter my insert and also passing in the values for the update. The code below compiles but when I run it, [...] read more
c#
sql
.net
sql-server
entity-framework
0votes
1answer

System.Web.HttpException: 'Unable to connect to SQL Server database using User.IsInRole("string")

It was a problem with one of the packages. The Microsoft.Owin.Host.SystemWeb in venter code hereersion 4.1.0 and Microsoft.AspNet.WebPages.WebData 3.2.7 I have this code: if (User.IsInRole("CanManageUsers")) { return RedirectToAction("Index", "Account"); } Which throws the following error: > System.Web.HttpException: 'Unable to connect to SQL Server database' Now I can not figure out [...] read more
c#
asp.net
asp.net-roles
0votes
1answer

HTTP Error 500.30 - ANCM In-Process Start Failure - An error occured during migration

I have read this thread, however unfortunately couldn't find the solution to my problem. I have an ASP.Net Core project (that's called Rent) and it works without any problem on my local machine. However, once I publish the project to the IIS (still in development mode) I get the below [...] read more
sql-server
asp.net-core
iis
iis-7
0votes
0answers

EFCore Scaffold-DbContext SqlClient.SqlException (0x80131904): Invalid column name

I am using entity framework core to connect to my existing SQL DB that is used by other applications as well and therefor want to use the scaffolding to create my models from said DB. I have used it time and time again to create my models from the existing [...] read more
sql-server
entity-framework-core
asp.net-core-scaffolding
0votes
1answer

EF Code First: Unable to connect to local SQL server DB

I have created EF using codeFirst approach. In the connection string the tutor used SQL Server Express but as I have SQL Server 2019 localDB. I wrote as below <connectionStrings> <add name="DefaultConnection" connectionString="data source=(localdb)//mssqllocaldb;Initial Catalog=PlutoCodeFirst;integrated security=SSPI" providerName="System.Data.SqlClient"/> I am getting exception when I try to run command update-database Exception: Specify [...] read more
sql-server
entity-framework
entity-framework-6
0votes
0answers

EF Core: A connection was successfully established with the server, but then an error occurred during the login process happening spontaneously

I have issues with our SQL Server express install on the staging environment. The following exception happens in spontaneous intervals and it requires the .NET Core app to be restarted to fix the issue. Microsoft.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during [...] read more
.net
sql-server
entity-framework-core
0votes
0answers

Visual studio form app access is denied 5

I am trying to make a SQL form app that works offline with visual studio (c# and SQL). the build worked perfectly on my computer but not on my friend's, he already got SQL 2019 express installed another friend got it working perfectly but not this friend he keeps on [...] read more
c#
.net
sql-server
visual-studio
0votes
0answers

Asp.NET Core & EF Core with an existing identity database

I have an existing database. It uses the asp .net identity I built in .NET 4.x. Everything in it works fine. I have run a scaffold dbcontext. I have imported a few of my files into this asp .net core project and ef core. When I attempt to login to [...] read more
asp.net-core
entity-framework-core
asp.net-identity
0votes
0answers

C# StackTrace method names do not align with source code

I have a case where a stack trace contains a method name that does not align with the method in the source code. The source calls .FirstOrDefault() and a DbUpdateException gets thrown (a timeout) with a stack trace that shows .SingleOrDefault() instead. This is not a case of the source [...] read more
c#
stack
stack-trace
0votes
2answers

What does "Resetting the connection" mean? System.Data.SqlClient.SqlException (0x80131904)

I know this is a bit vague, but I'm not being able to pinpoint the issue. When I run the a bit of code against a local database it runs fine. When I use a remote database I get an error. It occurs midway of the program execution. The DBup [...] read more
c#
.net
sql-server
sqlconnection
dbup
0votes
0answers

connect Unity and MSSQL

public void Test() { Debug.Log("Connecting to database..."); string connectionstring = @"Data Source = 127.0.0.1; user id = sa; password = test; Initial Catalog = test;"; SqlConnection conn = new SqlConnection(connectionstring); SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandText = "insert into Test(이름 ,아이디 , 비밀번호) values(@이름, @아이디 ,@비밀번호)"; cmd.Parameters.AddWithValue("@이름", [...] read more
c#
sql-server-2008
unity3d
0votes
1answer

Error 'Could not open a connection to SQL Server' while upgrading database with codefluent pivot runner

We use the pivot runner to update our databases. Since a year we regularly receive error message below. The database server is available, and is hardly used by other processes. After restarting, the same message usually reappears several times, but not always with the same action. As soon as we [...] read more
sql-server
codefluent
0votes
1answer

Passing pColumns with space as params in ExecuteSqlRaw

I am trying to execute a stored procedure using ExecuteSqlRaw. Normal params are getting executed properly, but when I tried to execute a stored procedure with the mandatory parameter like below List<SqlParameter> Params = new List<SqlParameter> { new SqlParameter("ContactEMail", "test@gmail.in"), new SqlParameter("Name", "test" ), new SqlParameter("Password", "test"), }; SqlParameter[] parameters1 [...] read more
c#
sql-server
entity-framework
asp.net-core
0votes
0answers

Connecting a database Visual Studio

Im trying to make a simple login page using mysql and visual studio. my code is as follows private void Login_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(@"Data Source=USER;Initial Catalog=admin;Integrated Security=True"); // making connection SqlDataAdapter sda = new SqlDataAdapter("SELECT COUNT(*) FROM Login WHERE Username='" +this.Username.Text + "' AND [...] read more
c#
mysql
visual-studio
0votes
1answer

Connection SQL Server 2012 via Windows service

I created a windows service for monitoring to send data (OS info, proc, ram etc) to my SQL Server database and it works fine on my computer. I already installed the service in another machine that has SQL Server and it can connect to mydatabase successfully but when the service [...] read more
c#
.net
sql-server-2012
windows-services
0votes
1answer

Connections issue while interactiing with SQL from Azure Function

We are talking to Azure SQL Db using Azure Function. We use latest version of Azure functions which is 3.1 along with .net core 3 and EF core. Recently we saw below error message in our logging Microsoft.Data.SqlClient.SqlException (0x80131904): Resource ID : 1. The request limit for the elastic pool [...] read more
entity-framework
asp.net-core
.net-core
entity-framework-core
azure-functions
0votes
1answer

asp.net sqldatasource parameter not supplied

I am creating a very simple CRUD (CREATE, READ, UPDATE, DELETE) test program in asp.net framework 4 which needs to have a table id as a uniqueidentifier and primary key. I have decided to let SQLServer create the unique identifier. I need to get the delete stored procedure to work. [...] read more
c#
asp.net
sql-server
parameters
sqldatasource
0votes
1answer

how can I validate if there are no errors when executing SaveChangesAsync?

I am testing a scenario where I am trying to save a duplicate element and it shows me the following error since the element must be unique (the name and fields of my table are in Spanish, for the example of my code, I preferred to put it in English): [...] read more
c#
entity-framework
0votes
0answers

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

Azure SQL Database: [SqlException (0x80131904): Could not find stored procedure

I get the error: > Azure SQL Database: [SqlException (0x80131904): Could not find stored procedure when I deploy my ASP.NET MVC application to azure. My database is an Azure SQL database. The code runs fine in my development environment. The procedure belongs to a custom schema. Below is how I [...] read more
sql
sql-server
stored-procedures
azure-sql-database
0votes
3answers

String or binary data would be truncated. The statement has been terminated.[SqlException (0x80131904): String or binary data would be truncated

I have already searched for answer saying the inserted value could be long or mismatch of datatype, due to that this type of error could come but this web app works fine on my local system but when I use it after publishing it to the web, this error shows [...] read more
c#
sql-server-2012
0votes
0answers

While creating SharePoint group using Rest api, getting Microsoft.SharePoint.SPException with Error code: -2146232060

Actual Error: body : "{"error":{"code":"-2146232060, Microsoft.SharePoint.SPException","message":{"lang":"en-US","value":"Exception from HRESULT: 0x80131904"}}}" statusCode : 500 statusText : "Internal Server Error". Scenario:Actually In SharePoint online, By Rest API, My SharePoint Hosted app will create new list item and following that, create two groups, group 1 created successfully, while creating group 2 getting this above [...] read more
sharepoint-online
restapi
-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
0answers

IsCancellationRequested is true in midnight operation

I am facing an issue while during midnight operation for my winform application. Actually, I am trying to run a long running tasks and for this, I have scheduled the timing (i.e. StartTime = 23:59 and EndTime = 02:00), but, when I saves this time and when the time period [...] read more
c#
.net
multithreading
cancellationtokensource
cancellation-token
-1votes
2answers

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

Entity Framework Core ExecuteSqlInterpolated gives Microsoft.Data.SqlClient.SqlException

I'm looping over a bunch of tables and have to delete records in each of them having a specific column name. I was able to get that list but the following line gives me the exception: Microsoft.Data.SqlClient.SqlException (0x80131904): Must declare the table variable "@p0". foreach (var dsw in deleteSwModels) { [...] read more
entity-framework-core
sqlexception
-1votes
1answer

C# adding extra/unwanted parameters to stored procedure call

I have a strange problem that is happening. On my development system everything runs fine but running the code on the production system it is adding extra parameters. Here is the code. public string Read(Setting SettingID, string SettingValue, int GameID) { SqlCommand sqlText; string SettingName = SettingsNames[(int)SettingID]; using (SqlConnection cn [...] read more
c#
sql
unity3d
-1votes
1answer

'Incorrect syntax near 'maha986javed'.'

I am making a login panel in winform C#. here when I try to check for the password and username that if they are in database or not, then I have a error: If I enter nothing then it display wrong info message correctly. but when i write password whether [...] read more
c#
sql
sql-server
winforms
-1votes
2answers

Blazor, Dapper - A connection was successfully established with the server, but then an error occurred during the pre-login handshake (Error)

I'm fallowing on of the udemy tutorials to connect to MS SQL with Blazor and Dapper. Tutorial connects to localdb but I want to do it with online server that I have. My connection strings are all fine. I can connect to DB with my VS Studio. I dont understand [...] read more
blazor
dapper
asp.net-core-3.1
blazor-server-side
-1votes
1answer

Insert '20-001' into SQL Server database results in an error

I found an error while developing in .NET. I face a problem using a stored procedure. I set variable @A like this: @A NVARCHAR(50) = "" After .NET database connect and send to '20-001' cmd.Parameters.AddWithValue("@a", test.a); But I get an error > System.Data.SqlClient.SqlException (0x80131904): Conversion failed when converting the nvarchar [...] read more
.net
sql-server
-2votes
1answer

String command does not run by SQL

I want to code an optional SQL command where any parameters that is null does not taken. For example if M_SYSCODE is -1 the select query does not filter data according to M_SYSCODE. This is my code: int m_syscode = 1;//-1 for false string m_code = null;//null for false string [...] read more
c#
sql
asp.net
sql-server
asp.net-core

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