[英]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.
这是在C#和ASP.NET 4中完成的,因此已经内置了许多此功能。
I added a Login web part to a page which references a database in the App_Data folder. 我在一个引用App_Data文件夹中的数据库的页面中添加了一个Login Web部件。 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:
但是,当我将它发布到应用服务器时,它不希望自动将任何内容放在App_Data文件夹中,当我尝试登录时出现SQL错误:
> 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.
我很好奇程序是否存在引用两个数据库的问题以及C#如何用于此类身份验证以及是否有更简单的方法来执行此操作。
Did you install SQL Server on the new machine? 您是否在新机器上安装了SQL Server? Just a folder with a database is not enough in case of SQL Server.
在SQL Server的情况下,仅包含数据库的文件夹是不够的。
Essentially, the program cannot communicate with the SQL Server instance. 本质上,程序无法与SQL Server实例通信。 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. 首先,确定SQL Server实例应驻留的位置。 Is it there?
它在那里吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.