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
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 > [...] read more
PROBLEM I don't understand how to make LocalDB show up in the SQL Server Object Explorer. On some VMs, it shows up automatically, on some other VMs, it doesn't. Still, after googling for hours, I don't get it. CURRENT SITUATION 1. I have a clean VM 2. I installed Visual [...] read more
I'm running my code and getting this error. But what does it mean? > The network path was not found Description: An unhandled exception occurred > during the execution of the current web request. Please review the stack trace > for more information about the error and where it originated [...] read more
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 am trying to build an API using Visual Studio 2017 and .NET Core 2 with Entity Framework Core. I am following the directions from This Link. I am on the section titled: Reverse engineer your model The command they give to run is as follows: Scaffold-DbContext "Server=(localdb)\mssqllocaldb;Database=Blogging;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir [...] read more
Apology for this strangely worded question. I don't know what the actual problem is but hopefully someone can give me some insights. I am getting the following error when trying to run migrations: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not [...] read more
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 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
I use entityframework 5.0. I have so many test. If I run a test alone it passes, if I run this with the others eachother in the same time, it does not pass. There is no contact between the tests. Everytime one same query was sent. It would not be [...] read more
I reinstalled my main work pc, but didn't reinstall visual studio after 5 months. Now i did and started my old project, and now it doesn't run. I get a timeout error when connecting to SQL Server, so i increased the timeout in the connectionstring and now i get the [...] read more
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
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
There's been a string of random occurrences of the following error in the SQL Server Agent scheduled jobs lately that I have been unable to find a solution to. The error occurs infrequently, but usually once a week for a daily scheduled job, but in any number of different jobs [...] read more
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 [...] 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 [...] read more
We are running a .NET Core 3.1 application in a Kubernetes cluster. The application connects to an Azure SQL Database using EF Core 3.1.7, with Microsoft.Data.SqlClient 1.1.3. At seemingly random times, we would receive the following error. ---> System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of [...] read more
I am having trouble adding a new table to my database. these are the commands I entered when trying to add the new migration: Add-Migration AdminSett > Scaffolding migration 'AdminSett'. The Designer Code for this migration file > includes a snapshot of your current Code First model. This snapshot is [...] read more
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 have used this string and tested it with string concatenation.But as you know it is not safe to use this to format an sql command. SqlCommand param = new SqlCommand(); param.CommandText = "INSERT INTO Circle (Center_Point, Circle_Data) VALUES (geometry::STGeomFromText('POINT(@center_lat @center_lng)',0),geometry::STGeomFromText('POLYGON((@polygon))',0));"; param.Parameters.Add(new SqlParameter("@center_lat", center_lat)); param.Parameters.Add(new SqlParameter("@center_lng", center_lng)); param.Parameters.Add(new SqlParameter("@polygon", polygon)); [...] read more
Updates on bottom Below is my console dump, which migrations execute in my main. (update-database) This has been working for a prolonged time, and even earlier today. After running a code comparison the only change I have on record is the addition of a field named __IsDisabled. I tried it [...] read more
Trying to seed/migrate data from C# (C Sharp) micro service within MSSQL database container (Image is mssql-server-linux:2017-latest)... Connection is successful Exception message is as below exampleapi_1 | fail: Microsoft.EntityFrameworkCore.Database.Connection[20004] exampleapi_1 | An error occurred using the connection to database 'Domain.exampleManagement.Docker' on server 'DOMAIN-DB'. exampleapi_1 | fail: Puma.exampleManagement.API.Program[0] exampleapi_1 | An [...] read more
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 [...] 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 am using external SQL Server to host our database and ASP.NET MVC Core application is hosted on Azure. Locally on Dev machine, the Web application works fine when a complex query executed but on Azure I get an exception Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired I am using the same [...] read more
I am developing a project and you are giving me an error : > "System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near > '@med_data'." But I can't figure out what could be wrong .... string humidade = "", temperatura = "", heatIndex = "", lpgGas = "", monoCarbo = "", smoke = ""; [...] read more
Creating a new Blazor WebAssembly App with Microsoft Visual Studio 2019 Version 16.9.4 with these specifications: Target Framework .NET 5.0, Authentication Type Individual Accounts and ASP.NET Core Hosted: enter image description here [https://i.stack.imgur.com/ittF1.png] With no modifications I have simply started the project with IIS Express, ran migrations and added a [...] read more
I'm trying to add IdentityUserClaim Navigation to my custom IdentityUser< int >, I tried many ways but it didn't work. public class AppUser : IdentityUser<int> { [ForeignKey("UserId")] public List<AppUserClaim> UserClaims { get; set; } } public class AppUserClaim : IdentityUserClaim<int> { } public partial class ApplicationDbContext : IdentityDbContext<AppUser, AppRole, int, [...] read more
We are using Entity Framework Core to access multiple versions of our database. We would like to have a single tool be able to work with a range of versions of the database. But if a new column has been added to a table when we use EF to write [...] read more
I wrote an app in ASP.NET Core MVC with CRUD to deploy to Azure, using code first. I followed this tutorial: https://docs.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-dotnet-sqldatabase The tutorial is slightly out of date, but I am confident that I followed it properly. I also attempted to literally follow the tutorial with the sample app, [...] read more
I have a Docker Swarm of four Ubuntu 20.04 machines. I want to run many different apps in a replicated fashion. One of these apps is an API that reads from a remote SQL Server running on a named instance. I am able to connect to SQL Server if I [...] read more
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
I am having problems reverting the database model to an earlier migration in EF core. (Version 2.1.14) I am attempting to update the database model to a previous Migration before I deleted the "WorkingHour" table because I have re-deployed an older version of my build. In other words, I expect [...] read more
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
We have a 32 Bit production machine that has MS SQL 2014 installed. 32 Bit is forced by twincat 2 running on it, (not compatible with 64 bit), thus the available ram is limited. Randomly, about twice a month, the database does not answer to the programs and the queries [...] read more
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
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
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 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] > [...] 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
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 have a problem running a CAML query. I get a 0x80131904 exception. My input data are the following one: MasterList contains the following columns: * Title (default one) * MyTextColumn (single line text column) * MyCalculatedColumn (calculated column defined with the following formula: =MyTextColumn&"_"&Title SampleData are: Title MyTextColumn MyCalculatedColumn [...] read more
I have been trying to figure this out since last Friday, I am trying to connect to a SQL Server database from my .net app. Can anyone point out what I am doing wrong? name: .NET on: push: branches: [ CI567 ] pull_request: branches: [ CI567 ] jobs: container-job: runs-on: [...] read more
I'm missing something here, and if someone could help clarify I'd greatly appreciate it: I have a Docker Ubuntu container running mcr.microsoft.com/mssql/server:2019-latest called sql1 on my Mac I also have an outside .net core 2 project from a friend i'm wanting to connect to and simply run update-database or dotnet [...] read more
I've been trying to connect .net 5 app with mssql server using docker. I've been always getting this error: Microsoft.Data.SqlClient.SqlException (0x80131904): Login failed for user 'sa'. This is appsetting.json file: "ConnectionStrings": { "OrderingConnectionString": "Server=localhost;Database=OrderDb;User Id=sa;Password=SwN@12345678;" }, This is docker-compose.yml file: orderdb: image: mcr.microsoft.com/mssql/server:2017-latest This is docker-compose.override.yml file orderdb: container_name: orderdb [...] read more
I am having problems with a BLAZOR SERVER + Entity Framework 6.4 application The entity framework part is in a separate dll project (framework 4.6.2) shared by other projects. DB microsoft SqlServer (Express 2016) The blazor part is an asp.net core 5.0 project and razor server pages EVERYTHING WORKS ON [...] read more
I've an application which uses Entity Framework. It contains several migration files which do various database operations. Another user has been making updates directly to the database and now I can't get one of my migrations to apply when I run Update-Database. This is the error I get: > PM> [...] read more
I have a web api which uses entity framework to land information from a web form in to a SQL Server database table. When running the api locally I can post to localhost and the records are landed in to the SQL Server database table with no issues. I have [...] read more
I'm adding and removing items in a list on SharePoint online MS 365 via rest api in batch mode. Everything was working fine till last week. I started to get "HRESULT: 0x80131904" errors for some items in the batch when deleting. I got this error just for some items not [...] read more
I have this Linq expression var searchDate = DateTime.ParseExact("17.12.2018", "dd.MM.yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None); result = result.Where(DatePredicate("LaunchWeekStartDate", searchDate, 3)); and I call this expression public static Expression<Func<General, bool>> DatePredicate(string columnName, DateTime searchValue, int? operatorId) { var type = typeof(General); var x = Expression.Parameter(type, "x"); var member = Expression.Property(x, columnName); Expression expression; var [...] read more
Following error comes when retrieving large amount of data from sql azure. I have already implement the Transient Fault Handling but still getting this error Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and [...] read more
I have a webapp running in Azure. It uses a Azure MSSQL database set to Standard S0: 10 DTUs performance. The backend is written in dot net core 3.1. The app works fine when I visit it. Checking my logs I found a few of these, they happen weeks apart [...] read more
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
My app was working just fine for two months when it suddenly started printing this error. It doesn't tell in which page or where exactly it is I just get this: Erreur du serveur dans l'application '/'. Echec de la conversion de la date et/ou de l'heure à partir d'une [...] read more
I have a SQL Server stored procedure that is used for uploading a document and returns an ID upon success. I am storing the parameter file_data into a byte[] type in the Customer_Document_ADD class. public byte[] file_data { get; set; } The following is my repository code. public async Task<int> [...] read more
I have a simple Azure Function that is triggered when a new item is added in a Blob Storage. The function reads the new JSON file uploaded to the Blob Storage and loads the information in a DataBase. It works locally and when I deployed the function it was also [...] read more
I'm building an API in .NET 5.0 (core) and have run into a problem connecting to a database on my local SQL server instance. My previous projects have been ASP.Net running on IIS and issues like this have been typically resolved by changing app pool permissions etc. (I think this [...] read more
I set up a DetailsView with asp.net. I enabled editing, inserting, and deleting. In the editing and inserting options when I finally submit I get this: > Incorrect syntax near the keyword 'Key'. with a stacktrace of: > [SqlException (0x80131904): Incorrect syntax near the keyword 'Key'.] > > System.Data.SqlClient.SqlConnection.OnError(SqlException exception, [...] read more
I am using Visual Studio 2019 and using SQL Server docker image from this website I created docker container by docker run -d --name MySQLServer -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Password123@jkl#' -p 1433:1433 microsoft/mssql-server-linux I also connect the SQL Server using Azure Data Studio I have created migration script by command add-migration [...] read more
I am having trouble seeding data into a SQL database using EF Core during program startup. I have an EF Core table defined like this: migrationBuilder.CreateTable( name: "PoolStyles", columns: table => new { Id = table.Column<byte>(type: "tinyint", nullable: false) .Annotation("SqlServer:Identity", "1,1"), Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256), Code = table.Column<string>(type: [...] read more
I have a code-first EF project with a table which uses the wrong enum in one column and need to migrate it using EF Migrations. I have to both rename the column, and then copy the old values to the new ones. I know I can do it by simply [...] read more
I have a very strange issue where depending on the query parameters the database call from the code below will fail with: Exception.Message = Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout [...] read more
I am trying to connect my Unity instance to an SQL Client. I switched to Net Framework 4.x and have written the following code: serverConfig conf = JsonUtility.FromJson<serverConfig>(File.ReadAllText(@"Assets/Scripts/config.json")); string connString = string.Format("Data Source={0},{1};Initial Catalog={2};User ID={3};Password={4}", conf.address, conf.port, conf.database, conf.username, conf.password); //debug print(connString); SqlConnection cnn = new SqlConnection(connString); try { cnn.Open(); [...] read more
I'm developing a VB.NET windows service which connects with some SQL databases. When I try to start the windows service it throws me these errors in the windows event viewer. ERROR 1 Service cannot be started. System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'EDGEMAN\STLWKSENG11$'. at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, [...] read more
Recently i add DateofBirth to a table . And Locally it's work fine. I also update client's data base and entity data model. But errors appears. Invalid column name 'DateofBirth'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more [...] read more
I'm trying to simply switch from SQLite over to Microsoft SQL Server on a basic .NET 5.0 application for local testing purposes. I'm on Windows 10 running a linux subshell on Visual Studio Code. I've installed Microsoft SQL Server, and also the SQL Server Configuration Manager as well as SQL [...] read more
I'm still new with Entity Framework and I'm struggling with an issue while inserting records to the database on .NET Core API service I'm developing. Summarizing what is going on, I'm not generating the schema from EF, instead I create the tables in SQL and just have EF access it. [...] read more
I have a paged query that throws an time-out exception when executed by EF Core 3.1. > Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. > The timeout period elapsed prior to completion of the operation or the server > is not responding. The in-code construction of the query: Context.Invoices .Include(i => i.InvoiceLines) [...] read more
This is the error when I login my account in my live website using smarterASP.net. Is it possible to get data source from a local server to a live website? is there anyone encounter with this problem? Server Error in '/' Application. The user name or password is incorrect Description: [...] read more
I am trying to create an app with database using Entity Framework while mostly following this tutorial (https://docs.microsoft.com/en-us/aspnet/core/data/ef-rp/intro?view=aspnetcore-5.0&tabs=visual-studio). I have following models: call.cs: using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.ComponentModel.DataAnnotations.Schema; namespace ContactTracing15.Models { public class Call { [DatabaseGenerated(DatabaseGeneratedOption.None)] public int CallID { get; set; } public int [...] read more
I have a situation where I need to create a new table in a separate schema through EntityFramework that has the same table name in a different schema. How can this be done through EntityFramework? I am currently locked to EntityFramework 5.0.4, so I cannot move on to EntityFramework 6. [...] read more
I'm trying to import Excel sheet data into the DB via SSIS script task, I'm continuously getting the above error message. The Excel file has 3 sheet, and we have separate table for each sheet of that Excel file in the database. Also I'm not getting any error in the [...] read more
I have a datetime2 column that used to be nullable. We now need this column to be set so we want to set it as required and migrate the column with a default value of 1970-1-1. I have created the migration and edited the migration-file to the following: protected override [...] read more
I have an Azure Time stamping Web App connecting to about 50 different customers On Premise SQL databases using Hybrid connection. The web app is an Asp.Net Core 2.2 based C# app using EF. The app has been working extremely well over 2 years without any errors, but the recent [...] read more
I am running a BackgroundTask in my ASP.NET Core 5 app which creates some entities inside my database. My idea was to run it in multiple tasks to speed up the generator. public class GeneratorService : BackgroundService { private const int TaskCount = 8; private uint _index; private readonly List<Task> [...] read more
I built in executable in Visual Studio that serves as an application for users to make changes to data in a SQL Server. When I run the executable on my machine it works fine. Another developer is also able to run it on his, but whenever we send it to [...] read more
We have 4 servers, three of which are the main servers that contain SQL Server databases, and we are going to the mobile app on server 4 so that our users can connect to their database on their phones. Server 4 has an intermediary role, but now the problem we [...] read more
I have tried to connect to my databse in sql server. My code is the following: private void button1_Click(object sender, EventArgs e) { SqlConnection cnn; string connetionString = "Server = ULTRABOOK - JJ/MSSQLSERVERML;" + "Initial Catalog = Research;" + "User id = ULTRABOOK-JJ/jurje;" + "Password = \"\";"; cnn = new [...] read more
I'm using SQL2008 and .NET 4. The following UPDATE query causes timeout errors. Table Pages has 600,000 records. Error: > System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout > period elapsed prior to completion of the operation or the server is not > responding. Query: UPDATE Pages SET Checked = 1 , [...] read more
> Unhandled exception. System.Data.SqlClient.SqlException (0x80131904): A > transport-level error has occurred when receiving results from the server. > (provider: TCP Provider, error: 0 - Success) This is a NET5.0 console app using dapper to execute a stored procedure that will not store a result. The app is running from a [...] read more
Sorry, I can't ask a question on Changing table prefix and schema of ABP.IO so I am creating another. In the documentation for ABP.IO it mentions changing table schemas (https://docs.abp.io/en/abp/latest/Entity-Framework-Core-Migrations), I've also looked at the git issue (https://github.com/abpframework/abp/issues/1429) referring to the addition of the AbpCommonDbProperties and the comment about adding [...] read more
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 [...] 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
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 [...] 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
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 have a windows service that's supposed to insert data from one db to another I have these two connection strings for each db in my app.config file <connectionStrings> <add name="Connection1" connectionString="User ID=husen;Password=test;Persist Security Info=False;Initial Catalog=IntalioStock;Data Source=(localdb)\MSSQLLocalDB;"/> <add name="Connection2" connectionString="User ID=husen;Password=test;Persist Security Info=False;Initial Catalog=CustomersVIP;Data Source=(localdb)\MSSQLLocalDB;"/> </connectionStrings> And that's what I'm [...] read more
SQL Server to another when I try to log in the web app we get this error. On the other server the apps turn on test domain. Can somebody help me with this? > Exception Details: System.Data.SqlClient.SqlException: Invalid object name > 'View_User'. > > Source Error: > > An unhandled [...] read more
I have an entity with the following: [DatabaseGeneratedAttribute(DatabaseGeneratedOption.None)] [Key] public int Id { get; set; } which I changed to: public int Id { get; set; } When I created my migration and ran Update-Database I got this error: > PM> Update-database Build started... Build succeeded. > System.InvalidOperationException: To change [...] read more
I am working with .NET 5 and using EF Core and MSSQL for database. I have 2 classes that have many to many relationship between them. Those were migrated from models to DB. example of DB tables Migration: migrationBuilder.CreateTable( name: "TournamentUser", columns: table => new { TournamentsId = table.Column<int>(type: "int", [...] read more
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
We have a search page linked to the following page. When we search for something specific i.e. the Book Title we receive an error saying the inputted parameter wasn't provided. We attempted to change the sproc and the below code to search for an ID number in our table but [...] read more
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
I am trying to create a CRUD Application using .Net Core Api with Angular11.I follow this link https://www.codaffection.com/asp-net-core-article/angular-crud-with-asp-net-core-web-api/ for creating this.and I not totally completed all functionality yet.just i created functionality 'Add from information into the database.'But when I click the "Submit" button to add my form data into the [...] read more