我最近发现这个链接,它显示了一个很好的备份示例并恢复 SQL Server 数据库。但是,我的 SQL Server 仅使用 WindowsAuthentication,因此它实际上不需要用户名和密码。为了能够做到这一点,我将行 srvConn.LoginSecure = false;
转换为 srvConn.LoginSecure = true;
我期望成功连接到服务器。但是,此示例返回一个异常,表示无法连接到服务器。
有人可以帮我吗?我必须学习这个应用程序才能将相同的概念应用到我正在从事的项目中。非常感谢。
I recently found this link which shows a great example of backing up and restoring a sql server database. However, my SQL Server only uses WindowsAuthentication and so it does not really require a UserName and Password. To be able to do this, I turned the line srvConn.LoginSecure = false;
into srvConn.LoginSecure = true;
I was expecting to connect succesfully to the Server. However, this example returns an exception saying that it was unable to connect to the server.
Can anybody help me please? I have to learn this application for me to be able to apply the same concept to a project i'm working on. Thank you very much.
发布评论
评论(1)
首先,如果您想启用到服务器的远程连接(我不确定这是否是您想要的),请尝试以下操作: http://support.microsoft.com/kb/914277 。您还需要确保启用混合身份验证选项。
First of all if you want to enable remote connection to your server (I'm not sure if this is what you're after), Try this: http://support.microsoft.com/kb/914277 . You will also want to make sure the mixed authentication option is enabled.