WCF:为什么通过配置文件传递相同的端点时,远程端点的传递失败?
这有效:
Using con As New OfferingTap.OfferingTapClient(New ServiceModel.InstanceContext(callback), "NetTcpBinding_IOfferingTap"
Run Code Online (Sandbox Code Playgroud)
这不是:
Using con As New OfferingTap.OfferingTapClient(New ServiceModel.InstanceContext(callback), "NetTcpBinding_IOfferingTap", "net.tcp://qa1offerings:8190/")
Run Code Online (Sandbox Code Playgroud)
配置文件摘录:
<endpoint address="net.tcp://qa1offerings:8190/" binding="netTcpBinding"
bindingConfiguration="NetTcpBinding_IOfferingTap" contract="OfferingTap.IOfferingTap"
name="NetTcpBinding_IOfferingTap">
Run Code Online (Sandbox Code Playgroud)
例外:
System.ServiceModel.Security.SecurityNegotiationException was unhandled
Message="A call to SSPI failed, see inner exception."
Source="mscorlib"
StackTrace:
Server stack trace:
at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
at System.ServiceModel.Channels.StreamSecurityUpgradeInitiatorBase.InitiateUpgrade(Stream stream)
at System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
at …Run Code Online (Sandbox Code Playgroud) 据我所知,我需要创建一个IValueConverter自定义格式.问题是我的格式是单向的,没有合法的ConvertBack实现.
那么,我该如何处理单向问题IValueConverter.(如果有帮助,这是一个只读控件.)
什么可以阻止MSTest并行运行?我将parallelTestCount设置为0,但它仍然一次运行一个测试.
这是我的发言
IF (@UserName IS NULL AND @EditorKey IS NULL) OR (@UserName IS NOT NULL AND @EditorKey IS NOT NULL) BEGIN
RAISERROR ('One of @UserName, @EditorKey must be non-null.', 15, 0)
RETURN
END
Run Code Online (Sandbox Code Playgroud)
我想要的是能够做这样的事情:
IF (@UserName IS NOT NULL) XOR (@EditorKey IS NOT NULL) BEGIN
RAISERROR ('One of @UserName, @EditorKey must be non-null.', 15, 0)
RETURN
END
Run Code Online (Sandbox Code Playgroud)
对于两个参数来说,这并不是什么大不了的事,但是有些过程有三个或四个只有一个可以传递,其余的应该为空.
我正在为.NET寻找一个好的HTML文档生成器.Sandcastle我的需求太复杂,太麻烦,NDoc已经死了多年.
我的一个要求是它还应该处理代码约定,它们作为编译器发出的XML文件中的额外元素公开.
如何告诉控件或控件块不继承任何样式并恢复为默认值?
我需要这个,因为我有一个主要的主题,但是一件作品真的搞砸了我的设计.
假设我的版本号为1.5.*,编译为1.5.4735.28467.
获得4735和28467的公式是什么?
如何将此代码段虚拟化?
<ScrollViewer Grid.Column="1" Name="LogScroller">
<r:NoInheritanceContentControl>
<ListBox Background="Black" ItemsSource="{Binding Path=ActiveLog}" >
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Background="Black">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<TextBlock Grid.Column="0" Grid.Row="0" Foreground="White">
<TextBlock >Date:</TextBlock>
<TextBlock Text="{Binding Path=LogDate}"/>
</TextBlock>
<TextBlock Grid.Column="1" Grid.Row="0" Foreground="White">
<TextBlock >Severity:</TextBlock>
<TextBlock Text="{Binding Path=Severity}"/>
</TextBlock>
<TextBlock Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Foreground="LightGray" Text="{Binding Path=Message}"></TextBlock>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.Template>
<ControlTemplate>
<StackPanel Background="Black" IsItemsHost="True" >
</StackPanel>
</ControlTemplate>
</ListBox.Template>
</ListBox>
</r:NoInheritanceContentControl>
</ScrollViewer>
Run Code Online (Sandbox Code Playgroud)我在输出窗口中得到了这个:
System.Windows.Data错误:4:无法找到绑定源,引用'RelativeSource FindAncestor,AncestorType ='System.Windows.Controls.ItemsControl',AncestorLevel ='1''.BindingExpression:路径= VerticalContentAlignment; 的DataItem = NULL; target元素是'ListBoxItem'(Name =''); target属性是'VerticalContentAlignment'(类型'VerticalAlignment')
这是我的XAML,运行时看起来是正确的
<GroupBox Header="Grant/Deny Report">
<ListBox ItemsSource="{Binding Converter={StaticResource MethodBinder}, ConverterParameter=GrantDeny, Mode=OneWay}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Label Content="{Binding Entity}"/>
<Label Content="{Binding HasPermission}"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</GroupBox>
Run Code Online (Sandbox Code Playgroud) wpf ×5
.net ×2
.net-3.0 ×1
binding ×1
listbox ×1
mstest ×1
net.tcp ×1
silverlight ×1
styles ×1
t-sql ×1
unit-testing ×1
versioning ×1
wcf ×1