Tuesday, May 10, 2011

WCF debugging

Came accross this page while I was having problems getting a WCF connectivity to work:

Basically, when you want to trace the WCF communication, this is the way to go. Just add this to your app.config and an svctrace file will be created:



  <system.diagnostics>


    <trace autoflush="true" />


    <sources>


      <source name="System.ServiceModel"


              switchValue="Information, ActivityTracing"


              propagateActivity="true">


        <listeners>


          <add name="wcfTraceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="WcfTrace.svclog" />


        </listeners>


      </source>


    </sources>


  </system.diagnostics>





Friday, January 30, 2009

Creating standalone atlas installer with 7-zip module

The basic idea behind this is quite simple. It's a 3-step process:
  1. Collect all files and scripts necessary to perform a specific task and zip then up with 7-zip.
    - using the 7-zip command-line the command is:
    7za.exe a -mx5 atlas.zip
  2. Create a config file (config.txt) that specifies the behaviour of the installer.
  3. Concatenate the zip-file, config file and 7-zip SFX-module with a binary copy
    copy /b 7zS.sfx + config.txt + atlas.7z
The resources needed (7za.exe and 7zS.sfx) can be downloaded from the internet. Link to guide:
http://www.msfn.org/board/How-to-make-a-7-Zip-Switchless-Installer-t39048.html

Friday, October 31, 2008

Remote Windows Service control

The command line way of controlling windows services is to use the net start and net stop commands. This will not work for remote servers though.

Instead we use the sc command. If I want to stop a service on GR0409A1, write:

sc \\gr0409a1 stop "Sonic CT_H1_ARN_StartGR0409A1 Service (AtlasProd)"


Also we can configure services with the sc command. To configure a service to autostart:

sc config "Sonic CT_H1_ACN_StartAtlasFileTransfer Service (LocalTest)" start= auto


This will work at least on XP.

Thursday, October 23, 2008

Rename files

I often have to rename files with the additional file extention .reject.
I basically just want to remove the .reject extention and keep the rest of the file.

This is the typical dirctory listing
C:\Apps>dir \\seit1705\D-Share\test\
 Volume in drive \\seit1705\D-Share is SEIT1705
 Volume Serial Number is 78E4-8FB3

 Directory of \\seit1705\D-Share\test

 2008-10-23  13:25  .
 2008-10-23  13:25  ..
 2007-10-03  16:45  1 144 E_DepSub_RME.xml.reject
 2007-10-03  16:45  1 144 E_DepSub_RME1.xml.reject
 2007-10-03  16:45  1 144 E_DepSub_RME2.xml.reject
 2007-10-03  16:45  1 144 E_DepSub_RME3.xml.reject
               4 File(s)          4 576 bytes
               2 Dir(s)  15 828 320 256 bytes free

You would think that this would do it:

ren \\seit1705\D-Share\test\*.reject *

But no... that command does NOTHING.

Ok, what about this:
ren \\seit1705\D-Share\test\*.reject *.xml


Nope, it produces this:
C:\Apps>dir \\seit1705\D-Share\test\
 Volume in drive \\seit1705\D-Share is SEIT1705
 Volume Serial Number is 78E4-8FB3

 Directory of \\seit1705\D-Share\test

2008-10-23  14:47              .
2008-10-23  14:47              ..
2007-10-03  16:45             1 144 E_DepSub_RME.xml.xml
2007-10-03  16:45             1 144 E_DepSub_RME1.xml.xml
2007-10-03  16:45             1 144 E_DepSub_RME2.xml.xml
2007-10-03  16:45             1 144 E_DepSub_RME3.xml.xml


Not what we want.

Solution:

ren \\seit1705\D-Share\test\*reject *xml


Amazingly works!

Saturday, October 4, 2008

Permanently mounting NTFS partition

I have a data partition that is NTFS formatted. I could mount it previously, but it was not automounted.

To fix this, I did the following:
1. got the graphical config program for ntfg-3g with:
sudo apt-get install ntfs-config
2. backed up my current /etc/fstab with:
sudo cp /etc/fstab /etc/fstab.orig
3. checked the mount info with:
sudo blkid
4 ran the config program that does the mounting with:
gksudo ntfs-config
5. I chose the correct partion to mount and the chose to make it writable.

... done!

No problems so far.

Wednesday, October 1, 2008

Way to go Logitech!

When the H&M moved their offices to Marievik, the moving boys lost the USB stick to my MXRevolution mouse. I was PISSED!

I called Logitech support to check if it was possible to buy a replacement somewhere. Instead they sent me a replacement for free! I am sitting stunned looking at the replacement right now!

Thumbs up and three cheers for Logitech!

Edit: Unfortunately they sent me the wrong USB stick.... a new one is on the way...

Edit: Three month later and I still haven't gotten the stick. I am now completely disappointed with Logitech.

Tuesday, September 30, 2008

Test of VirtualBox

Will be trying out running VirtualBox to satisfy my windows needs (banking, etc - Handelsbanken does not support Linux...).

More to come.
----------------------
Ok, had problems with the default Ubuntu VirtualBox package, so I downloaded the latest version from http://www.virtualbox.org/wiki/Linux_Downloads. Installed it and got it running. Currently installing XP and performing upgrades (installed SP1):


But some problems may be yet to come:


More to come.

Trying to get the USB working with this tutorial:
http://stikiflem.wordpress.com/2008/08/30/enable-usb-support-in-virtualbox/

Need USB to get Handelsbankens j-vla Nexus Personal att importera min cert!!
----------
Some problems still remaining with VirtualBox:
- CPU goes to 100% of one of the cores when I plugin a USb device - known problem, no fix found...
- VirtualBox OS hangs when I suspend Ubuntu - fix for this is supposed to out in release 2.0.4 of VirtualBox...
---------
This might be a really good idea for me:
http://blarts.wordpress.com/2007/12/06/how-to-run-virtualbox-using-a-physical-partition-using-ubuntu-feisty-fawn/