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

259votes
13answers

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

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

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

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

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
50votes
13answers

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
38votes
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
31votes
8answers

The network path was not found

I'm running my code and getting this error. But what does it mean? > The network path was not found Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the [...] read more
.net
database
networking
23votes
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
14votes
4answers

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

Azure: Login failed for user

What I have done: * I added Resource group in Azure. * Added Web Service with previous resource group. * Added SQL Server Database with previous resource group. * Retrieved generated connection string from this database and provided here username and password. * Added this connection string to App Settings [...] read more
.net
sql-server
database
azure
6votes
1answer

[Win32Exception (0x80004005): The system cannot find the file specified]

I'm working on a joke web application. I work with C#, Entity Framework, MVC and I do code-first. Now when i try to read out something in my DB, the error I put in the title shows up. And I have no idea what to look for. I looked up [...] read more
c#
sql-server
asp.net-mvc
code-first
entity-framework-6
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

Azure Web App Error, No such host is known

When Running the web App locally there is no issue to connect to the DB, after deploying the Web App to Azure the DB(Also Azure) connection attempt throws the following error: [Win32Exception (0x80004005): No such host is known] [SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection [...] read more
asp.net
azure
azure-sql-database
azure-web-sites
5votes
3answers

SQL timeouts after moving to azure

After deploying my application to Azure I am experiencing sql timeout issues with a few db intensive reports. I have tried changing the sql timeout in the connection string but without any effect.. I have also tried upgrading the database from S2 to P1, which then is performing well enough [...] read more
c#
azure
azure-sql-database
5votes
2answers

Why can't I see a localdb database created by a UWP (Desktop Bridge App) in the SQL Server Object Explorer?

Does UWP support LocalDB? My investigations indicate there are some issues using localdb that I don't experience with SQL Server 2017 Development edition. I managed to convert a winforms EF-Code First, xaf application to run as a UWP app with the help of this blog I have Enterprise Authentication set. [...] read more
entity-framework-6
desktop-bridge
xaf
project-centennial
sql-server-2016-localdb
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
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
4votes
3answers

CREATE DATABASE permission denied in database 'master'. Cannot attach the file 'C:\co\App_Data\xxx.mdf' as database 'xxx'

I have a problem with attaching the database with information about users. I'm trying to move the asp.net mvc4 project to the IIS. MS SQL Server 2008 Express. <add name="DefaultConnection" connectionString="Data Source=.;Initial Catalog=aspnet-comvc4-20130423110032;Integrated Security=true;AttachDBFilename=|DataDirectory|\aspnet-comvc4-20130423110032.mdf;" providerName="System.Data.SqlClient" /> Error: Description: An unhandled exception occurred during the execution of the current web request. [...] read more
asp.net
sql
connection-string
4votes
2answers

NLog, ASP.NET Core and SQL - The server was not found or was not accessible

I've been trying to get an ASP.NET Core site working with NLog. It works fine until I try to write to a SQL Database. I've tried local databases and Azure databases - all with the same problem. I've even added the nlog table to a known database, one the site [...] read more
sql-server
asp.net-core
nlog
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

.NET Core can´t connect to SQL DB

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

EF Core database update specify base version

In my projects I have two EF core migrations files in the Migrations folder which I have created based on the initial release and after an update. The initial migration ("Initial") contains many CreateTable statements, whereas the second migration ("Cleanup") only contains a few DropColumn statements in their Up methods. [...] read more
c#
entity-framework-core
ef-migrations
3votes
3answers

Error when connecting to SQL Server in docker container

I have an ASP.NET Core WebAPI running inside a Windows Docker container. I'm having trouble connecting to an on premises SQL instance from inside the app. This is the error message: > (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not [...] read more
c#
docker
asp.net-core
.net-core
docker-windows
3votes
2answers

Weird Entity Framework error: login failed for user

I have an application with multiple DbContext subclasses that share a connection string (this is to avoid EF's horrible startup time with a single large DbContext type). At certain points (repeatable for me and somewhat for others), I get the following error when trying to make a database query: > [...] read more
sql-server
asp.net-mvc-3
linq
entity-framework
3votes
1answer

Umbraco 7.5.4 installation error: Invalid Objectname CmsContent

I've installed umbracoCms((version 7.5.4)) nuget package to my empty mvc project (.Net 4.6.2, vs2015). Then, I run the project and it opened installation page. Then I customized connection and used a connectionstring for an ms sql 2016 database. I didn't select any starter website and I've got the error below: [...] read more
installation
nuget
umbraco
umbraco7
3votes
1answer

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

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

Timeout when passing large table-valued parameter

I am calling a SQL Server stored procedure using ADO.NET, and I have to pass a very large Table-Valued parameter. I get this timeout exception very often: System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): [...] read more
c#
sql-server
ado.net
timeout
table-valued-parameters
2votes
1answer

Package fails because System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near 's'

My package was perfectly fine for couple of days and today whenever I tried to run it, it transferred few columns from the first file in the folder and failed. The error that I'm getting is: > System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near 's'. Unclosed quotation mark after the character string [...] read more
c#
sql
sql-server
csv
ssis
2votes
1answer

Entity Framework Core with managed identity to Azure SQL gives Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON

We've enabled managed identity to connect to our Identity Server database on Azure using this tutorial but get the following error after a while (~7 hours). System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, [...] read more
sql-server
azure
asp.net-core
entity-framework-core
identityserver4
2votes
0answers

SQL timeout on one page of aspx site

I've just gone live with an web application using aspx pages, C# behind. All sitting on SQL Server. All data delivered with stored procedures. Almost all the procedures are dynamic SQL, with the sql statement being built in the procedure itself based on parameters passed in. There are three virtually [...] read more
c#
asp.net
sql-server
2votes
1answer

Incorrect syntax near @indexName. Dapper

This seems like a strange behaviour, but the following code is throwing an error: public async Task RebuildIndex(string tableName, string indexName) { await _dbConnection.ExecuteAsync($@" alter index @indexName on @tableName rebuild;", new { indexName = indexName, tableName = tableName }); } Error message: System.Data.SqlClient.SqlException (0x80131904): Неправильный синтаксис около конструкции "@indexName". at [...] read more
c#
sql-server
dapper
2votes
0answers

.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
2votes
1answer

How to restore SQL localDB programmatically

I'm trying to create backup and restore functionality to my Windows form application. So, I've tried to do a database restore. My code is like this: string cbdfilename = "c:\\Users\\Public\\Public Document"; SqlConnection.ClearAllPools(); SqlConnection con = new SqlConnection("Data Source=(LocalDB)\\v11.0;AttachDbFilename=|DataDirectory|\\BbCon.mdf;Integrated Security=True;Connect Timeout=30;"); string sql; sql = "Use master;Alter Database BbCon Set Single_User [...] read more
c#
sql-server
restore
localdb
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

Dynamic CRM 2011 Import Organization from different locale fails on SQLException

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

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

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

Team Foundation Server (TFS) 2017 Failing to create backup

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

Azure VPN cannot connect to sql server

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

Install SQL Server 2017 on Windows 10 Azure VM

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

Windows 2012 R2 Azure VM Cannot Connect To Local SQL Server

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

SQL Connection Problems between two servers

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

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

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

what instance name in connection string for Dynamic management Views

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

Powershell Remoting always logs in as anonymous

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

Error removing the IUser in EpiServer - SqlException: Execution Timeout

I have used, CommunitySystem.CurrentContext.DefaultSecurity.RemoveUser(IUser user); To remove user. However, this was working fine. But suddenly it has given an error. And it keeps happening forever. The exception throws from the RemoveUser(IUser user). The exception details are here as below, System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to [...] read more
episerver
1vote
1answer

Invalid column name Entity Framework Core

I have following entity class: public partial class ProjectUser { public int Id { get; set; } public int ProjectId { get; set; } public int UserId { get; set; } public virtual Project Project { get; set; } public virtual Users User { get; set; } } When I [...] read more
c#
entity-framework-core
1vote
1answer

Can't map model with a couple of one to one relations with Entity Framework Core

I'm developing my first API with ASP.NET Core, and using Entity Framework Core to model my data. I can't map 2 nested class objects within the parent one. I've read about one to one, and one to many, but I get nothing when I look for several one to one [...] read more
c#
entity-framework-core
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
1answer

EntityFramework Trying to create multiple links to the same table, FK Constraint error

I have a table called DeliveryRequest and another table called Operator, table DeliveryRequest is as follows: public class DeliveryRequest { public int ID { get; set; } public DateTime Date { get; set; } public string UserID { get; set; } public string Waybill { get; set; } public string [...] read more
sql
sql-server
asp.net-mvc
entity-framework
1vote
1answer

How to create two one-to-one relations with same entity in Entity Framework Core

I'm getting stuck when using code-first in EF Core 2.2. I have an entity called: AirSensor which I need to have two one-to-one relations to TemperatureSensors, as the AirSensor is capable of read Temperature and dew point temperature. Therefore my code is here: public class AirSensor { public long AirSensorId [...] read more
asp.net-core
entity-framework-core
ef-core-2.2
1vote
1answer

SQL COALESCE UPDATE in C# function

I have a function in C# that I want to update my database. This is connected to a windows form with textboxes. I want to ensure that if someone wants to UPDATE only one or two values, the rest doesn't get replaced with empty strings, but rather retains what is [...] read more
c#
sql-server
methods
coalesce
1vote
1answer

How to fix SQL Exception happening only in android?

I'm using xamarin forms to develop a cross-platform app. As part of my app, I have a login page where the user enters his credentials and gets authenticated. I'm using entity framework core and I'm connecting to a SQL server which is hosted on Azures cloud. The code works and [...] read more
c#
xamarin.forms
entity-framework-core
azure-sql-database
1vote
0answers

C# Sqltimeout command don't know program side or sql server side

I have a c# program that connects to sql server and get data. This part of program that connects to sql has lots of classes and inheritance that is not written by me and I've never managed to get sqltimeout exceptions from that, which connects to sql server and receives [...] read more
c#
sql-server
timeout
timeoutexception
1vote
1answer

Conversion From nvarchar value to to data type int failed?

I have this Table Type CREATE TYPE ItemTableType AS TABLE ( BrandId INT, BranchId INT, InventoryCategoryId INT, Attributes nvarchar(Max), Price Decimal(18,2), [Description] nvarchar(Max) ); I create a datatable in my C# code like this var dt = new DataTable(); dt.Columns.Add("BrandId"); dt.Columns.Add("BranchId"); dt.Columns.Add("attributes"); dt.Columns.Add("InventoryCategoryId"); dt.Columns.Add("Price"); dt.Columns.Add("Description"); foreach (var item in inventoryItems) [...] read more
c#
sql
json
sql-server
datatable
1vote
0answers

Error when running Data Profiling Task with Azure SQL Server data

When running a Data Profiling Task in SSIS with data from an Azure SQL Server, I receive the following error message: > System.Data.SqlClient.SqlException (0x80131904): USE statement is not supported to switch between databases. Use a new connection to connect to a different database. I am unsure how to work with [...] read more
azure
ssis
azure-sql-database
azure-sql-server
data-profiling
1vote
0answers

EF6 Update-Database is attempting to create a column that would duplicate an existing computed column

I have some computed columns in a SQL database that're giving EF6 a good bit of trouble. I'm using this technique. For some reason, the PM command Update-Database insists on trying to add a column to a table that already exists as a computed column. I only discovered this by [...] read more
sql-server
entity-framework
ef-code-first
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
0answers

SQL server named instance connection

On several occasions I have observed a intermittent connection failure to SQL server (2012) resulting in the following stacktrace 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 accessible. Verify that the instance name is correct [...] read more
sql-server
sql-server-2012
0votes
1answer

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

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

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

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

Intermittent DB connection failure

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

Delete TFS Project Collection - SqlException

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

How can I troubleshoot an application connecting to SQL Server

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

Hosting Website Issue

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

System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired with Error Number:-2

I have a C# .NET 4.7.2 application that connects to SQL Server 2014. One of the stored procedures called from the application runs into following error: xyzStoredProcedure: Exception encountered. System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. [...] read more
c#
.net
sql-server
sqlclient
0votes
0answers

"How to fix" SqlException: Invalid object name 'Orders'. databatase location?

I followed the instructions in this video https://docs.microsoft.com/en-us/visualstudio/get-started/csharp/tutorial-aspnet-core-ef-step-03?view=vs-2019 to try to add a products database. and after some (inital bugginess I first crashed and the website asked me to apply migrations and i hit apply) an then it eventually worked. The instructions tell you to create a new models folder [...] read more
c#
asp.net
sql-server
0votes
1answer

Connect to local SQL Server from .NET Core app running in docker

I have .NET Core console app running in docker and I want to connect to local MSSQL database (not dockerized!), but I'm unable to do so. Connecting to DB on remote server by IP works fine, but using connection string like Data Source=DESKTOP-9DRU731;Initial Catalog=DB;User id=user;password=password; gives me an error System.Data.SqlClient.SqlException [...] read more
docker
.net-core
docker-compose
dockerfile
0votes
1answer

Error while opening search result types in SharePoint 2013

I have a Search Service application and i want to customize how my search results look. I have a customized display template as well. But when i open my Search Result types i get an error saying Something went wrong.And also none of the managed properties can be seen. I [...] read more
sharepoint-2013
0votes
0answers

How to connect GCP App Engine to GCP Compute Engine SQL Server?

I'm setting up a new App Engine on my new GCP project but I can't seem to connect the NetCore app to a SQL instance on a Compute Engine. When I run the app from Azure or on my local pc with the same connection string it connects and everything [...] read more
sql-server
asp.net-core
error-handling
google-cloud-platform
timeout
0votes
0answers

[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server

I'm connecting to a local version of the SQL database. I've created both entities and want to connect to them but when I try I've gotten a "Server Error in '/' Application," error. So far I've research the error and cannot tie down where to even begin looking. Line 23: [...] read more
model-view-controller
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
0answers

Using Custom Entities with OpenIddict

I'm trying to extend the entities used by OpenIddict based on the example provided here: https://github.com/openiddict/openiddict-core/issues/360#issuecomment-280268525 This includes creating entity classes extending those given by OpenIddict: public class CustomApplication : OpenIddictApplication<Guid, CustomAuthorization, CustomToken> { public string ImpersonateUser { get; set; } } public class CustomAuthorization : OpenIddictAuthorization<Guid, CustomApplication, CustomToken> { [...] read more
asp.net-core
entity-framework-core
openiddict
0votes
2answers

Sometimes getting "A network-related or instance-specific error occurred while establishing a connection to SQL Server."

Every now and then I am getting > A network-related or instance-specific error occurred while establishing a connection to SQL Server. and in the details it says > SQL Server Express database file auto-creation error This error appears randomly. Sometimes when I go to another page it loads fine and [...] read more
asp.net
sql-server
asp.net-mvc-5
0votes
1answer

How to access SQL Server named instance remotely from web service using SQL Server authentication

I know this problem has been widely discussed, but after almost two days of research, I could not find a working solution yet. I have a SQL Server that hosts four instances of Versions 2012, 2014, 2016 and 2017, of which 2012 is the default instance. Everything works fine, as [...] read more
c#
sql-server
0votes
1answer

Failed executing DbCommand. .NET CORE

During creating my first page I noticed that I could not run .Net from cmd. I do not know what exactly is a problem. I am sending you a command lines. I checked some website's solutions. None from this solutions helped me. C:\Users\prywatny\Desktop\ProjektodZera\BigProject\BigProject>dotnet ef database update Done. C:\Users\prywatny\Desktop\ProjektodZera\BigProject\BigProject>dotnet run Używanie [...] read more
c#
sql
asp.net
entity-framework
0votes
2answers

How to fix System.Data.SqlClient.SqlException: 'Incorrect syntax near ''.'

im creating a website using asp.net in front end along with c#. I have two tables and im trying to update the columns of one table using the below query. however im getting the below error. Can anyone please help me resolving it. string sql = "UPDATE CurrentStudent SET CurrentStudent.DateOfJoining [...] read more
c#
asp.net
0votes
1answer

How do I allow a machine to connect to local SQL file

I'm currently working on an EPOS system for a friends shop, I'm currently getting him too test the features, making sure design etc is fine. I've set up the SQL Service Based Database, but the problem seems too be he is getting the error > System.Data.SqlClient.SqlException (0x80131904): A network-related or [...] read more
c#
sql-server
windows
visual-studio
0votes
0answers

MS-SQL communication in dotnet core under linux throwing errors

Im running on the default port 1433. when I execute a simple query against the DB all works well. but when I try to run a stored procedure .. like this: DataTable result = null; SqlCommand command = new SqlCommand(); command.CommandType = System.Data.CommandType.StoredProcedure; command.CommandText = procedureNameWithDbVersionPrefix; command.CommandTimeout = m_nTimeout; foreach [...] read more
linux
.net-core
sqlclient
0votes
1answer

Database connection (Cannot open database "VRM" requested by the login.)

I'm getting Error when running my website on host. Unable to open database connection for the following application(s) .... Received exception. Message: Cannot open database "VRM" requested by the login. The login failed. Login failed for user Login failed for user 'IIS APPPOOL\DefaultAppPool'. Login failed for user 'IIS APPPOOL\DefaultAppPool'. Description: [...] read more
.net
sql-server
networking
0votes
4answers

Can't reach docker-hosted SQL server from web app docker on same host

On the same virutal machine (remote, ubuntu), I have * An SQL Server running in a Docker * An .NET Core 2.2 (IdentityServer) application running in a docker * An instance of jwilder.nginx-proxy serving as a reverse-proxy for every web application on the machine * A multitude of other .NET [...] read more
sql-server
docker
asp.net-core
0votes
0answers

Unable to access Azure DB from Azure VM if TransactionScope is used

I have .net 4.6.1 desktop application that migrates DB from 'old' version to the 'current' version. It works perfectly fine when I test it locally. But I need to deploy the DB on Azure SQL Server and then migrate the DB. I wanted to do that from Azure VM but [...] read more
c#
azure
azure-sql-database
azure-virtual-machine
0votes
0answers

DataService.GetConnectionString | System.Data.SqlClient.SqlException (0x80131904): MSDTC on server 'SERVER' is unavailable

I have written some insert queries those works fine when i try to use transactions i am getting the above exception. I tried to resolve using this link "MSDTC on server 'server is unavailable" but still not working. can some one help me out to reslove this. try { using [...] read more
c#
sqltransaction
0votes
1answer

EF Core There is already an object named 'AspNetRoles' in the database

I am receiving There is already an object named AspNetRoles in the database. error while attempting to use update-database command in NuGet console. Context: public class ApplicationDbContext : IdentityDbContext<IdentityUser> { public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options) { } public DbSet<Customer> Customers { get; set; } } Startup: public class Startup { [...] read more
c#
entity-framework
asp.net-core
entity-framework-core
asp.net-identity
0votes
1answer

Must declare the scalar variable "@PaperID"

<asp:SqlDataSource runat="server" ID="sdsFormViewPaper" ConnectionString="<%$ConnectionStrings:CPMS%>" OldValuesParameterFormatString="original_{0}" OnInserted="sdsFormViewPaper_Inserted" SelectCommand="SELECT * FROM Paper, Author WHERE Paper.AuthorID = Author.AuthorID ORDER BY PaperID;" InsertCommand="INSERT INTO Paper ( Active, FilenameOriginal, Filename, Title, Certification, NotesToReviewers, AnalysisOfAlgorithms, Applications, Architecture, ArtificialIntelligence, ComputerEngineering, Curriculum, DataStructures, Databases, DistanceLearning, DistributedSystems, EthicalSocietalIssues, FirstYearComputing, GenderIssues, GrantWriting, GraphicsImageProcessing, HumanComputerInteraction, LaboratoryEnvironments, Literacy, MathematicsInComputing, Multimedia, NetworkingDataCommunications, NonMajorCourses, [...] read more
sql
asp.net
sql-server
0votes
0answers

How to fix add-migration failing with transport-level error

When I try to add a string field to a domain object, and then I run add-migration, I get the following error: > PM> add-migration add-field-to-contact System.Data.SqlClient.SqlException (0x80131904): A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly [...] read more
c#
sql-server
entity-framework
0votes
0answers

System.Data.SqlClient.SqlException (0x80131904) - A Network relate...(Only on localhost)

I'm developing an application in ASP.NET Core 2.1, with Windows authentication for the first time. I've been working on my dev machine with a connection to a remote server hosting the SQL Server database for this application. Connection string is set in the appsettings.json file as follows: "DefaultConnection": "Server=V-APPSRV01;Database=devHub;Integrated Security=True;Trusted_Connection=True;MultipleActiveResultSets=true" [...] read more
c#
asp.net-core
sql-server-2012
iis-7.5
asp.net-core-2.1
0votes
0answers

TF246021: An error occurred while processing your request: SQL Server Error: 2627"

TFS returns exception during an API call when using: public TeamFoundationDataReader TrackMerges: > "TF246021: An error occurred while processing your request. Technical information (for administrator): SQL Server Error: 2627" Windows event log error: > Filing a WER application report for exception: System.Data.SqlClient.SqlException (0x80131904): Violation of PRIMARY KEY constraint []. Cannot [...] read more
sql
sql-server
tfs
0votes
3answers

Invalid SQL Server Connection String on Linux Entity Framework Core

I'm using Linux more specifically Xubuntu. I have installed SQL Server Express on my machine. I'm currently in the making of a web app and my connection does not seem working or I don't understand everything quite right? The output I get is : A network-related or instance-specific error occurred [...] read more
c#
linux
entity-framework
asp.net-core
entity-framework-core
0votes
0answers

My WEP API hosted in kubernetes pods are unable to communicate to external IP

I am not able to connect my on prem SQLSERVER database from the kubernetes pods.(Bare metal) logs: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server [...] read more
kubernetes
0votes
1answer

ExecuteNonQuery() from c# throwing exception - arithmetic overflow error converting numeric to data type numeric

I have a weird situation, I have a SP being called from my C# application through ADO.Net, the SP doesn't return any data. It is throwing the below exception, but when i execute the SP with the same parameters in SSMS it runs with out any issues. There is no [...] read more
c#
sql-server
ado.net
0votes
1answer

EFCore generating Column that is not valid

When i try to access the employees table for the Northwind database i get an invalid column name error, this column does not exist in the database and i am not sure how it is created or how to prevent it. i tried not to map the generated name but [...] read more
c#
.net-core
entity-framework-core
0votes
0answers

Entity Framework 6 Forces Distributed Transaction

I need to run custom sql script during the Entity Framework migration. Script: exec sp_executesql N'create view VIEW_TS_Shops as select * from openquery([TS-SQL], ''select * from Shops'')' Migration fails with error message: > System.Data.SqlClient.SqlException (0x80131904): The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "TS-SQL" [...] read more
sql-server
entity-framework
0votes
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
0votes
1answer

MySql Connection String localhost

I need to compose the connection string for my WebApiCore application now running on Linux. I tried something like this: server=localhost;uid=User;pwd=Password;database=Database; but I always get this 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 [...] read more
mysql
connection-string
0votes
0answers

Database error when importing an ASP project

I'm trying to import a project that I did with an ex-partner, The home page or the project should return a list of products from the database. the dotnet run command returns no error and the webpage opens successfully, but when it tries to load the products, the terminal returns [...] read more
sql
asp.net
asp.net-core
visual-studio-code
0votes
1answer

Irregular: SQL Connection Error: System.Data.SqlClient.SqlException (0x80131904)

I have a simple application that fetches entries from a few databases and then uses selenium to open a chrome window and paste information in a form. This agent runs once every five minutes. I've looked through the logs and this error comes up now and then. When trying to [...] read more
c#
.net
sql-server
0votes
2answers

Use Entity Framework to connect to MySQL database running in a Docker container

I have started to learn ASP.NET Core MVC and I am trying to build an app which makes use of a database. I wanted to integrate an ORM, so I picked up Entity Framework Core. I have prepared a project, following this tutorial. I have successfully performed the migration using [...] read more
asp.net-mvc
entity-framework
docker
asp.net-core
docker-compose
0votes
1answer

Error: Invalid column name 'B'. at System.Data.SqlClient.SqlConnection

I'm trying to create a simple registration page with ASP.NET C# in Visual Studio 2013. I've encountered the following error upon clicking on the submit button to ensure that the registration details get into the database that I've tried to connect to. > Error:System.Data.SqlClient.SqlException (0x80131904): Invalid column name 'B'. at [...] read more
c#
html
css
asp.net
sql-server
0votes
0answers

How to update a database/table using C# & show the changes instant in GridView?

I'm trying to update a tale with C#, but, I'm not able to to that. I want to show all the data in GridView including the updated rows as well. Any help much appreciated. String connectionString = @"Data Source=11.71.38.9;Database=DB;User Id=admin;Password=12345"; DataTable dtbl = new DataTable(); using (SqlConnection sqlCon = new [...] read more
c#
winforms
gridview
datagridview
datagrid
0votes
5answers

A network-related or instance-specific error occurred while establishing .... error: 26

I am working in my asp.net project; when I run my program, it stops running and gives me this message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and [...] read more
c#
sql-server
0votes
0answers

EF core update after migration fails due to nullable type change to enum

I'm using EF core 2.2.1 and I'm stuck with the following error when I update to the latest migration: > System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'CountryCode', table 'context.dbo.User'; column does not allow nulls. UPDATE fails. The statement has been terminated. The message is clear and due [...] read more
c#
asp.net-core
.net-core
entity-framework-core
ef-core-2.2
0votes
0answers

AlwaysEncrypted Insert fails intermittently

We have been using the AlwaysEncrypted feature of Microsoft SQL for over a year now. Until now, it has worked flawlessly. Previously, we had only a very few columns encrypted (4). A week ago, we implemented encryption on another 11 columns, so we still make very light use of it. [...] read more
c#
sql-server
always-encrypted
0votes
0answers

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

I am running unit tests in debug on my Win 10 development machine. I access a SQL Server 2017 database on Linux across an "on prem" network. I can access the database using Management Studio. Sometimes I get the following error. I can work around the error by rebuilding the [...] read more
sql-server
.net-core
entity-framework-core
0votes
0answers

Invalid object name 'DAppRoles'

In my EF Core 2.2 app, I changed DBSet DRoles to DairyRoles in the AppDBContextlike this: public DBSet<DairyRole> DairyRoles { get; set; } and then executed context.Database.EnsureCreated(); Error System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'DairyRoles'. I thought context.Database.EnsureCreated(); handles migration. Please help. read more
entity-framework
ef-core-2.2
0votes
1answer

abp entity not exist: AbpEntityChangeSets

Using ABP Core I always stayed up to date with the newest NUGET packages. What I forgot was to create migrations. I just moved to ABP4.2.0 when i realized that my last EF snapshot was from ABP3.5.0. I created a new migration completing with this warning: > An operation was [...] read more
c#
asp.net-core
entity-framework-core
aspnetboilerplate
0votes
0answers

Connection Timeout issue in Entity Framework Core

I have a multi-threading application that needs to insert bulk of records in the same table from different places. After continuously running for 2 hours, my application runs into a connection time out issue. Stack Trace > System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the [...] read more
c#
entity-framework-core
0votes
0answers

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

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

Application does not connect to the database after deployment on Azure

When publishing MVC app on Azure, the connection string is picked automatically but I fail to understand how the deployed app connects to the database using this connection. > There's server error: SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was [...] read more
asp.net-mvc
azure
azure-sql-server
0votes
1answer

REST API - Calling Custom PXAction from Endpoint

I want to call a PXAction from the endpoint, pass it a record (or set of records if possible), and then have it pass me back the records updated with some information. I have the following Action in my graph (graph is really only to allow this single action to [...] read more
acumatica
0votes
1answer

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

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

Query of on-premises SQL Server from Azure web app (over Azure S2S VPN) fails

Our infrastructure team has worked to configure a site-to-site Azure VPN connection between our Azure subscription and our on-prem firewall, essentially following these steps. To test this, we've created a simple Azure web app that makes a query against a SQL Server that is located on-prem behind the firewall. This [...] read more
sql-server
azure
azure-web-sites
azure-virtual-network
azure-vpn
0votes
2answers

EF Core 3.0 Manually setting connection string

I'm developing a console app with .NET Core & EF Core (both are v3.0); and I need to start my DbContext using an string generated from another class. DbContext file public Arta_LuniaDBContext() { } public Arta_LuniaDBContext(DbContextOptions<Arta_LuniaDBContext> options) : base(options) { } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { optionsBuilder.UseSqlServer(DataServices.ConnectionString); } DataServices [...] read more
c#
sql-server
entity-framework
.net-core
0votes
1answer

Connection Timeout Expired When there are many requests simultaneously

I have a .Net Application(REST API) which accesses SQL Server Database. Sometimes When there are many API requests at the same time, I get Connection Timeout exception due to which all the request fails. This is not always the case and happens only when there are many requests hitting the [...] read more
asp.net
.net
sql-server
asp.net-mvc
asp.net-apicontroller
0votes
0answers

Unable to ExecuteScalar() because of authentication error

I am following a Microsoft tutorial for setting up forms-based authentication, and getting a failure. Here is the tutorial: https://support.microsoft.com/en-sg/help/301240/how-to-implement-forms-based-authentication-in-your-asp-net-applicatio This line is failing: // Execute command and fetch pwd field into lookupPassword string. lookupPassword = (string) cmd.ExecuteScalar(); I am getting this error: System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'HOME\TSLAB1$'. [...] read more
asp.net
authentication
iis
0votes
1answer

NLog getting current user causes error to appear

This is my target <target xsi:type="Database" name="database" connectionString="${var:connectionString}" commandText="INSERT INTO [AppOne].[EventLogs](Id, Message, Level, Logger, Action,Identity)VALUES(NewID(), @Message, @Level, @Logger, @Action,@Identity)"> <parameter name="@Message" layout="${message}" /> <parameter name="@Level" layout="${level}" /> <parameter name="@Logger" layout="${logger}" /> <parameter name="@Action" layout="${aspnet-mvc-action}"/> <parameter name="@Identity" layout="${aspnet-user-identity}"/> I have also placed this line in my Startup.cs services.AddSingleton<Microsoft.AspNetCore.Http.IHttpContextAccessor, HttpContextAccessor>(); However, when [...] read more
asp.net
logging
asp.net-core
nlog
0votes
1answer

CREATE DATABASE permission denied in database 'master' accessing as SA

I created a small application for test purposes. The problem starts when I try to deploy the app to an Azure VM. When accessing the published app, I get an error > CREATE DATABASE permission denied in database 'master' The strange thing is that it works fine when I access [...] read more
sql-server-express
0votes
1answer

Disable automatic migrations in entity framework

I have my Configuration class constructor like this: public Configuration() => AutomaticMigrationsEnabled = false; And I have even updated my DbContent to this: public DatabaseContext() : base("DefaultConnection") { Database.CommandTimeout = 900; Database.Log = s => Debug.WriteLine(s); Configuration.LazyLoadingEnabled = false; Database.SetInitializer(new CreateDatabaseIfNotExists<DatabaseContext>()); } But when I try to run update-database for [...] read more
c#
entity-framework
-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
1answer

Executing stored procedure with input param in C#

I am having trouble executing a stored procedure supplying string value for a input param that is of type nvarchar(128). The param in question is 'username' . As per the proc definition is nvarchar(128) please look at screenshot#2. Below is my C# code where am setting the parameters if (StoredProcedureExists(auditStoredProc, [...] read more
c#
tsql
stored-procedures
-1votes
4answers

The column name 'phoneNumber' is specified more than once in the SET clause

I am creating for my student project, a coffee shop online. As it is a big file and, I am not sure which part anyone would need, here is a github link I have created a Registration form and I have created a order form. When I try to register, [...] read more
c#
asp.net-mvc
-2votes
1answer

How to debug a database error of "Incorrect syntax near the keyword X"?

I'm trying to count the number of user so that I can generate the unique id for new user. But the query which I have written shows some syntax error near User where User is my Table name. private int GenerateAutoId() { con.Open(); SqlCommand cmd = new SqlCommand("Select Count(*) from [...] read more
c#
sql-server
-2votes
1answer

SQL exception incorrect syntax near 'G' what's the problem?

I have a SQL query created by inserting values from C#. In C#: string command = "INSERT INTO Phones (devicename, batterylife, price, antutu, ImageURL) VALUES (" + model + ", " + batterylife + ", " + price + ", " + antutu + ", " + imgURL + " [...] read more
c#
sql
visual-studio-2017
-3votes
1answer

System.Data.SqlClient.SqlException (0x80131904)) conversion data or time from character to string

I am trying to filter data between two dates; today 12:00 am to tonight at 12:00 pm. But I am getting this error: > System.Data.SqlClient.SqlException (0x80131904)) conversion data or time from character to string Code: DateTime today = DateTime.Today; string fileNameBase = today.ToString("dd-MMM-yyyy 12:00:00 AM"); ExportToExcel export = new ExportToExcel(); [...] 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