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
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
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
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
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
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
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
Working with my project in debug I have no issues. However running it in IIS I am getting this error: System.Data.SqlClient.SqlException: Login failed for user 'domain\name-PC$'. Stack Trace [SqlException (0x80131904): Login failed for user 'DOMAIN\NAME-PC$'.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +6749670 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +815 System.Data.SqlClient.TdsParser.TryRun(RunBehavior [...] read more
I'm trying to use paging (that is .Skip(...).Take(...) in Entity Framework 7. It works OK with Microsoft SQL Server 2012 and 2014, but fails with the following error on SQL Server 2008: > System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near 'OFFSET'. Invalid usage of the option NEXT in the FETCH statement. I've [...] read more
I have a service (an ASP.NET Core Web application) that depends on MSSQL. The services are orchestrated using Docker compose, and I want docker compose to first start the database and wait for it to be ready before running my service. For that, I am defining the docker-compose.yml as: version: [...] read more
I have problem with App that is hosted on official asp-dotnet-core-alipne container and SQL Server on other server. After restart server on which we have SQL, containers gets high CPU and some internal thread hangs. Helps only restart of container. We investigated that there are some tcp connection in state [...] read more
SQL Server 2008 (version 10.50.2550). I have a select query to return a single column of type uniqueidentifier. I want to get this into a C# variable of type Guid. All of the following methods result in exceptions. reader is of type SqlDataReader. using (var reader = command.ExecuteReader()) { if [...] read more
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
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
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
I have a project using EF Core 2. I created a migration. When running the migration it returns with the following error: infoinfo: System.Data.SqlClient.SqlException (0x80131904): There is already an object named 'Clients' in the database. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at [...] read more
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
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
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
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
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
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
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
I have an ASP.NET Core app [Microsoft.AspNetCore.App 2.1.4] with EF Core 2.1.4 [DbContext pooling enabled] and data stored on an Azure SQL database. Occasinaly [once in 1-2 days] I get unrecoverable error stating System.Data.SqlClient.SqlException (0x80131904): The incoming tabular data stream (TDS) protocol stream is incorrect. The MARS TDS header contained [...] read more
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
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
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
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
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
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
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
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
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
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
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
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
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
I'm using Dotnet Core 3.1 with Entity Framework Core 3.1.3 using Code-First with Azure SQL Database. During the development, I want to change the Primary Key of a table from int to long from the Model class in dotnet core project and use add-migration. However, when using Update-Database, there are [...] read more
I have a list of IDs (dynamically generated), and I want to find which of them do not exist in a table. I'm using Dapper and Microsoft SQL Server. Dapper allows IEnumerable parameters to be passed into queries and used as variables, which is nice, but I can't seem to [...] read more
I have an SQL Server with FILESTREAM enabled and a file table populated with a number of rows. I want to be able to delete a selected row from this table using LINQ in .NET Core 3.1. In my infrastructure layer, I have implemented the following: public async Task<bool> DeleteReport(Guid [...] read more
Backstory: I've spent over 20 hours trying to connection to my Sql Server database through my Windows Service and every time I fix exception I find another. As a test I have protected override void OnStart(string[] args) { EventLog.WriteEntry(ServiceName + " started"); PageLoadTimer.Enabled = true; using(var conn = new SqlConnection("Data [...] read more
I'm getting the error "Unhandled exception. Microsoft.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - Unknown error 203)" when I start asp.net core application container using docker-compose in CI/CD flow from gitlab (self-hosted) runner [...] read more
I have a repository for albums table (album entity) and I do filtering and paging in repository as you see: public IQueryable<Album> GetAllAlbums(AlbumQueryParameters queryParameters) { var albums = _cache.Get<IQueryable<Album>>("_AllAlbums"); if(albums == null){ albums = _context.Albums; _cache.Set<IQueryable<Album>>("_AllAlbums", albums, ApplicationDefaults.MemoryCachingOption); } if(queryParameters.ArtistId != null) { albums = albums.Include(a => a.ArtistToAlbums) .SelectMany(a => [...] read more
Using EF Core, I have a Zone that can have multiple Sol (soils), same Sol can be attached to multiple Zone: public class Sol { // ... public ICollection<Zone> Zones { get; set; } = new List<Zone>(); } public class Zone { // ... public ICollection<Sol> Sols { get; set; [...] read more
I am working in Visual Studio (2019 V 16.8.4) using c#. All components are up-to-date. Working within a newly created "Windows Forms App (.Net Framework)" project, I am trying to create a simple database (which I successfully generated in VS) and access it through a single V.S. form that has [...] read more
I have developed a an Api web Application which users entity framework as an ORM. Recently our production server has changed and we moved our application. we have already restored the database on server and set the connection string Integrated Security to false. we have provided the username and password [...] read more
I'm trying to build a basic project using IdentityServer authentication. The past days I've been picking up bits and pieces from everywhere, but mostly from FullStackMarc. At the moment I'm able to get to the point where the Client-application requests a token from the IdentityServer. Then IdentityServer redirects to the [...] read more
I'm trying to implement some optimistic locking when inserting rows into a database table. What I'm trying to do is, acquire a row from the database. If a row with given key does not exist, it is inserted first. I'm currently testing this for high concurrency scenarios. The idea is: [...] read more
While collecting knowledge of coding .NET Core Web API in combination with docker, I came across an error that I can't solve. I already did research on the internet, but somehow none of the provided solutions worked for me. I have a web service called Catalog.API (similar to the eShopOnContainers [...] read more
I checked the other posts related to this problem but could not find any answers. I have a post action method for my hotel api and in the Hotel Repository I have this CreateHotel method below. I just enter two arguments and there's two arguments in the stored procedure too [...] read more
I created a simple asp.net website. There's only 1 page, with a file upload control and an upload button. This is how it's supposed to work: When the user browses to the file and clicks upload it will save the actual file to a new record in my AZURE database. [...] read more
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
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
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
We have a client that has recently migrated to our servers but they don't have access to their website programmer. The Application is based on dotNet MVC and Microsoft SQL Server. after restoring website on our Windows 2016 Server with MS SQL 2017 installed on local host, we encounter an [...] read more
I'm having a problem deploying my app. The error, below, says that there is an error connecting to the database. Here is my connection string: "Server=tcp:'sql server public IP';Database=MyDB;User Id=sqlserver;Password=passwd" The strange thing is that, when I connect through my local computer, adding a firewall rule, everything is ok, but [...] read more
My site will run fine and I can go through the entire site, but after my session times out, when I make another request to a page I get this exception: Server Error in '/' Application. The system cannot find the file specified Description: An un-handled exception occurred during the [...] read more
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
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
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
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
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
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
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
Sorry, I can't ask a question on Changing table prefix and schema of ABP.IO so I am creating another. In the documentation for ABP.IO it mentions changing table schemas ( https://docs.abp.io/en/abp/latest/Entity-Framework-Core-Migrations), I've also looked at the git issue (https://github.com/abpframework/abp/issues/1429) referring to the addition of the AbpCommonDbProperties and the comment about [...] read more
I have the following entities in my project, and I get an error when trying to update my database(SQL Server). I have looked around stack overflow, seen some people having the exact same problem as me, but when I try their fixes, I still get the same error. I have [...] read more
I would like connect to SQL server via Azure Data Studio. But when was trying do that i get some error : Microsoft.Data.SqlClient.SqlException (0x80131904): > A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the [...] read more
Environment Information: Main System: Mac Book Air 2013 Running My Window 8.1 on Parallel Desktop Visual Studio 2019 SSMS 2017 So basically I am running my window on parallel desktop in mac machine. I am building asp.net mvc web application using code first approach. When I initiate the process of [...] read more
I have a problem inserting data into the table after deleting data. It works the first time or if I restart the app then it works. public class SingleTestCycle { public virtual int Id { get; protected set; } public virtual int OpeningTime { get; set; } ... public virtual [...] read more
I have a .NET5 Blazor Server application using EFCore5. I have two entities that have a many-to-many relationship with each other. Let's call them 'Books' and 'Tags'. EFCore provides the BookTag join table. On my page, I have a form that is populated with the book details and has a [...] read more
I am trying to simulate a watch and see if the actions are triggering fine. But my problem is the search returns no results. My query 1. Checks for a particular index. 2. Checks for a range 3. Check for the servicename field to be a particular value. This is [...] read more
I am trying to deploy my site through Filezilla. I've created database in sql server 2012 and connect my visual studio with sql server. When I run it on local server it works fine, I can easily sign in and sign out but when I deploy it on web it [...] read more
We are having a quite large ASP.NET Core 2.0 application which uses dapper to write data and EF Core to read data. This decision was made some years ago due to performance issues when writing data with EF Core. The following sample code is used to write data: using (var [...] read more
I have json data with Ids, my goal is to take the json data and insert into database using Entity Framework, with the same id set as I'm using them as a foreign key in different table. But the problem is I'm getting error > Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert explicit [...] read more
I'm using this tutorial to create ASP.NET Core Web API CRUD https://www.codaffection.com/asp-net-core-article/angular-crud-with-asp-net-core-web-api/#Setup_Database I'm trying to run the command Update-Database but keep getting this error: Build started... Build succeeded. > Microsoft.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or [...] read more
I'm running a very simple database entity update using EntityFrameworkCore.SqlServer v 5.0.2 but I'm getting a weird behavior... On my local environment the update query is working just fine, but when I switch the environment to Production I get an exception. I debugged further and realized that in production EntityFramework [...] read more
Fact 1. I've got 2 windows containers for: 1. MSSQL Server Developer Edition (microsoft/mssql-server-windows-developer) 2. Asp.Net Core API 5.0 (5.0.102) (solomiosisante/consequence:api) Fact 2. No problem accessing the SQLServer container data from Management Studio (SSMS). Fact 3. No problem when I run the API project from Visual Studio accessing the SQLServer [...] read more
I have entity ProductItem and the database is already updated by migration with this template: public class ProductItem { public ProductItem() { Price = 0; Discount = 0; } public string Name { get; set; } public double Price { get; set; } public int Discount { get; set; } [...] read more
I cannot create PostgreSQL database in ubuntu by using azure data studio although I install PostgreSQL extension. The error: > Microsoft.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is [...] read more
I am developing an Asp.net core application and deploying it to a Digital Ocean Linux Server Droplet. I have manually installed Sql Server 2019 Express (free). All works fine, but overnight something seems to be happening, and the next day when I try to access my application from the browser [...] read more
At our company we use a couple methods of updating database models. we use sqlproj and dacpacs as well as we have a .net core app using DbUp. I have successfully containerized using dacpac based of this article automating-sql-server-2019-docker-deployments Now I am working on Db Up. There are a few [...] read more
How do I change my data type for my auto-increment int to a GUID? I'm attempting to change the data type of my pk defined like so: [Id] INT IDENTITY (1, 1) NOT NULL ...to a guid. In my model, I've simply changed the data type enter image description here [...] read more
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
I have a web site project as an entry point and defined the connection string there: "ConnectionStrings": { "DataPlaygroundConnection": "Server=DataPlayhouse;Database=BusinessHandshake;User ID=bhuser1;Password=bh@12345;MultipleActiveResultSets=True;Connect Timeout=360;App=Company - Portal - Staging" } I started facing issues just recently that when running, I'd get Login failed for user 'bhuser1' error. But the credentials are working as [...] read more
I am hosting a .NET Core application in Linux (Ubuntu) with SQL Server. The application uses entity framework to read/write to the database hosted on the same server. The connection string I am using is Server=localhost,1433;Database=mydb;User=sa;Password=XXXXX I intermittently get the following error reported in the logs when adding a new [...] read more
I have this error when trying to execute request to my Rest API running on Docker: > Microsoft.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that [...] read more
I have created a setup file for a WPF application with Database in MDF format and I'm trying to test the application and to connect it to the attached database, but I'm still getting this error : Error on Connection settings System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'admin'. Error Number [...] read more
I was running code from this repo and generating an error from the Book.API, I get an error page like this: image [https://user-images.githubusercontent.com/6237247/105782172-9a36f680-5f39-11eb-882a-cd496032e22f.png] The request ID is |574e8e13-4e9d31fed64d4793. When I look at the log entry in the file, I see: { "Timestamp": "2021-01-25T18:07:24.6565993-06:00", "Level": "Fatal", "MessageTemplate": "BADNESS!!! Cannot open database [...] read more
I am installing SQL server express on the machine using AdvancedInstaller. AdvancedInstaller calls the following script to (successfully) create the DB: -- Inline SQL script IF NOT EXISTS(SELECT name FROM master.sys.databases WHERE name = N'MyDB') BEGIN create database MyDB END As the installer continues, it also creates tables and stored [...] read more
I have an EF6 solution that I would like to add a trigger on a table to log changes to a new table. This is due to an integration we are doing to an external database. Basically, they want a log of changes that are made to a table for [...] read more
I'm also new to DevOps, but let me see if I can explain my situation, also if anyone has any advice on doing post deployment scripts and can share their experiences I will be most grateful. I use SQL Source control from Redgate, Git and Azure DevOps. I have managed [...] read more
Quick summary before getting into the nitty gritty > (NLog version 4.7.2) ASP.NET Core 2.2 web application correctly logs to file & database targets from local machine. As soon as it's deployed to staging application server, file logging continues but database logging doesn't work and gives no errors in internal [...] read more
so I've been stuck with this error for a few days now and I can't see to get it to work. I'm trying to get a my unity application (computer platform, not android) to connect to my localhost server (I use Microsoft SQL Server Express) using Microsoft SQL Server Manager. [...] read more
This is the request handler I have for updating: public async Task<UpdateEmployeesResponse> Handle(UpdateEmployeesRequest request, CancellationToken cancellationToken) { var data = _context.Employees .FirstOrDefault(person => person.Auth0ID == request.UpdateEmployee.Auth0Id); var skill = _context.Skill.FirstOrDefault(skill => skill.Id == request.UpdateEmployee.SkillLevel.Id); var employeeProgrammingLanguages = _context.EmployeeProgrammingLanguages.Where(_ => _.EmployeeId == data.Id); var programmingLanguagesList = new List<ProgrammingLanguage>(); var element = [...] read more
I have a LenguajesPorProyecto model the PK is ProyectoId and LenguajeId properties this: public class LenguajesPorProyecto { public int LenguajeId { get; set; } public Lenguaje Lenguaje { get; set; } public int ProyectoId { get; set; } public Proyecto Proyecto { get; set; } [StringLength(1)] public char Nivel { [...] read more
I am getting this error while trying to execute the attached code. Please help. I am getting values as list array in controller method successfully but when I try to read data from sql database I am getting error. CONTROLLER METHOD: [HttpPost] public JsonResult searchdata(List<string> firstField, List<string> secondField, List<string> thirdField) [...] read more
I use Azure to deploy my database. I'm having trouble using the Azure platform and don't know how to fix it. When my backend code tries to connect to db, I get the same error like that "2021-01-01T18:27:13.198490+00:00 app[web.1]: fail: Microsoft.EntityFrameworkCore.Database.Connection[20004] 2021-01-01T18:27:13.198500+00:00 app[web.1]: An error occurred using the connection to [...] read more
our c# application uses SqlDataAdapter to fetch data from the DB to present in a report. For some reason the SqlDataAdapter.Fill method is throwing below SqlException when the BUILTIN/Administrators language is British English. When it is English, it is working fine. I debugged my C# code but didn't get a [...] read more
I have installed SQL Sever Express on my system and built an app (Winforms) in visual studio by creating a database in my SQL Server. Now my application is complete, I have to install my app on my client (4-5 pc) all or on the same LAN and after installation [...] read more
We have a custom application that runs as a separate IIS site and in it's own application pool. On our server we have multiple instances of the same application running for different clients.... When there is a .NET Runtime error I'm not finding anything that helps me trace it back [...] read more
I can't connect to a MySQL database from C#. Upon trying to run the executable it spits out this error (this is the beginning of it): > Unhandled Exception: System.Data.SqlClient.SqlException (0x80131904): Snix_Connect (provider: SNI_PN7, error: 40 - SNI_ERROR_40) Snix_Connect (provider: SNI_PN7, error: 40 - SNI_ERROR_40) at System.Data.SqlClient.SqlInternalConnectionTds..ctor (System.Data.ProviderBase.DbConnectionPoolIdentity identity, System.Data.SqlClient.SqlConnectionString [...] read more
We are baking T-SQL stored procedure s/views in EF migrations (model below) so no one has to be on release night and it's been working fine until now. The stored procedure is manually created with no issues in SSMS, but when the migration is run by the build server, we [...] read more
I want to search GTIN option in admin product list. So, for that I am providing GTIN value in ProductLoadAllPaged store procedure. Now, when I search GTIN value from product list at that time throw datatable error and from console application get message that System.Data.SqlClient.SqlException (0x80131904): Conversion failed when converting [...] read more
I want to search GTIN option in admin product list. So, for that I am providing GTIN value in ProductLoadAllPaged store procedure. Now, when I search GTIN value from product list at that time throw datatable error and from console application get message that System.Data.SqlClient.SqlException (0x80131904): Must declare the scalar [...] read more
I am trying to save data into the Doctor table in the database. The table structure is shown below. The error I get when saving > Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. Microsoft.Data.SqlClient.SqlException (0x80131904): The MERGE statement conflicted with the FOREIGN KEY [...] read more
I have two classes: Workout.cs: public class Workout { public int Id { get; set; } public string Name { get; set; } public ICollection<WorkoutSet> Sets { get; set; } public DateTimeOffset FromDateTime { get; set; } public DateTimeOffset ToDateTime { get; set; } } and I have subclass WorkoutSet.cs [...] read more
We recently started encountering issues rolling our .NET Core app out in k8s in Azure, where the application couldn't find hostnames, like our Azure Database name. The problem seems intermittent as our old pods are still running fine, even when we bounce them, they come back fine. The issue below [...] read more
I encountered some weird behaviour with EF Core 3.1 that made me wondering what is actually happening. So hopefully someone can explain this to me in all fine details. Scenario Let's say you have two projects. Project A (main) and project B (side-project). For both projects you can add/remove migrations, [...] read more
I'm using XPO as the ORM to connect to my database but every time it throws this error - > DevExpress.Xpo.DB.Exceptions.UnableToOpenDatabaseException: 'Unable to open database. Connection string: 'data source=localhost\SQLEXPRESS;user id=employee_user;password=REMOVED;initial catalog=Employee;Persist Security Info=true;'; Error: 'System.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during [...] read more
I'm able to run my API and make calls which get data from the DB. Then when I try to update my Entities - after making db changes I get the error: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not [...] read more
I have an SSIS package which runs fine in debug mode from Visual Studio, however if It runs as a SQL Server job it hangs at step 2 which takes about twenty minutes in Visual Studio. The only thing I can think it could be is the SQL Server job [...] read more
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
I am at a confusing standstill with developing my .NET application and setting up the database. I am using a docker container image of mssql/sql-express. I've got it running and can log into the sys admin account. I created a login CommanderApi, database CommanderDb and created a user in that [...] read more
I have and old asp application that need to access a sql database I want to use network user but I'm getting this error > [SqlException (0x80131904): Login failed for user 'DLU\DLU09$'.] I have added DLU\DLU09$ as a user to the database and granted it access rights to the tables. read more
I have a custom table naming convention which prefixes B_ to the entity name. This works fine when I generate the migration scripts. However, when I execute any get method, the EF Core generated code doesn't generate the table name with the prefix. Instead it uses the Entity name itself [...] read more
I have a problem where I have to run a C# Console application via a scheduled task. The scheduled task calls a Powershell script which sets some variables (like a connection string) and calls a C# console application which connects to a database with those arguments. The problem is that [...] read more
First, I tried figuring out if the site was vulnerable to SQL injection by adding a single quote at the end of the get parameters and this what i got Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and [...] read more
Link to SSMS snapshotI have created a web app in .NET MVC and added azure ad authentication to it. On running it on local host everything is working very correct. But when I deploy the application on azure web app and put that URL in redirect URI its throwing error [...] read more
I tried to add new model to my project with code-first migration. The model looks like this: public class Renting { [Key] public int Id { get; set; } public string RequesterEmail { get; set; } public string RequesterName { get; set; } public int RoomNumber{ get; set; } public [...] read more
I am getting timeout issue for my view. But timeout is not consistent, it occurs only sometimes. When I run the query I didn't notice any issue, I'm not very sure where to look in this case to fix the timeout issue. ERROR: > System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired Here [...] read more
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
I am new into software development. I am currently developing Asp.Net Core API. I have managed to do Add-migration successfully, the problem start when I need to Update-Database. The error is as follows System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near the keyword 'NOT'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException [...] read more
I have deployment of C# code on openshift where it is unable to connect to SQL Server 2008 R2 database (SQL Server 2008 R2 RTM v10.50.1600) and getting the error shown below. The same code works fine with SQL Server 2012. My connection string is "SQLNumberingConnection": "server=X4.X6.XXX.XX,12110;database=XYZ;User ID=nnum;Password=XXX;Integrated Security = [...] read more
When I run this code with IIS it is working, but if I am using Docker I get the below error. Could anybody help me solve this issue? public static void Main(string[] args) { var host = CreateHostBuilder(args).Build(); //Seed database using (var scope = host.Services.CreateScope()) { var services = scope.ServiceProvider; [...] read more
I have downloaded a project from Github to my pc. Unzipped it and renamed the folder. Now inside the folder I have some files as the below screen shot: enter image description here [https://i.stack.imgur.com/WHEB8.png] So when I tried to open it in visual studio 2019 by selecting the Vidly.sln from [...] read more
I have been experiencing a problem with one of my vb applications where it is crashing at a certain time of day. In my code, there are only 4 places where that could be the cause of the crash. Three of them are from SQLDataSource queries and the other is [...] read more
I created a new XAF Blazor solution and was able to run it to create the database. I then added a database migration as per this questionHowever when I go to run the migration from within package manager I get Microsoft.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing [...] read more
I'm totally new to C# and SQL Server. I'm building a simple program where it has patients and their data should be presented on the screen after it entered by the user but whenever I try to add data to the database I get this error: > System.Data.SqlClient.SqlException: 'Invalid column [...] read more