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.
Did you install SQL Server on the new machine? Just a folder with a database is not enough in case of SQL Server.
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?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.