小编Dev*_*Dev的帖子

如何授予数据库所有者(DBO)EXTERNAL ACCESS ASSEMBLY权限?

当我尝试从.Net程序集(.Net 3.5)在SQL 2008中创建程序集时,我收到以下错误,错误说我必须将以下任一属性设置为true,我该怎么做?

数据库所有者(DBO)具有EXTERNAL ACCESS ASSEMBLY权限为TRUE

该数据库具有TRUSTWORTHY数据库属性

程序集使用证书或非对称密钥签名,该密钥具有相应的登录权限,具有EXTERNAL ACCESS ASSEMBLY权限.

完整的错误如下,

程序集"SQLLogger"的CREATE ASSEMBLY失败,因为程序集"SQLLogger"未获得PERMISSION_SET = EXTERNAL_ACCESS的授权.如果满足以下任一条件,则授权程序集:数据库所有者(DBO)具有EXTERNAL ACCESS ASSEMBLY权限,并且数据库具有TRUSTWORTHY数据库属性; 或者使用具有EXTERNAL ACCESS ASSEMBLY权限的相应登录的证书或非对称密钥对程序集进行签名.

提前致谢!

sql sql-server sqlclr sql-server-2008

32
推荐指数
5
解决办法
7万
查看次数

如何使用net tcp绑定和没有mex绑定来使用WCF服务

我安装了一个Windows应用程序,它使用了WCF服务,我只是通过以下配置在Windows服务中托管网络tcp绑定的WCF服务的配置文件,我想知道客户端如何能够使用这个WCF服务.应用程序使用此服务来填充UI中的数据,并且它可以正常工作.当我尝试使用它时,我无法通过WCF测试客户端这样做.那么应用程序如何使用此服务?

       <system.serviceModel>
    <bindings>
        <netTcpBinding>

            <binding name="NetTcpBinding_FirstBindingServiceContract" closeTimeout="00:10:00"
               openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
               transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
               hostNameComparisonMode="StrongWildcard" listenBacklog="10"
               maxBufferPoolSize="999999999" maxBufferSize="999999999" maxConnections="10"
               maxReceivedMessageSize="999999999">
                <readerQuotas maxDepth="999999999"
                                          maxStringContentLength="999999999"
                                          maxArrayLength="999999999"
                                          maxBytesPerRead="999999999"
                                          maxNameTableCharCount="999999999" />
                <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
                <security mode="Transport">
                    <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
                    <message clientCredentialType="Windows" />
                </security>
            </binding>
        </netTcpBinding>
    </bindings>
    <behaviors>
        <serviceBehaviors>
            <behavior name="MyServiceBehaviors">
                <serviceMetadata />
            </behavior>
        </serviceBehaviors>
    </behaviors>

    <services>
        <service name="MyService.DataAccessService"  behaviorConfiguration="MyServiceBehaviors">

            <endpoint bindingConfiguration="NetTcpBinding_FirstBindingServiceContract"
                      name="firstBinding" address="net.tcp://localhost:25488/MyDataAccessService/MyFirstBindingAddress"
                    binding="netTcpBinding"
                    contract="MyDataService.IMyDataAccessService">
            </endpoint>
        </service>
    </services>
</system.serviceModel>
Run Code Online (Sandbox Code Playgroud)

wcf nettcpbinding

5
推荐指数
1
解决办法
2万
查看次数

使用.Net win表单中的cmd.exe在命令行实用程序中运行多个命令

我想运行tabcmd.exe实用程序以在tableau服务器中发布视图.手动执行此操作的步骤如下,将更新该位置中每个步骤的日志文件

"C:\用户[用户名] \应用程序数据\漫游\的Tableau\tabcmd.log"

在同一个会话中,我必须逐个手动执行此步骤

  1. 运行cmd.exe
  2. 使用命令tabcmd登录-s"http:/ sales-server:8000"-t Sales -u administrator -pp @ssw0rd登录!
  3. 使用命令tabcmd createproject -n"Quarterly_Reports"-d"显示季度销售报告的工作簿"创建项目名称.
  4. 使用命令tabcmd发布"analysis.twbx"-n"Sales_Analysis"--db-user"jsmith"--db-password"p @ ssw0rd"发布视图
  5. 使用命令tabcmd refreshextracts -workbook"My Workbook"刷新
  6. 使用命令tabcmd logout注销

现在我试图从我的.Net win表单自动执行这些步骤,所以我使用下面的代码作为尝试,它不起作用.

String path = @"C:\Program Files (x86)\Tableau\Tableau Server\7.0\bin\tabcmd.exe"
ProcessStartInfo startInfo = new ProcessStartInfo ();
startInfo.FileName = "\""+path+ "\"";
startInfo.Arguments = String.Format("login -s http://Server1:8000 --db-user "jsmith" --db-password "p@ssw0rd");
startInfo.UseShellExecute = false ;
startInfo.CreateNoWindow = false;
startInfo.WindowStyle = ProcessWindowStyle.Normal;
startInfo.RedirectStandardOutput = true;
startInfo.RedirectStandardInput = true;
startInfo.RedirectStandardError = …
Run Code Online (Sandbox Code Playgroud)

c# cmd winforms tableau-api

2
推荐指数
1
解决办法
5611
查看次数

在WPF中的视图中进行更改时,ViewModel中的文本框值不会更新

当我更改文本框值时,它不会在视图模型中更新.

这是我在视图中的文本框xaml

<TextBox Height="23" HorizontalAlignment="Left" Margin="153,65,0,0" Name="textBox2" VerticalAlignment="Top" Width="120" Text="{Binding Path=InstallPath, Mode=TwoWay}"/>
Run Code Online (Sandbox Code Playgroud)

完整的xaml视图,

<Window.Resources>
    <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
</Window.Resources>

<Grid>

    <Button Content="Configure Logger" Height="44" HorizontalAlignment="Left" Margin="402,125,0,0" Name="button1" VerticalAlignment="Top" Width="108" Click="button1_Click" />
    <Button Content="Load DB" Height="43" HorizontalAlignment="Left" Margin="402,200,0,0" Name="button3" VerticalAlignment="Top" Width="108" Click="button3_Click" />
    <TextBlock Height="23" HorizontalAlignment="Left" Margin="46,36,0,0" Name="textBlock1" Text="SQL Server" VerticalAlignment="Top" />
    <TextBox Height="23" HorizontalAlignment="Left" Margin="153,36,0,0" Name="textBox1" VerticalAlignment="Top" Width="120" TextChanged="textBox1_TextChanged" />
    <GroupBox Header="DB Names" HorizontalAlignment="Left" Margin="54,114,0,0" Name="groupBox1" VerticalAlignment="Top" >

    </GroupBox>


    <TextBlock Text="Test bootstrapper application." Margin="10" FontSize="18" HorizontalAlignment="Center" Foreground="Red" VerticalAlignment="Top" />
    <TextBlock Height="23" …
Run Code Online (Sandbox Code Playgroud)

wpf wix mvvm bootstrapper burn

2
推荐指数
1
解决办法
6829
查看次数

运行msi时如何运行.reg文件?

我试图了解我的 setup.msi 在安装时如何插入注册表值。在 Orca 编辑器中我看到这样的,

在此输入图像描述

安装 msi 后,在日志文件中我看到这样的内容,

MSI (s) (A8:B4) [16:27:28:674]: Executing op: ComponentRegister(ComponentId={45667B7F-9DC7-43B7-BE9E-3215ED1B1985},KeyPath=02:\SOFTWARE\myCompany\MySolution\Plugins\MyProduct\ProductCode,State=3,,Disk=1,SharedDllRefCount=0,BinaryType=0)
Run Code Online (Sandbox Code Playgroud)

我想做这个机制的逆向工程,有人可以帮助我理解这一点吗?我想使用 WIX 重新创建相同的内容,所以我只是尝试如下

 <Component Id="RegistryEntries" Guid="*">
            <RegistryKey Root="HKLM"
                         Key="Software\Microsoft\MyCompany"
                  Action="createAndRemoveOnUninstall">
              <RegistryValue Type="string" Name="MyApp" Value="[INSTALLLOCATION]" KeyPath="yes"/>
              <RegistryValue Type="string" Name="Configuration Files" Value="[INSTALLLOCATIONCONFIG]"/>
              <RegistryValue Type="string" Name="Configuration Files1" Value="[INSTALLLOCATIONCONFIG1]"/>
            </RegistryKey>
          </Component>
Run Code Online (Sandbox Code Playgroud)

当我构建 msi 并编辑 Orca 时,我会看到如下所示, 在此输入图像描述

我应该怎么做才能获得如上图所示的 msi?

installation windows-installer installshield wix

1
推荐指数
1
解决办法
2447
查看次数