为应用程序部署数据库时发生异常. (无法部署程序包) [英] An exception occurred when deploying the database for the application. (Could not deploy package)

查看:74
本文介绍了为应用程序部署数据库时发生异常. (无法部署程序包)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio 2013 Update 2,SQL 2014 Standard

仅当我尝试启用所需的Windows身份验证时,才会出现此问题.但是目前,如果我禁用身份验证,则不会有任何问题. (我没有发布任何类型的表,而是在SQL中配置它们.)

我得到的错误是:

错误98 为应用程序部署数据库时发生了异常.
无法部署软件包.C:\ Program Files(x86)\ MSBuild \ Microsoft \ VisualStudio \ LightSwitch \ v4.5 \ Publish \ v2.2 \ Microsoft.LightSwitch.Publish.targets  1565  10  Northwind

双击错误:

ConnectionString " "


= true


= $(_ ServerArtifactsFolder)
= $(DatabaseCollat​​ion)
= $(_ IntrinsicDacPackageFilePath)
= @(_ DatabaseProjectItem)
= @(ServerMetadataFiles)
= $(MSBuildProjectFullPath) />

解决方案

仅当我尝试启用所需的Windows身份验证时,才会出现此问题.但是目前,如果我禁用身份验证,则不会有任何问题. (我没有发布任何类型的表,而是在SQL中配置它们.)

根据上面的描述,请检查您身边的防火墙,也许防火墙阻止了它.

如果所有用户都位于同一网络/域或工作组上,则应该使用Windows身份验证,例如内部业务应用程序.这意味着您的LightSwitch应用程序不会存储任何密码.

思考Windows身份验证的两个选项的最佳方法是:

  • 授予我在应用程序中管理的Windows用户或Active Directory组的特殊权限和角色. (如果您选择了Windows身份验证,则始终启用该功能)
  • ALSO,让任何 Windows用户访问我的应用程序中不受保护的部分

接下来,您将定义用户权限,然后将其签入代码以访问资源.

在部署时,LightSwitch将创建具有此权限的单个用户,该权限使他们可以访问定义系统中其余用户和角色所需的屏幕.但是,在调试应用程序时,LightSwitch并不能使您 登录,因为每次构建和运行(F5)应用程序时,这样做都会很繁琐.因此,您可以使用允许调试"复选框来指示应在调试会话中打开/关闭哪些权限集.

希望有帮助.

致谢


Visual Studio 2013 Update 2, SQL 2014 Standard

The problem only occurs when I try to enable windows authentication which I need.  But for now if I disable authentication then I have no problems.  (I'm not publishing any type of tables, I'm configuring those in SQL.)

The error I get is:

Error 98 An exception occurred when deploying the database for the application.
Could not deploy package. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v4.5\Publish\v2.2\Microsoft.LightSwitch.Publish.targets 1565 10 Northwind

Double click the error:

<

DeploySchemaConnectionString="$(PublishConnectionString)"


                     

IncludeSecurityDBObjects="true"


                     

ServerArtifactsFolder="$(_ServerArtifactsFolder)"


                     

Collation="$(DatabaseCollation)"


                     

IntrinsicDacPackageFilePath="$(_IntrinsicDacPackageFilePath)"


                     

DatabaseProject="@(_DatabaseProjectItem)"


                     

Inputs="@(ServerMetadataFiles)"


                     

ProjectPath="$(MSBuildProjectFullPath)"/>

I am running wireshark and the last TDS response I see has info about the sql compatibility level.

I can't even build a stand alone package to try to deploy. 

I get the same exception but that it could generate a deployment script.


kfrost

解决方案

The problem only occurs when I try to enable windows authentication which I need.  But for now if I disable authentication then I have no problems.  (I'm not publishing any type of tables, I'm configuring those in SQL.)

According to your description above, please check Firewall on your side, perhaps firewall blocks it.

Using Windows authentication is appropriate if all your users are on the same network/domain or workgroup, like in the case of an internal line-of-business application. This means that no passwords are stored by your LightSwitch application.

The best way to think of the two options for Windows authentication are:

  • Give special permissions and roles to the Windows users or Active Directory groups that I administer within the application. (This is always on if you have selected Windows authentication)
  • ALSO, let any Windows user access the unprotected parts of my application

Next you define user permissions that you check in code in order to access resources.

When you deploy, LightSwitch will create a single user with this permission which gives them access to the screens necessary to define the rest of the users and roles in the system. However, while debugging your application, LightSwitch doesn’t make you log in because this would be tedious to do every time you built and ran (F5) the application. So instead you can use the "Granted for debug" checkbox to indicate which sets of permissions should be turned on/off in the debug session.

Hope it helps.

Regards


这篇关于为应用程序部署数据库时发生异常. (无法部署程序包)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆