Another email stating that I have passed 70-515 TS: Web Applications Development with Microsoft .NET Framework 4 which I took in beta back in April.
Regards,
Oleh
Wednesday, June 30, 2010
Thursday, June 24, 2010
MCTS .NET Framework 4, Windows Applications
Just received an email that I have passed 70-511 TS: Windows Applications Development with Microsoft .NET Framework 4 which I took in beta back in April.
Wednesday, April 28, 2010
Monday, April 12, 2010
Visual Studio 2010 and .Net Framework 4.0 RTM!
As it was announced earlier today Visual Studio 2010 and .Net Framework 4.0 are publicly available with Silverlight 4.0 available later this week.
Thursday, January 07, 2010
MCTS: SQL Server 2008
New certification passed. This time I have successfully passed TS: Microsoft SQL Server 2008, Implementation and Maintenance exam.
Currently my MCTS certification stack looks like:
Regards,
Oleh
Currently my MCTS certification stack looks like:
Regards,
Oleh
Monday, November 23, 2009
Fiddler deep dive

First PDC09 session I have watched is Become a Web Debugging Virtuoso with Fiddler where Eric Lawrence who is Fiddler's author unveils its origin, shows different use case scenarios, how it can be used for tuning performance, manipulating traffic, how it can be extended and finally announced availability of FiddlerCore library that encapsulates basic Fiddler functionalily (HTTP proxy) and can be utilized by applications directly.
I'm using it for quite a while but only after observing this session I understood that I was using no more than 40% of Fiddler's functionality.
Must see session for every web developer!
Useful links:
Regards,
Oleh
Sunday, November 15, 2009
Restart WPF application that is ClickOnce deployed
What do I have:
Tiny WPF application deployed via ClickOnce that is up and running all the time and like start menu it contains shortcuts to applications that will be used by users + work related statistics. Application is deployed to remote IIS and is available offline.
What do I need:
When new version is deployed application must upload latest version and restart itself. Kind of self updating application. For that it is checking every x minutes for a new deployment.
Problem:
- Unfortunately there is no appropriate method in Application class for restarting WPF application like there is one in Windows Forms. Referencing Windows.Forms just because of that does not sound like a proper solution. If Restart method was pulled out from WPF then there should be a reason for that.
- Starting a new process with application deployment path and shutting down current does not sound like a good idea as a new browser window will be opened. I don’t want users to be confused by any new windows that will appear without ‘any reason’.
- Starting a new process like Process.Start(Assembly.GetEntryAssembly().Location); is good for just restarting but in case of ClickOnce deployed application it will start the same version but not new one.
- Another point to make application self updating is that since it’s up and running all the time it needs to utilize latest critical updates that maybe time critical.
Solution:
What I thought of was to create a simple “restarter” app that will:
- Be started after new version is downloaded.
- Close all running applications by closing all processes by app name.
- Contain a transparent borderless main window with a web browser control on it that will navigate to app deployment uri. It will ensure that no new browser windows will appear, no ClickOnce “Update Available” dialog will appear and latest version will start.
- When navigated (new app started) it will close itself.
- Encapsulate all restart logic + infrastructure (invisible web browser control).
Main Application will contains a timer that will check for new version, update current deployment if new one is available, start ”restarter” and finally shutdown itself.
Main code blocks:
Main app:
///
/// New version check routine.
/// If new version is avaialble start restarte
///
private void CheckForNewVersion()
{
ApplicationDeployment deployment = ApplicationDeployment.CurrentDeployment;
// check for new version
if( deployment.CheckForUpdate() )
{
// start restarter process
Process.Start( "Restarter.exe" );
}
}
Restarter is pretty simple:
XAML:
<Window x:Class="Restarter.RestartWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
Title="Restarter" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="500" d:DesignWidth="500" SizeToContent="WidthAndHeight" Width="1" Height="1"
Loaded="Window_Loaded" WindowStyle="None" ShowInTaskbar="False" Opacity="0" Top="-10" Left="-10">
<Grid>
<WebBrowser Name="ctrlBrowser" Navigated="ctrlBrowser_Navigated" Width="10" Height="10"/>
Grid>
Window>
Code behind file has only two event handlers:
private void Window_Loaded( object sender, RoutedEventArgs e )
{
// shutdown all running applications
foreach( Process process in Process.GetProcessesByName( "WPF.Restart" ) )
{
process.Kill();
}
// open online application uri -> it will update app to latest version
ctrlBrowser.Source = new Uri( "" /* Insert your deployment uri*/ );
}
private void ctrlBrowser_Navigated( object sender, NavigationEventArgs e )
{
Application.Current.Shutdown();
}
You can download solution (.Net Framework 4 Beta 2) here or get it from file widget lower on the right panel.
Hope this helps someone.
Regards,
Oleh
Subscribe to:
Posts (Atom)
_1370.png)
_1369.png)

_1269.png)
_1269_507_1098_1103_512_513.png)