To use integrated security for the webservice use the following web.config bindings.
Might also have problems with crossdomain security policies when writing silverlight which consumes a webservice. (ensure server name is same ie ssdintranet versus ssd365w01.uk.parker etc)
Tuesday, 21 December 2010
Thursday, 9 December 2010
Linq Transactions
When using transactions in .net the MSDTC component must be configured to allow network transactions on both the client and server (ie the calling web server and the callee server in my case the chinese server). The following liknk discusses how to setup the MSDTC
http://msdn.microsoft.com/en-us/library/aa561924(v=bts.70).aspx
http://msdn.microsoft.com/en-us/library/aa561924(v=bts.70).aspx
Friday, 3 December 2010
MVC in iis 6
Need to add a Wildcard Application mapping to the Application under Application Configuration
Add a map (use .aspx as ref) to the aspnet_isapi.dll. Note this might impact on website performance.
Add a map (use .aspx as ref) to the aspnet_isapi.dll. Note this might impact on website performance.
Friday, 17 September 2010
Tuesday, 14 September 2010
Monday, 5 July 2010
Thursday, 1 July 2010
BDD
NBehave Executing Scenario text files
NBehave Different ways to drive BDD tests
nbehave.org
nbehave on codeplex
nbehave ScenarioDrivenSpecBase
Awaiting new version of NBehave (0.5.0) with ScenarioDrivenSpecBase class
NBehave Different ways to drive BDD tests
nbehave.org
nbehave on codeplex
nbehave ScenarioDrivenSpecBase
Awaiting new version of NBehave (0.5.0) with ScenarioDrivenSpecBase class
Thursday, 18 February 2010
Wednesday, 17 February 2010
SILVERLIGHT
Encountered problems with cross threading when binding a USerName property in a Singleton class using WCF.
The UserName property in the singleton is updated using a BeginGetUserName WCF method with a EndGetUserName and this caused a cross thread exception because the UserName was being updated outside the UI thread. Solution was to pass a dispatcher object into the Singleton from MainPAge code behind and then use a BeginInvoke method to update the Username in the EndGetUserName method. Hence :
private void GetUserName()
{
Svc.BeginGetUserName(new AsyncCallback(GetUserNameCallback), Svc);
}
private void GetUserNameCallback(IAsyncResult ar)
{
IDriveParameterService s = (IDriveParameterService)ar.AsyncState;
dispatcher.BeginInvoke(delegate()
{
UserName = s.EndGetUserName(ar);
}
);
}
The UserName property in the singleton is updated using a BeginGetUserName WCF method with a EndGetUserName and this caused a cross thread exception because the UserName was being updated outside the UI thread. Solution was to pass a dispatcher object into the Singleton from MainPAge code behind and then use a BeginInvoke method to update the Username in the EndGetUserName method. Hence :
private void GetUserName()
{
Svc.BeginGetUserName(new AsyncCallback(GetUserNameCallback), Svc);
}
private void GetUserNameCallback(IAsyncResult ar)
{
IDriveParameterService s = (IDriveParameterService)ar.AsyncState;
dispatcher.BeginInvoke(delegate()
{
UserName = s.EndGetUserName(ar);
}
);
}
WCF
When hosting a WCF service in an Asp.Net application it is possible to get to the
HttpContext.Current to access the User.Identity.Name as follows:
1. Add serviceHostingEnvironment aspNetCompatibilityEnabled="true" to the web.config
2. Add [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
to the service implementation.
HttpContext.Current to access the User.Identity.Name as follows:
1. Add serviceHostingEnvironment aspNetCompatibilityEnabled="true" to the web.config
2. Add [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
to the service implementation.
Friday, 12 February 2010
Wednesday, 3 February 2010
Monday, 1 February 2010
WPF DIAGRAMMING : DataTemplate ing
Using the superb WPF Diagram Designer by sukram on CodeProject.
Trying to taylor the code to my own use. In particular been trying to specify a Xaml DataTemplate for the ToolBoxItem which is a custom control based on ContentControl.
Inside the ToolBox which is itself a custom control based on the ItemsControl when I specify a ItemTemplate and point it at my DataTemplate it fails. Found I needed to add a ContentTemplate to the style and make it a TemplateBinding to the ContentControl.ContentTemplate, hence
<Style TargetType="{x:Type cc:ToolboxItem}">
<Setter Property="Control.Padding" Value="5" />
<Setter Property="ContentControl.HorizontalContentAlignment" Value="Stretch" />
<Setter Property="ContentControl.VerticalContentAlignment" Value="Stretch" />
<Setter Property="ToolTip" Value="{Binding ToolTip}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type cc:ToolboxItem}">
<Grid>
<Rectangle Name="Border" StrokeThickness="1" StrokeDashArray="2" Fill="Transparent"
SnapsToDevicePixels="true" />
<ContentPresenter Content="{TemplateBinding ContentControl.Content}"
ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
Margin="{TemplateBinding Padding}"
SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="Border" Property="Stroke" Value="Gray" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
then I can specify the DataTemplate inside my ToolBox (ItemsControl) using ItemTemplate="{StaticResource designItemDataTemplate}"
Trying to taylor the code to my own use. In particular been trying to specify a Xaml DataTemplate for the ToolBoxItem which is a custom control based on ContentControl.
Inside the ToolBox which is itself a custom control based on the ItemsControl when I specify a ItemTemplate and point it at my DataTemplate it fails. Found I needed to add a ContentTemplate to the style and make it a TemplateBinding to the ContentControl.ContentTemplate, hence
<Style TargetType="{x:Type cc:ToolboxItem}">
<Setter Property="Control.Padding" Value="5" />
<Setter Property="ContentControl.HorizontalContentAlignment" Value="Stretch" />
<Setter Property="ContentControl.VerticalContentAlignment" Value="Stretch" />
<Setter Property="ToolTip" Value="{Binding ToolTip}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type cc:ToolboxItem}">
<Grid>
<Rectangle Name="Border" StrokeThickness="1" StrokeDashArray="2" Fill="Transparent"
SnapsToDevicePixels="true" />
<ContentPresenter Content="{TemplateBinding ContentControl.Content}"
ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
Margin="{TemplateBinding Padding}"
SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="Border" Property="Stroke" Value="Gray" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
then I can specify the DataTemplate inside my ToolBox (ItemsControl) using ItemTemplate="{StaticResource designItemDataTemplate}"
Thursday, 14 January 2010
Wednesday, 13 January 2010
Tuesday, 12 January 2010
Inspiron 1750
Pentium Dual Core T4300@2.10GHz
Video Controller Intel GM45 Graphics
Audio controller IDT 92HD71
Video Controller Intel GM45 Graphics
Audio controller IDT 92HD71
Monday, 11 January 2010
HOSTESS
hostess>?II
II>0890
hostess>*0
NAK
hostess>?*0
*0>0000
hostess>?#0
EOT
hostess>*0>02AC
ACK
hostess>?#0
#020.
hostess>
II>0890
hostess>*0
NAK
hostess>?*0
*0>0000
hostess>?#0
EOT
hostess>*0>02AC
ACK
hostess>?#0
#020.
hostess>
Wednesday, 6 January 2010
Subscribe to:
Posts (Atom)