简体   繁体   English

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

[英]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? 它在那里吗?

  • 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? 实例正在运行吗?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 SQL网络接口,错误:移至新PC后出现50个错误 - SQL Network Interfaces, error: 50 after moving to new PC 移动到新服务器后,使用 Rotativa 生成 PDF 会抛出错误 - Generating PDF with Rotativa throws error after moving to new server 读取XML并将其存储在SQL Server中。 获取重复 - Reading XML and storing it in SQL Server. Getting duplicates 将 Gridview 导出到 CSV 现在包括父页面 html 内容在将站点移动到新服务器后 - Exporting Gridview to CSV now including the parent page html content after moving site to a new server 从SQL Server Express迁移到SQL Server asp.net Web应用程序登录时出现错误 - Getting an error when moving from SQL Server Express to SQL Server asp.net web app logon 将数据库移至新服务器后,无法在Visual Studio 2010的实体框架设计器中看到SQL Server 2008表 - Unable to see SQL Server 2008 tables within entity framework designer of visual studio 2010 after moving database to new server 在SQL Server 2008数据库中更新映像后出现错误 - Getting error after updating image in Sql server 2008 database SQL Server 2008 错误“服务器不支持代码页 0”是什么意思。 意思? - What does SQL Server 2008 error "The code page 0 is not supported by the server." mean? 站点在具有远程SQL Server的本地计算机上正常工作,但是在复制到Web宿主站点后,简单授权后给出错误 - site work correctly on local machine with remote SQL Server, but after copy to web hosting site give error after simple authorization 将 .net 应用程序移动到新服务器时出现 SQL Server 连接错误 - SQL Server connection errors when moving .net app to new server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM