简体   繁体   English

部署asp.net Web应用程序时出现问题

[英]Problems deploying asp.net web application

This the first time I'm deploying an asp.net application. 这是我第一次部署asp.net应用程序。

When I Build the deployment package ie right click on the project and select "Build Deployment Package" I get the following error: 当我构建部署包,即右键单击项目并选择“构建部署包”时,我收到以下错误:

Error 1 Web deployment task failed.(Object of type 'dbFullSql' and path 'Data Source=.\\SQLEXPRESS;AttachDbFilename=C:\\JP\\ASP\\eTracking\\test\\App_Data\\aspnetdb.mdf;Integrated Security=True;User Instance=True' cannot be created.) 错误1 Web部署任务失败。('dbFullSql'类型的对象和路径'数据源=。\\ SQLEXPRESS; AttachDbFilename = C:\\ JP \\ ASP \\ eTracking \\ test \\ App_Data \\ aspnetdb.mdf;集成安全性= True;用户实例= True'无法创建。)

Object of type 'dbFullSql' and path 'Data Source=.\\SQLEXPRESS;AttachDbFilename=C:\\JP\\ASP\\eTracking\\test\\App_Data\\aspnetdb.mdf;Integrated Security=True;User Instance=True' cannot be created. “dbFullSql”类型的对象和路径“Data Source =。\\ SQLEXPRESS; AttachDbFilename = C:\\ JP \\ ASP \\ eTracking \\ test \\ App_Data \\ aspnetdb.mdf; Integrated Security = True; User Instance = True”无法创建。

Cannot connect to the database 'C:\\JP\\ASP\\eTracking\\test\\App_Data\\aspnetdb.mdf'. 无法连接到数据库'C:\\ JP \\ ASP \\ eTracking \\ test \\ App_Data \\ aspnetdb.mdf'。 A network-related or instance-specific error occurred while establishing a connection to SQL Server. 建立与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. 验证实例名称是否正确,以及SQL Server是否配置为允许远程连接。 (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) 0 0 eTracking (提供程序:SQL网络接口,错误:26 - 错误定位指定的服务器/实例)0 0 eTracking

Can anyone help with this.. I can't make sense out of it and can't seem to find a solution online. 任何人都可以帮助这个..我无法理解它,似乎无法在线找到解决方案。

Ok Managed to solve the problem. 好管理解决问题。

In the properties window under the Package/Publish SQL untick the "Pull data and/or schema from an existing database" as well as the "Auto-generated Schema and Data" in the grid. 在Package / Publish SQL下的属性窗口中,取消选中“从现有数据库中提取数据和/或模式”以及网格中的“自动生成的模式和数据”。

工作:“Ok管理解决问题。在Package / Publish SQL下的属性窗口中取消选中”从现有数据库中提取数据和/或模式“以及网格中的”自动生成的模式和数据“。 “

It looks like the error message is pretty straightforward - you are using a locally-attached database in your application. 看起来错误消息非常简单 - 您在应用程序中使用本地连接的数据库。 This won't work with the packager. 这不适用于打包者。 You need to change the database access to a server database or you need to include the mdf file in your application. 您需要更改对服务器数据库的数据库访问权限,或者需要在应用程序中包含mdf文件。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM