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

281votes
16answers

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
102votes
20answers

There is already an object named in the database

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

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

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

Win32Exception (0x80004005): The wait operation timed out

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

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

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

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

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

Entity Framework Scaffold-DbContext Login failed for user

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

Adding 'GO' statements to Entity Framework migrations

So I have an application with a ton of migrations made by Entity framework. We want to get a script for all the migrations at once and using the -Script tag does work fine. However...it does not add GO statements in the SQL giving us problems like Alter view should [...] read more
sql
entity-framework
ef-migrations
8votes
2answers

The wait operation timed out

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

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

Math Absolute In Ef Core?

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

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

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

SQL Server 2008 R2 Express + Wildcard SSL Certificate

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

Random connection failures between IIS8 and MSSQL 2012 in RackSpace Cloud

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

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

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

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

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

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

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

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

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

SQL Server 2012 Connection Timeout Expired

I am running MS-SQL Server on Windows Server 2012. From time to time I get this Exception: > Server Exception : System.Data.SqlClient.SqlException (0x80131904): Connection Timeout Expired. The timeout period elapsed during the post-login phase. The connection could have timed out while waiting for server to complete the login process and [...] read more
sql-server
windows-server-2012
3votes
1answer

EF Core 3.0 SumAsync triggers aggregate function exception

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

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

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

SQL Server connection errors when moving .net app to new server

I have a number of .NET web apps on a Server 2008 machine that I'm trying to migrate to a Server 2019 machine, and some of them are giving me problems connecting to SQL Server 2016 instance on another server after moving them. The error I get is > System.Data.SqlClient.SqlException [...] read more
c#
asp.net
sql-server
asp.net-core
windows-server-2019
2votes
1answer

Dropping SQL Tables if they exist / Creating if they don't (Within C#)

I am trying to create a C# Method to DROP tables if they exist and to create if they do not. So far I have created a SQL query which is TRYING to delete the tables if they exist. However I am getting this error > System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax [...] read more
c#
sql
sql-server
2votes
2answers

Stored Procedures in EF Core 3.0

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

Azure SQL serverless is not waking up on connection attempt

I'm testing Azure SQL Serverless and from SSMS it seems to work fine, but from my ASP.NET Core application it never wakes up. Using SSMS I can open a connection to a sleeping Serverless SQL database and after a delay the connection will go through. Using my ASP.NET Core application [...] read more
azure
.net-core
azure-sql-database
serverless
2votes
0answers

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

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

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

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

Azure Hybrid Connection with Entity Framework Connection failure

I'm attempting to publish an ASP.net web app to the Azure cloud. I have to use a hybrid connection to talk with one of my SQL Servers. I believe I have it all set up correctly; however, my entity framework connection string does not appear to work. This is what [...] read more
asp.net-mvc
azure
entity-framework-6
azureportal
azure-hybrid-connections
1vote
2answers

.Net Core Docker Image cannot access database when running in docker

I have a dotnet core application that tries to access to the database, when I run it in visual studio it works fine (probably because of my domain authentication) but when I try to build docker image and run it with docker run -it --rm -p 8080:80 --name console console [...] read more
c#
docker
1vote
3answers

SQL statement used in C# program wont recognize database "System.Data.SqlClient.SqlException (0x80131904): Showing Invalid object name 'CDA'."

I am developing a basic C# application that will read folder names and insert them into a DB. However it keeps throwing > System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'CDA'. (CDA is name of my database) This is the code in question static void InsertSql(Guid folderGuid, string folderName) { try { [...] read more
c#
sql
sql-server
1vote
0answers

Connect to SQL server container with other docker container

I have a Docker container with SQL Server: sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Foo" \ -p 1433:1433 --name sql1 \ -d mcr.microsoft.com/mssql/server:2019-GA-ubuntu-16.04 I want to connect to this SQL Server from my application, using this connection string: "DefaultConnection": "Server=sql1,1433;Database=mydb;User Id=superuser;Password=Foo;TrustServerCertificate=True", My docker container which wants to connect is run [...] read more
c#
sql-server
docker
1vote
2answers

Execute Reader wait operation time out error

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

ef core context.Database.ExecuteSqlRaw(sql, param1, param2) throws SqlException

ef core version I use is :3.0 The code I write is somehow like below: SqlParameter table = new SqlParameter("@tableName", tableName); SqlParameter entryId = new SqlParameter("@entryId", id); string sql = "delete from @tableName where id = @entryId"; context.Database.ExecuteSqlRaw(sql, table , entryId); my sql statement have two parameters, which I have [...] read more
c#
asp.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
1answer

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

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

Code First EF Concurrency Token with Guid

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

How to setup NLog to show sqlexception linenumber in log?

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

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

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

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

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

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

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

Xamarin SqlServer cant get a connection

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

Azure Studio connection Error with MS SQL on Linux Mint 19.2

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

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

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

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

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

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

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

Sql Exception 0x80131904 cannot log in

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

SQL Login fails for app but not for SSMS

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

Active Directory SQL Server Random Handshake Timeouts

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

Unable to connect to a new installation of sql server

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

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

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

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

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

Intermittent DB connection failure

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

Delete TFS Project Collection - SqlException

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

How can I troubleshoot an application connecting to SQL Server

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

Hosting Website Issue

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

Getting error when trying to save data to database in console app

My app scans a folder for any changes made in it. Once it has detected a file being added it should the save that file or path in my database. But at the moment this is the error I am getting: File created: New Text Document - Copy (2).txt Unhandled [...] read more
c#
0votes
0answers

If exists, update is getting timeout from using ExecuteNonQueryAsync() in C# Azure Function from about 450k rows in SQL Server

I am getting a timeout error from using ExecuteNonQueryAsync() to do an update if something exists. The table that I am doing the update has about 450k rows so I wonder if this has something to do with it. Below is the query IF EXISTS (SELECT * FROM dbo.File_Tracker WHERE [...] read more
c#
sql-server
0votes
0answers

Docker recipe for .NET Core 3.1 and SQL Server

I have a Docker recipe to run a server for .NET Core 3.1 and SQL Server. The recipe is: Dockerfile FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 as base WORKDIR /app EXPOSE 80 FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build WORKDIR /src COPY ["ExampleProject.csproj", "./"] RUN dotnet restore "./ExampleProject" COPY . . RUN dotnet build "ExampleProject" -c Release [...] read more
sql-server
docker
.net-core
asp.net-core-3.0
0votes
0answers

Unable to connect to DATABASE while using command Update-Database

So, let me explain the problem a bit. I have installed MYSQL server and created a new connection and a databaseMYSQL SERVER And i can connect with no error:Connection no error Then i used the "Server Explorer" menu in visual studio to connect to the same database and grab the [...] read more
c#
mysql
.net-core
0votes
2answers

SqlParameter "disappears" when assigned a value of null?

I stumbled across the following issue recently: Assigning a null to the Value property of an SqlParameter appears to cause the parameter to be omitted from the query rather than passing NULL. This results in a potentially misleading error message when the Stored Procedure has no default value for the [...] read more
.net
sql-server
default-value
sqlparameter
0votes
0answers

.NET Core valid IdentityUser Registration model returns NULL

I started developing a .NET Core 3.1 app and I'm stuck at the IdentityUser registration. The ApplicationUserModel model is valid (ModelState.Valid = true) but when I create a new variable the new variable is always null. It just doesn't make sense! Code below: [HttpPost] [AllowAnonymous] [Route("Registration")] public async Task<IActionResult> UserRegistration(ApplicationUserModel [...] read more
c#
.net-core
model
null
bind
0votes
0answers

ASP.NET MVC viewmodel SQL query syntax

I'm trying to convert basic models to model vİew and SQL queries. So what is wrong my queries or other files? // GET: Cars public ActionResult Index() { List<CarsTrxViewModel> model = db.Database.SqlQuery<CarsTrxViewModel>(SqlCars.CarsTrxByID()).ToList(); return View(model); // return View(db.Cars.ToList()); } View model: public class CarsTrxViewModel { public int CarID { get; set; [...] read more
c#
sql-server
asp.net-mvc
action
viewmodel
0votes
0answers

How to resolve SQL Exception 0x80131904?

I've connected a SQL Server to an ASP .Net Core app, but now, everytime I launch the app, or call "Update-Database", in Visual Studio, returns the error > Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. Also, I'm trying to deploy the [...] read more
sql-server
visual-studio
asp.net-core
iis
.net-core
0votes
0answers

[SqlException (0x80131904): Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance

Can someone tell me why I'm not able to login to my web application in visual studio? I know that the web.config connection string is correct, because it is reading the rates table and showing correctly on my home page when I debug it in visual studio. I have already [...] read more
instance
generate
0votes
1answer

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

SQL Server doesn't delete all database files, when the database is deleted?

I run SQL Server using Docker with image mcr.microsoft.com/mssql/server:latest. My problem is that, if I delete a database as follows: ALTER DATABASE [ZapDB] SET OFFLINE WITH ROLLBACK IMMEDIATE; DROP DATABASE [ZapDB]; then files remain in the SQL Server's filesystem, which prevents a new database with the same name to be [...] read more
sql-server
database
0votes
1answer

How do I migrate asp.net 2.2 identity tables to asp.net 3.1 schema?

I started a project with asp.net core 2.2. I developed the database using the "code first" approach. Later, I created a new solution with asp.net 3.1. I generated an initial migration from that existing database. Lastly, I added authentication and roles to the new asp.net 3.1 web app. Unfortunately, now [...] read more
asp.net-core
entity-framework-core
asp.net-identity-3
ef-core-3.0
0votes
0answers

After SQL restart, CTE causes invalid object name error for a short period in SQL Server 2019

We have some SQL code that has been in production for some time, in a SQL Server 2016 database; but it is raising an error in a SQL Server 2019 database for the first hour or so after restarting SQL Server (anywhere from 5-10 minutes to an hour or more, [...] read more
sql-server
common-table-expression
intermittent
sql-server-2019
0votes
1answer

Not Getting Back a Count from an Insert Executed by ExecuteNonQuery Against MS SQL Server from PowerShell script

The following code executes a BULK INSERT which succeeds, but it does not return the number of rows affected. When I do a 'SELECT count(*) ...' to confirm the count, millions of rows have been inserted. I suspect the overflow error is part of the problem. Why is the rows [...] read more
sql-server
powershell
error-handling
executenonquery
0votes
1answer

Why is Entity Framework Core attempting to insert records into one of the tables from many to many relationships and NOT the join table?

Given the following set up where there are many Teams and there are many LeagueSessions. Each Team belongs to zero or more LeagueSessions but only ever one LeagueSession is active. LeagueSessions have many teams, and the teams will be repeated. Many-to-many relationship is established between Teams and LeagueSessions with a [...] read more
c#
entity-framework-core
0votes
2answers

EF using code first with existing table

I am using MVC5 & EF6. I am doing code-first approach. I have some tables that require to be generated using migration (works) and some tables that I need to use from existing database - tables. in the DbContext class I have 'new table that is created in the DB [...] read more
asp.net-mvc
entity-framework
ef-code-first
entity-framework-6
ef-migrations
0votes
1answer

.net core api returns 500 when i make a post request from axios post

I have a .net core web api deployed on azure with mssql database which is also deployed on azure. I try to do a post request from postman and it's successful but when i try to do it inside my react app using axios i get 500 error which has [...] read more
sql-server
reactjs
asp.net-core
axios
asp.net-core-webapi
0votes
1answer

How to connect to an SQL Server on Parallels VM

I'm attempting to connect to a test Database on a Parallels VM on Mac using Azure Data Studio, but I'm getting the standard, generic connection error: > System.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 [...] read more
sql-server
parallels
azure-data-studio
0votes
1answer

IIS, SQL Server & Umbraco

I wonder if anyone can help me out, we have a Umbraco installation running: * OS: Microsoft Windows Server 2016 Standard, v10.0.14393 Build 14393 * SQL Server: SQL Server 2016 Standard Edition, v13.0.1728.2 * Umbraco: v7.3.4 The server had a scheduled reboot this morning at 5 am, from then, we've [...] read more
sql-server
iis
umbraco
umbraco7
0votes
2answers

How to add complex class object to DB via EF Core, object got from client

I have controller method to add a book: [HttpPost()] public IActionResult AddBook([FromBody] BookPL book) { if (!ModelState.IsValid) { return StatusCode(400, "Model is not valid"); } try { book.BookId = Guid.NewGuid(); var newBook = mapper.Map<BookDto>(book); booksService.AddBook(newBook); return StatusCode(201, "Book was added"); } catch (Exception ex) { return StatusCode(500, "Internal server error. [...] read more
asp.net
entity-framework
asp.net-core
entity-framework-core
0votes
1answer

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

SQL Server DbCommand Timeout with .Net Core container under load

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

k8s not able to reach the database

Here is my docker image FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-alpine3.8 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 COPY ./xyz/publish . ENV ASPNETCORE_URLS=https://+:443;http://+80 ENTRYPOINT ["dotnet","abc/xyz.dll"] Here is my Deployment.yaml file apiVersion: apps/v1 kind: Deployment metadata: name: xyzdemo namespace: default spec: replicas: 1 selector: matchLabels: papi: web template: metadata: labels: papi: web spec: containers: [...] read more
azure
docker
kubernetes
0votes
0answers

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

How do I create a database with EF and begin using it?

I have a small app I am writing as an exercise to learn how to work with SQL databases in C# .NET. My app tries to open a connection to a database, and if it fails, it assumes that the database was not there and creates it. This database is [...] read more
c#
.net
sql-server
database
entity-framework
0votes
0answers

Unable connect to api database even though set to local system account

Ok hope you all can help me out I have installed the .net core runtime hosting pack from here. https://dotnet.microsoft.com/download/dotnet-core/3.1 I set my credentials based on this so article Login failed for user 'IIS APPPOOL\ASP.NET v4.0'. enter image description here [https://i.stack.imgur.com/egzCW.png] > But in my even its saying the following. [...] read more
asp.net-core
0votes
1answer

SQL Error The turnaround time has expired

I have a sqlServer problem in my .net MVC application Well the error is thrown from the da.fill(ds) line : cmd = new SqlCommand(req, con); DataSet ds = new DataSet(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(ds); return ds; and this is the error : The turnaround time has expired. The [...] read more
sql-server
asp.net-mvc
0votes
1answer

I can't catch the SqlException using try-catch

I try to catch the SqlException using try-catch so I wrote this code: public async Task Open() { try { if (sqlconnection.State != ConnectionState.Open) { await Task.Run(() => sqlconnection.OpenAsync()).ConfigureAwait(false); } } catch(SqlException ec) { XtraMessageBox.Show(ec.Message); } } public async Task<DataTable> SelectData(string stored_procedure, SqlParameter[] param) { using (SqlCommand sqlcmd = new [...] read more
c#
winforms
0votes
0answers

TimeOut - Identity (Authentification) .net Entity Framework

I use .NET 4.5 and my database is SQL Server Express on Amazon RDS; my hosting elastic beanstalk I have problem only when I use authentication (sign in and sign up). I have (list product etc) and it works (i see a list a products in my website) Is not [...] read more
c#
.net
amazon-web-services
entity-framework
entity-framework-4
0votes
1answer

IIS Connection string to SQL Server

After publishing the project in IIS received an error:Error [https://i.stack.imgur.com/is79C.png] LogFile: 2019-11-26 11:33:55.5348 | Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition`2.Log | ERROR | An error occurred using the connection to database 'Appdb' on server '(LocalDb)\MSSQLLocalDB'. 2019-11-26 11:33:55.5931 | Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition`3.Log | ERROR | An exception occurred while iterating over the results of a query for context [...] read more
c#
asp.net
iis
core
0votes
0answers

.NET Core Entity Framework get user running Stored Procedure

I have a ASP.NET Core Web API running which is running under Windows Authentication. I have Entity Framework for working with my database using connectionstring syntax: "data source=dbserver;initial catalog=IntranetDB;persist security info=True;Integrated Security=SSPI;" My Web API is running under a specific application pool and service account: sa_db. This sa_db is owner [...] read more
sql-server
asp.net-core
stored-procedures
entity-framework-core
0votes
1answer

Log4Net is not logging in database after error how ever its logging in file

I have one weird issue which is coming into log4net. I have enabled the log4net with AdoDotNet appender. its works fine generally and logging into database but sometimes it suddenly stops working and not logging into database. but when we change the level info from the info to debug and [...] read more
sql-server
log4net
log4net-configuration
log4net-appender
0votes
1answer

How does one connect an exsisting SQL Server to an ASP.NET forms application (Website) using built-in login controls within Visual Studio

Problem: I'm trying to create a login form using built-in (drag and drop) form controls in Visual Studio 2019. It's my first time using these controls as opposed to working with php and switched over for the sake of efficiency. So, I am attached to the idea of using the [...] read more
c#
asp.net
sql-server
visual-studio-2019
0votes
0answers

Batch Separating SQL Statements with DBContext APIs

we believe we recently ran into a race condition with some of the t-sql being executed from our application and believe we found what is causing the issue. We have t-sql being called at various times to preserve temp data that we need in the application. Part of this also [...] read more
tsql
dbcontext
sqlclient
0votes
2answers

Is there a way to increase remote query timeout for SQL Azure without increasing DTUs?

I get a timeout selecting rows in my SSIS package... (Complete error details below). * The query runs for 3mins in SSMS. * My SQL Azure Server has a Standard1 scale (20DTUs). * Time elapsed is always 30seconds. * I did fix the "Connect Timeout" and set a value of [...] read more
ssis
azure-sql-database
timeoutexception
0votes
0answers

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

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

ASP.Net code first project The wait operation timed out

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

SQL Server 2017 login failed by SSL provider

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

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

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

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

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

how to target sql server 2008 with EF Core

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

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

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

Invalid object name 'umbracoLock' error in Umbraco 7

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

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

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

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

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

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

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

When use TransactionScope get System.Reflection.TargetInvocationException

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

How can I use IdentityServer 4 and SQL Server?

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

ConnectionStrings not working when I publish solution

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

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

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

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

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

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

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

while scaffolding-DbContext from Azure database storage

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

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

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

ASP.NET Storing TimeSpan in EF Database

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

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

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

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

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

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

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

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

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

ASP Application on IIS crash

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

Passing dataTable to SP with result

im trying to send dataTable as parameter to SP . i have in the DB user-defined table with 6 columns. [OrderId] [int] NULL, [IsOr] [bit] NULL, [CId] [int] NULL, [Op] [varchar](20) NULL, [string1] [nvarchar](max) NULL, [datetime] [datetime2](0) NULL Im using Nhibernate to send the objects but i get the following [...] read more
c#
sql
nhibernate
datatable
-1votes
0answers

Connect to Microsoft SQL localhost database from Docker container with Docker Desktop for Windows

I've got a .NET Core 2.2 Web Application running on my Windows machine trying to communicate with my Microsoft SQL localhost database. I'm using the following command to generate a container from my image docker run -d -p 3000:80 --name dockerdemocontainer dockerdemoimage but then I get a 500 internal server [...] read more
.net
windows
docker
-1votes
0answers

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

My SQL Server is 2016 SP1, Enterprise edition, installed on Windows server 2016 Datacenter. It's always-on cluster, master and standby. in sync mode. I am getting from time to time the error: > ERROR 2019-12-25 07:28:48,523 class:ODBCWrapper.StoredProcedure topic:null method:ExecuteDataSet server:IP-AC1F6CDD ip:null reqid:null partner:null action:null uid:0 msg:While running : 'Get_customerID' Exception [...] read more
sql-server
connection
database-connection
alwayson
-2votes
1answer

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

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

A network related or instance specified error occurred (Error Microsoft .NET Framework)

I have created an (.exe) setup file in winforms application but when I try to install this application on another computer its giving me an error > Unhandled exception has occurred in your application. If you click continue, the application will ignore this error and attempt to continue. if you [...] read more
c#
sql-server

Comments

Leave a comment

(plain text only)

Sources

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

User contributions licensed under CC BY-SA 3.0