Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Site getting SQL error after moving to new server.

I'm creating a rather simple site for my company for tagging inventory and tags. This went fine and now we want to add a log-in element with usernames and passwords. This is being done in C# and ASP.NET 4, so a lot of this functionality is already built in.

I added a Login web part to a page which references a database in the App_Data folder. However, when I publish it to the app server, it doesn't want to automatically put anything in the App_Data folder there and I get a SQL error when I try to login:

> 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 is configured to allow remote connections. (provider: SQL
> Network Interfaces, error: 26 - Error Locating Server/Instance
> Specified)

Originally, when the program runs, it's a simple tag scanning page that adds a field to a small table in another database. I'm curious if there's a problem with the program referring to two databases and how C# works for this sort of authentication and if there's an easier way to do this.

like image 875
Sevdarkseed Avatar asked Apr 20 '26 14:04

Sevdarkseed


2 Answers

Did you install SQL Server on the new machine? Just a folder with a database is not enough in case of SQL Server.

like image 117
SchmitzIT Avatar answered Apr 22 '26 04:04

SchmitzIT


Essentially, the program cannot communicate with the SQL Server instance. That may be for one or many of several reasons including: network, missing instance, configuration (naming change), instance not running...

Firstly, determine where the SQL Server instance is supposed to reside. Is it there?

  • If it is, is it on the same machine or a separate machine?
  • If a separate machine, can you access that machine from the one running your program?
  • Is the instance name, or host name, in the configuration settings still correct?
  • Is the instance running?
like image 20
PinnyM Avatar answered Apr 22 '26 04:04

PinnyM