【发布时间】:2015-12-01 13:29:33
【问题描述】:
我在 Visual Studio Community 2013 上构建了一个 ASP.NET 网站,使用 C# 中的 SQL Server 数据库。
我想在 Microsoft Azure 中托管它。 我登录 Microsoft Azure 并在上面发布我的网站。
当我尝试从我的数据库中选择行时,我收到了这个错误:
Exception Details: System.ComponentModel.Win32Exception: The system cannot find the file specified [Win32Exception (0x80004005): The system cannot find the file specified]
[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server.
我的连接字符串是:
string connStr = @"Data Source=(LocalDB)\v11.0;AttachDBFilename=""C:\Users\MyComp\Documents\Visual Studio 2013\Projects\Test\Test\App_Data\MyDB.mdf"";Integrated Security=True";
我的数据库有 Windows 身份验证
我需要进行哪些更改以及如何更改才能使从 db 读取的内容起作用?
谢谢!
【问题讨论】:
标签: c# asp.net sql-server azure