移动到新服务器后,站点收到SQL错误.

Sev*_*eed 2 c# sql asp.net authentication forms-authentication

我正在为我的公司创建一个相当简单的网站来标记库存和标签.这很顺利,现在我们想要添加一个带有用户名和密码的登录元素.这是在C#和ASP.NET 4中完成的,因此已经内置了许多此功能.

我在一个引用App_Data文件夹中的数据库的页面中添加了一个Login Web部件.但是,当我将它发布到应用服务器时,它不希望自动将任何内容放在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)
Run Code Online (Sandbox Code Playgroud)

最初,当程序运行时,它是一个简单的标记扫描页面,它将字段添加到另一个数据库中的小表.我很好奇程序是否存在引用两个数据库的问题以及C#如何用于此类身份验证以及是否有更简单的方法来执行此操作.

Sch*_*zIT 6

您是否在新机器上安装了SQL Server?在SQL Server的情况下,仅包含数据库的文件夹是不够的.