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

346votes
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
121votes
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
72votes
22answers

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 > [...] read more
sql
asp.net-mvc
windows-server-2003
sql-server-2005-express
55votes
8answers

How to add LocalDB to Visual Studio 2015 Community's SQL Server Object Explorer?

PROBLEM I don't understand how to make LocalDB show up in the SQL Server Object Explorer. On some VMs, it shows up automatically, on some other VMs, it doesn't. Still, after googling for hours, I don't get it. CURRENT SITUATION 1. I have a clean VM 2. I installed Visual [...] read more
sql-server
visual-studio-2015
localdb
40votes
12answers

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 [...] read more
.net
database
networking
34votes
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
32votes
4answers

Entity Framework Scaffold-DbContext Login failed for user

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

EF Code First - Timeout expired. The timeout period elapsed prior to completion

Apology for this strangely worded question. I don't know what the actual problem is but hopefully someone can give me some insights. I am getting the following error when trying to run migrations: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not [...] read more
c#
sql-server
entity-framework
entity-framework-migrations
16votes
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
10votes
3answers

.NET Core can´t connect to SQL DB

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

remote procedure call (RPC) protocol stream is incorrect

I use entityframework 5.0. I have so many test. If I run a test alone it passes, if I run this with the others eachother in the same time, it does not pass. There is no contact between the tests. Everytime one same query was sent. It would not be [...] read more
c#
.net
wpf
entity-framework
tsql
7votes
2answers

Specified network name no longer available when connecting to SQL Server in .NET

I reinstalled my main work pc, but didn't reinstall visual studio after 5 months. Now i did and started my old project, and now it doesn't run. I get a timeout error when connecting to SQL Server, so i increased the timeout in the connectionstring and now i get the [...] read more
c#
sql-server
visual-studio-2015
7votes
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
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
7answers

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

There's been a string of random occurrences of the following error in the SQL Server Agent scheduled jobs lately that I have been unable to find a solution to. The error occurs infrequently, but usually once a week for a daily scheduled job, but in any number of different jobs [...] read more
sql-server
ssis
sql-server-2012
sql-server-agent
5votes
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 [...] read more
sql-server
windows-server-2012
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 [...] read more
networking
sql-server
windows-10
3votes
2answers

Azure Kubernetes .NET Core App to Azure SQL Database Intermittent Error 258

We are running a .NET Core 3.1 application in a Kubernetes cluster. The application connects to an Azure SQL Database using EF Core 3.1.7, with Microsoft.Data.SqlClient 1.1.3. At seemingly random times, we would receive the following error. ---> System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of [...] read more
c#
sql-server
azure
kubernetes
timeout
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 [...] read more
c#
entity-framework
migration
entity-framework-migrations
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
2votes
2answers

Parametrizing geometry sql command c# in ASP.NET, not working

I have used this string and tested it with string concatenation.But as you know it is not safe to use this to format an sql command. SqlCommand param = new SqlCommand(); param.CommandText = "INSERT INTO Circle (Center_Point, Circle_Data) VALUES (geometry::STGeomFromText('POINT(@center_lat @center_lng)',0),geometry::STGeomFromText('POLYGON((@polygon))',0));"; param.Parameters.Add(new SqlParameter("@center_lat", center_lat)); param.Parameters.Add(new SqlParameter("@center_lng", center_lng)); param.Parameters.Add(new SqlParameter("@polygon", polygon)); [...] read more
c#
sql
asp.net
spatial-query
2votes
0answers

Cannot create a migration, or run a migration on my computer

Updates on bottom Below is my console dump, which migrations execute in my main. (update-database) This has been working for a prolonged time, and even earlier today. After running a code comparison the only change I have on record is the addition of a field named __IsDisabled. I tried it [...] read more
c#
.net
sql-server
entity-framework
2votes
1answer

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

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 [...] 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
0answers

SQL server Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired on azure

I am using external SQL Server to host our database and ASP.NET MVC Core application is hosted on Azure. Locally on Dev machine, the Web application works fine when a complex query executed but on Azure I get an exception Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired I am using the same [...] read more
c#
sql-server
azure
entity-framework-core
timeout
1vote
1answer

System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near '@med_data'

I am developing a project and you are giving me an error : > "System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near > '@med_data'." But I can't figure out what could be wrong .... string humidade = "", temperatura = "", heatIndex = "", lpgGas = "", monoCarbo = "", smoke = ""; [...] read more
c#
sql
sql-server
1vote
1answer

Blazor WebAssembly App with Individual Accounts and ASP.NET Core Hosted - IIS - SQLLocalDB 15.0 The specified resource language ID cannot be found

Creating a new Blazor WebAssembly App with Microsoft Visual Studio 2019 Version 16.9.4 with these specifications: Target Framework .NET 5.0, Authentication Type Individual Accounts and ASP.NET Core Hosted: enter image description here [https://i.stack.imgur.com/ittF1.png] With no modifications I have simply started the project with IIS Express, ran migrations and added a [...] read more
c#
iis
asp.net-web-api
blazor
blazor-webassembly
1vote
1answer

Add IdentityUserClaim Navigation to IdentityUser<int>

I'm trying to add IdentityUserClaim Navigation to my custom IdentityUser< int >, I tried many ways but it didn't work. public class AppUser : IdentityUser<int> { [ForeignKey("UserId")] public List<AppUserClaim> UserClaims { get; set; } } public class AppUserClaim : IdentityUserClaim<int> { } public partial class ApplicationDbContext : IdentityDbContext<AppUser, AppRole, int, [...] read more
c#
entity-framework-core
identity
.net-5
1vote
0answers

Is it possible to make Entity Framework (Core) ignore missing columns when writing, to support backwards compatibility with old databases

We are using Entity Framework Core to access multiple versions of our database. We would like to have a single tool be able to work with a range of versions of the database. But if a new column has been added to a table when we use EF to write [...] read more
c#
.net
entity-framework
entity-framework-core
backwards-compatibility
1vote
3answers

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

Unable to connect to remote SQL server from docker container with bridge network mode

I have a Docker Swarm of four Ubuntu 20.04 machines. I want to run many different apps in a replicated fashion. One of these apps is an API that reads from a remote SQL Server running on a named instance. I am able to connect to SQL Server if I [...] read more
c#
sql-server
docker
asp.net-web-api
.net-core
1vote
2answers

ASP.NET [Win32Exception (0x80004005): Access is denied] Error

When I test it in Visuall Studio by pressing F5 and it's working fine and I can able to login the webpage and sql query process working nicely. Also note that my SQL server is active over internet which can be accessed using IP address. But when I publish my [...] read more
c#
asp.net
1vote
0answers

How can I revert to an older migration in EF Core? (FK key constraint)

I am having problems reverting the database model to an earlier migration in EF core. (Version 2.1.14) I am attempting to update the database model to a previous Migration before I deleted the "WorkingHour" table because I have re-deployed an older version of my build. In other words, I expect [...] read more
entity-framework-core
entity-framework-migrations
entity-framework-core-migrations
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
0votes
0answers

MSSql Database randomly not answering

We have a 32 Bit production machine that has MS SQL 2014 installed. 32 Bit is forced by twincat 2 running on it, (not compatible with 64 bit), thus the available ram is limited. Randomly, about twice a month, the database does not answer to the programs and the queries [...] read more
windows-7
database
32-bit
ms-sql
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
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
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
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] > [...] 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

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

CAML query on lookup calculated column

I have a problem running a CAML query. I get a 0x80131904 exception. My input data are the following one: MasterList contains the following columns: * Title (default one) * MyTextColumn (single line text column) * MyCalculatedColumn (calculated column defined with the following formula: =MyTextColumn&"_"&Title SampleData are: Title MyTextColumn MyCalculatedColumn [...] read more
caml
0votes
1answer

.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

Cannot connect to SQL Server with github action

I have been trying to figure this out since last Friday, I am trying to connect to a SQL Server database from my .net app. Can anyone point out what I am doing wrong? name: .NET on: push: branches: [ CI567 ] pull_request: branches: [ CI567 ] jobs: container-job: runs-on: [...] read more
c#
.net
docker
github-actions
0votes
0answers

How to Form the SQL Connection String while on Mac Terminal via Docker MSSQL Linux Container - Locally

I'm missing something here, and if someone could help clarify I'd greatly appreciate it: I have a Docker Ubuntu container running mcr.microsoft.com/mssql/server:2019-latest called sql1 on my Mac I also have an outside .net core 2 project from a friend i'm wanting to connect to and simply run update-database or dotnet [...] read more
sql
.net
sql-server
docker
connection-string
0votes
0answers

Error while connecting .net 5 app with sql server using docker

I've been trying to connect .net 5 app with mssql server using docker. I've been always getting this error: Microsoft.Data.SqlClient.SqlException (0x80131904): Login failed for user 'sa'. This is appsetting.json file: "ConnectionStrings": { "OrderingConnectionString": "Server=localhost;Database=OrderDb;User Id=sa;Password=SwN@12345678;" }, This is docker-compose.yml file: orderdb: image: mcr.microsoft.com/mssql/server:2017-latest This is docker-compose.override.yml file orderdb: container_name: orderdb [...] read more
c#
.net
sql-server
docker
entity-framework
0votes
1answer

Problem with blazor server + entity framework 6.4 application

I am having problems with a BLAZOR SERVER + Entity Framework 6.4 application The entity framework part is in a separate dll project (framework 4.6.2) shared by other projects. DB microsoft SqlServer (Express 2016) The blazor part is an asp.net core 5.0 project and razor server pages EVERYTHING WORKS ON [...] read more
.net
entity-framework
.net-core
0votes
1answer

Update-Database fails on foreign key conflict

I've an application which uses Entity Framework. It contains several migration files which do various database operations. Another user has been making updates directly to the database and now I can't get one of my migrations to apply when I run Update-Database. This is the error I get: > PM> [...] read more
c#
.net
entity-framework-core
0votes
1answer

ASP.NET Core Web API Entity Framework Invalid object name only when running through IIS Server

I have a web api which uses entity framework to land information from a web form in to a SQL Server database table. When running the api locally I can post to localhost and the records are landed in to the SQL Server database table with no issues. I have [...] read more
api
asp.net-core
iis
0votes
0answers

SharePoint Online - delete from a list via rest api in batch mode

I'm adding and removing items in a list on SharePoint online MS 365 via rest api in batch mode. Everything was working fine till last week. I started to get "HRESULT: 0x80131904" errors for some items in the batch when deleting. I got this error just for some items not [...] read more
api
rest
sharepoint-online
0votes
2answers

LINQ2SQL Expression - Conversion failed when converting date

I have this Linq expression var searchDate = DateTime.ParseExact("17.12.2018", "dd.MM.yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None); result = result.Where(DatePredicate("LaunchWeekStartDate", searchDate, 3)); and I call this expression public static Expression<Func<General, bool>> DatePredicate(string columnName, DateTime searchValue, int? operatorId) { var type = typeof(General); var x = Expression.Parameter(type, "x"); var member = Expression.Property(x, columnName); Expression expression; var [...] read more
c#
lambda
linq-to-sql
0votes
2answers

The wait operation timed out Win32Exception (0x80004005): The wait operation timed out azure

Following error comes when retrieving large amount of data from sql azure. I have already implement the Transient Fault Handling but still getting this error 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 [...] read more
sql
azure-sql-database
azure-vpn
0votes
0answers

Azure SQL unavailable to Web App intermittently

I have a webapp running in Azure. It uses a Azure MSSQL database set to Standard S0: 10 DTUs performance. The backend is written in dot net core 3.1. The app works fine when I visit it. Checking my logs I found a few of these, they happen weeks apart [...] read more
azure
azure-sql
0votes
2answers

SqlDataException: Incorrect Syntax near '='

I am trying get the data from database but I am getting this error. I am sure I am missing some simple logic but I couldn't figure out what's wrong with the query as it is working fine directly on DB. SqlCommand retrievedgeids = new SqlCommand("Select edgeid from Edges where [...] read more
c#
sql-server
ado.net
0votes
1answer

Failed to convert the date and / or time from a string

My app was working just fine for two months when it suddenly started printing this error. It doesn't tell in which page or where exactly it is I just get this: Erreur du serveur dans l'application '/'. Echec de la conversion de la date et/ou de l'heure à partir d'une [...] read more
asp.net
sql-server
0votes
1answer

Error uploading a document to SQL Server in .Net Core 3.1 Web API

I have a SQL Server stored procedure that is used for uploading a document and returns an ID upon success. I am storing the parameter file_data into a byte[] type in the Customer_Document_ADD class. public byte[] file_data { get; set; } The following is my repository code. public async Task<int> [...] read more
sql
.net-core
entity-framework-core
asp.net-core-webapi
asp.net-core-3.1
0votes
1answer

Azure Function is not getting triggered - Blob Storage Trigger

I have a simple Azure Function that is triggered when a new item is added in a Blob Storage. The function reads the new JSON file uploaded to the Blob Storage and loads the information in a DataBase. It works locally and when I deployed the function it was also [...] read more
azure
azure-functions
azure-functions-runtime
azure-blob-trigger
0votes
1answer

Cannot connect to local db in .net core app via kestrel server

I'm building an API in .NET 5.0 (core) and have run into a problem connecting to a database on my local SQL server instance. My previous projects have been ASP.Net running on IIS and issues like this have been typically resolved by changing app pool permissions etc. (I think this [...] read more
sql-server
database
asp.net-core
.net-core
kestrel-http-server
0votes
1answer

Incorrect syntax near the keyword 'Key'. Error in ASP.net DetailsView

I set up a DetailsView with asp.net. I enabled editing, inserting, and deleting. In the editing and inserting options when I finally submit I get this: > Incorrect syntax near the keyword 'Key'. with a stacktrace of: > [SqlException (0x80131904): Incorrect syntax near the keyword 'Key'.] > > System.Data.SqlClient.SqlConnection.OnError(SqlException exception, [...] read more
c#
asp.net
0votes
3answers

.NET Core - not able to connect SQL Server

I am using Visual Studio 2019 and using SQL Server docker image from this website I created docker container by docker run -d --name MySQLServer -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Password123@jkl#' -p 1433:1433 microsoft/mssql-server-linux I also connect the SQL Server using Azure Data Studio I have created migration script by command add-migration [...] read more
c#
.net
sql-server
visual-studio
docker
0votes
1answer

EF core "cannot insert explicit value for identity column" when using BYTE as identity column type in Sql Server

I am having trouble seeding data into a SQL database using EF Core during program startup. I have an EF Core table defined like this: migrationBuilder.CreateTable( name: "PoolStyles", columns: table => new { Id = table.Column<byte>(type: "tinyint", nullable: false) .Annotation("SqlServer:Identity", "1,1"), Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256), Code = table.Column<string>(type: [...] read more
c#
sql-server
entity-framework
entity-framework-core
0votes
0answers

Ef Core migrate enum to different enum type

I have a code-first EF project with a table which uses the wrong enum in one column and need to migrate it using EF Migrations. I have to both rename the column, and then copy the old values to the new ones. I know I can do it by simply [...] read more
c#
.net
entity-framework
enums
entity-framework-migrations
0votes
0answers

Simple SQL query timing out depending on input parameters

I have a very strange issue where depending on the query parameters the database call from the code below will fail with: Exception.Message = Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout [...] read more
c#
sql
sql-server
database
system.data
0votes
0answers

SQL ServerConnection from Unity

I am trying to connect my Unity instance to an SQL Client. I switched to Net Framework 4.x and have written the following code: serverConfig conf = JsonUtility.FromJson<serverConfig>(File.ReadAllText(@"Assets/Scripts/config.json")); string connString = string.Format("Data Source={0},{1};Initial Catalog={2};User ID={3};Password={4}", conf.address, conf.port, conf.database, conf.username, conf.password); //debug print(connString); SqlConnection cnn = new SqlConnection(connString); try { cnn.Open(); [...] read more
c#
database
unity3d
sqlclient
0votes
0answers

How to resolve "Login failed for user 'NT AUTHORITY\SYSTEM'. Reason: Failed to open the explicitly specified database 'TestTable1'"?

I'm developing a VB.NET windows service which connects with some SQL databases. When I try to start the windows service it throws me these errors in the windows event viewer. ERROR 1 Service cannot be started. System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'EDGEMAN\STLWKSENG11$'. at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, [...] read more
sql-server
vb.net
windows-services
event-viewer
sql-server-config-manager
0votes
4answers

Invalid column name .Don't Know Why?

Recently i add DateofBirth to a table . And Locally it's work fine. I also update client's data base and entity data model. But errors appears. Invalid column name 'DateofBirth'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more [...] read more
asp.net-mvc
entity-framework
client-server
stack-trace
0votes
1answer

Switching from SQLite to SQL Server?

I'm trying to simply switch from SQLite over to Microsoft SQL Server on a basic .NET 5.0 application for local testing purposes. I'm on Windows 10 running a linux subshell on Visual Studio Code. I've installed Microsoft SQL Server, and also the SQL Server Configuration Manager as well as SQL [...] read more
c#
sql
sql-server
0votes
1answer

EF Core incorrectly doing multiple inserts for Array

I'm still new with Entity Framework and I'm struggling with an issue while inserting records to the database on .NET Core API service I'm developing. Summarizing what is going on, I'm not generating the schema from EF, instead I create the tables in SQL and just have EF access it. [...] read more
c#
sql-server
entity-framework
.net-core
entity-framework-core
0votes
1answer

Entity Framework Core 3.1 is throwing a timeout exception for a query that when executed directly is fast

I have a paged query that throws an time-out exception when executed by EF Core 3.1. > Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. > The timeout period elapsed prior to completion of the operation or the server > is not responding. The in-code construction of the query: Context.Invoices .Include(i => i.InvoiceLines) [...] read more
c#
sql
entity-framework
ef-core-3.1
0votes
0answers

Login using MSSQL Local server on SmarterASP.NET online Website?

This is the error when I login my account in my live website using smarterASP.net. Is it possible to get data source from a local server to a live website? is there anyone encounter with this problem? Server Error in '/' Application. The user name or password is incorrect Description: [...] read more
asp.net
asp.net-mvc
asp.net-core
asp.net-mvc-4
aspx-user-control
0votes
0answers

Introducing FOREIGN KEY constraint on table may cause cycles or multiple cascade paths. when creating database with Entity Framework

I am trying to create an app with database using Entity Framework while mostly following this tutorial (https://docs.microsoft.com/en-us/aspnet/core/data/ef-rp/intro?view=aspnetcore-5.0&tabs=visual-studio). I have following models: call.cs: using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.ComponentModel.DataAnnotations.Schema; namespace ContactTracing15.Models { public class Call { [DatabaseGenerated(DatabaseGeneratedOption.None)] public int CallID { get; set; } public int [...] read more
asp.net
sql-server
entity-framework
0votes
0answers

How can I add a same table name but different schema in EntityFramework?

I have a situation where I need to create a new table in a separate schema through EntityFramework that has the same table name in a different schema. How can this be done through EntityFramework? I am currently locked to EntityFramework 5.0.4, so I cannot move on to EntityFramework 6. [...] read more
c#
entity-framework
database-migration
entity-framework-migrations
database-schema
0votes
0answers

Getting System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near 'OfficeOpenXml'. Error message

I'm trying to import Excel sheet data into the DB via SSIS script task, I'm continuously getting the above error message. The Excel file has 3 sheet, and we have separate table for each sheet of that Excel file in the database. Also I'm not getting any error in the [...] read more
c#
sql-server
excel
visual-studio
ssis
0votes
1answer

Entity Framework Core: default value when migrating nullable column to required

I have a datetime2 column that used to be nullable. We now need this column to be set so we want to set it as required and migrate the column with a default value of 1970-1-1. I have created the migration and edited the migration-file to the following: protected override [...] read more
c#
sql-server
entity-framework
.net-core
entity-framework-core
0votes
0answers

Azure Hybrid Connection SQL Connection stops working. Restart of Web App helps. Problem with EnableRetryOnFailure?

I have an Azure Time stamping Web App connecting to about 50 different customers On Premise SQL databases using Hybrid connection. The web app is an Asp.Net Core 2.2 based C# app using EF. The app has been working extremely well over 2 years without any errors, but the recent [...] read more
sql-server
asp.net-core
sqlconnection
azure-hybrid-connections
0votes
1answer

Cannot connect to container within compose but host connectivity works

Using the docker compose file version: '3' services: sqlserver: image: microsoft/mssql-server-linux:2017-latest ports: - 1401:1433 volumes: - ./db:/tmp/data environment: - ACCEPT_EULA=Y - "MSSQL_SA_PASSWORD='Password99'" command: - /tmp/data/run.sh api: build: context: . dockerfile: dockerfile depends_on: - sqlserver links: - sqlserver ports: - 5000:80 With appsettings.json connection string: "ConnectionStrings": { "Entities": "data source=(local),1401;initial catalog=DB_Test;user [...] read more
docker
docker-compose
0votes
0answers

EF.Core Multithreading The timeout period elapsed

I am running a BackgroundTask in my ASP.NET Core 5 app which creates some entities inside my database. My idea was to run it in multiple tasks to speed up the generator. public class GeneratorService : BackgroundService { private const int TaskCount = 8; private uint _index; private readonly List<Task> [...] read more
c#
sql-server
multithreading
entity-framework
asp.net-core
0votes
0answers

Executable has network-related or instance-specific error

I built in executable in Visual Studio that serves as an application for users to make changes to data in a SQL Server. When I run the executable on my machine it works fine. Another developer is also able to run it on his, but whenever we send it to [...] read more
.net
sql-server
networking
executable
0votes
1answer

A network-related or instance-specific error has occurred while establishing a connection to SQL Server

We have 4 servers, three of which are the main servers that contain SQL Server databases, and we are going to the mobile app on server 4 so that our users can connect to their database on their phones. Server 4 has an intermediary role, but now the problem we [...] read more
sql-server
0votes
0answers

C# SQL Server connection error System.Data.SqlClient.SqlException (0x80131904)

I have tried to connect to my databse in sql server. My code is the following: private void button1_Click(object sender, EventArgs e) { SqlConnection cnn; string connetionString = "Server = ULTRABOOK - JJ/MSSQLSERVERML;" + "Initial Catalog = Research;" + "User id = ULTRABOOK-JJ/jurje;" + "Password = \"\";"; cnn = new [...] read more
c#
sql
sql-server
database-connection
0votes
3answers

SQL Server 2008 - Update Query Timeout

I'm using SQL2008 and .NET 4. The following UPDATE query causes timeout errors. Table Pages has 600,000 records. Error: > System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout > period elapsed prior to completion of the operation or the server is not > responding. Query: UPDATE Pages SET Checked = 1 , [...] read more
.net
sql-server
tsql
sql-server-2008
0votes
0answers

A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - Success)

> Unhandled exception. System.Data.SqlClient.SqlException (0x80131904): A > transport-level error has occurred when receiving results from the server. > (provider: TCP Provider, error: 0 - Success) This is a NET5.0 console app using dapper to execute a stored procedure that will not store a result. The app is running from a [...] read more
asp.net
.net
sql-server
docker
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 adding [...] 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 [...] 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
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 [...] 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
-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

System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'husen'

I have a windows service that's supposed to insert data from one db to another I have these two connection strings for each db in my app.config file <connectionStrings> <add name="Connection1" connectionString="User ID=husen;Password=test;Persist Security Info=False;Initial Catalog=IntalioStock;Data Source=(localdb)\MSSQLLocalDB;"/> <add name="Connection2" connectionString="User ID=husen;Password=test;Persist Security Info=False;Initial Catalog=CustomersVIP;Data Source=(localdb)\MSSQLLocalDB;"/> </connectionStrings> And that's what I'm [...] read more
c#
sql-server
windows-services
database-connection
-1votes
0answers

Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'View_User'

SQL Server to another when I try to log in the web app we get this error. On the other server the apps turn on test domain. Can somebody help me with this? > Exception Details: System.Data.SqlClient.SqlException: Invalid object name > 'View_User'. > > Source Error: > > An unhandled [...] read more
c#
asp.net
sql-server
migration
-1votes
0answers

Dropping and recreating a column with Entity Framework Core

I have an entity with the following: [DatabaseGeneratedAttribute(DatabaseGeneratedOption.None)] [Key] public int Id { get; set; } which I changed to: public int Id { get; set; } When I created my migration and ran Update-Database I got this error: > PM> Update-database Build started... Build succeeded. > System.InvalidOperationException: To change [...] read more
c#
.net
entity-framework-core
-1votes
3answers

EF Core 5 - Updating an entity in many-to-many relation throws "Violation of PRIMARY KEY" error

I am working with .NET 5 and using EF Core and MSSQL for database. I have 2 classes that have many to many relationship between them. Those were migrated from models to DB. example of DB tables Migration: migrationBuilder.CreateTable( name: "TournamentUser", columns: table => new { TournamentsId = table.Column<int>(type: "int", [...] read more
c#
sql-server
asp.net-core
entity-framework-core
many-to-many
-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
-2votes
0answers

procedure or function expects parameter which was not supplied1

We have a search page linked to the following page. When we search for something specific i.e. the Book Title we receive an error saying the inputted parameter wasn't provided. We attempted to change the sproc and the below code to search for an ID number in our table but [...] read more
c#
stored-procedures
-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
-3votes
1answer

Failed Database to add Data

I am trying to create a CRUD Application using .Net Core Api with Angular11.I follow this link https://www.codaffection.com/asp-net-core-article/angular-crud-with-asp-net-core-web-api/ for creating this.and I not totally completed all functionality yet.just i created functionality 'Add from information into the database.'But when I click the "Submit" button to add my form data into the [...] read more
c#
angular
asp.net-core
asp.net-web-api

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