Using WinCVS and Integrating Visual Studio .NET with CVS over SSH

Recently I have had to use CVS rather than source safe as the repository for my latest project.  I have used CVS with visual studio 6 using the  igloo toolset, now I cant remember if that was over SSH but it did work very well and CVS is far superior than source safe.

The project that I am now on is a visual studio .net one with the cvs repository having access over ssh.  Firstly I wanted to set up wincvs as this tool is rather good, now to use ssh on windows you either go down the putty route or the cgywin route.  I personally quite like putty and that is what I did.  I used the latest beta version of wincvs 1.3.17.2.  I then followed this doc to get the basics going. 

Things I fell fowl of :

  • Wincvs always gave “Putty Internal Error” – “invalid port number” error when trying to connect.  I had the ssh client in preferences, ssh as putty.exe rather than plink.exe once changed, no more errors.
  • I couldnt get wincvs to prompt for a password and then it always gave a password error as it was prefilling it with empty string.  I then moved to set up a private public key so I didnt have to put in the password.
  • Couldnt recognise the public key, I wasnt sure if I had to have a file called authorization_keys2 or not with ssh2, or whether I had to have a .ssh2 directory.  On the clients box in the end I just saved the public key in the file authorization_keys in .ssh under the home directory of the account I was trying to login as and resolved the keys no problem.
  • Under the options controlling ssh authentication I had to uncheck attempt keyboard-interactive auth (SSH2) for it all to work as it would always fail to authenticate if this was checked.
  • Plus when I copied and pasted the public key from putty’s key gen I noticed in vi it didnt always paste the full key, just check that you have the full key when pasting it into your authorization_keys file. 
  • The key in authorization_keys must NOT have returns / line breaks in it, some editors may attempt to put line breaks in it.

One other thing when setting up your putty preferences in wincvs make sure you reference the saved session rather than the actual box / ip address your going to, the preferences do ask for this but you should use a saved session ie: paulfarrow@cvssavedsession:/home/cvs

Also you should run pageant.exe in the putty suite of programs, this will save you typing in the private key phrase each time you login.

Once all these things are in place, wincvs worked a treat for me and its a great program.

Secondly integration with Visual Studio .Net and CVS, well as I said before I used to use the igloo program but in this instance couldnt get ssh or ext protocol working with it, reading along the lines I dont think it can.  I then stumbled over this program which I have been using under evaluation.  It is created by pushok and seems to work no problem with ssh or ext.  It took me a little time to get it working, infact I went away from it but then I stumbled on what I have to do to get it going which wasnt that clear.

For ssh/ext protocol you must add the following environment variable CVS_RSH=plink.exe, once I had done this it worked fine.

The full faq about how to do that for proxyok can be read here.   The product appears to integrate with visual studio no problem, the only thing you must do is get into the right mind set to use CVS (as you probably are aware), as with CVS you take a snapshot of the whole module rather than just checkout what you want to work on.

 

Nathan Comben is leaving Standard Life Healthcare.

I heard yesterday that Nathan had handed his notice in at Standard Life Healthcare down there in Guildford.  I cant quite believe it actually as I thought he was a lifer !!!  Plus whats even more funny, he is going to join Anite Financials in Slough and I have done work for Anite in the past.

Any way I wish him well, but that does leave me to wonder who is going to support the EPS product down there at Standard Life, as most of the original team has now left.

Samba and a Windows 2003 domain

If you were getting permission denied while mounting a w2k3 share onto a linux box then here is a suggestion to get around that

• On the Win2K3 server select Domain Controller Security Policy from the Administrative Tools menu
• Navigate to Local Policies|Security Options
• Disable “Microsoft network server: Digitally sign communications (always)”
• Since FC2 you will also need to disable “Microsoft network server: Digitally sign communications (if client agrees)”
• You can wait for the policy to propagate or run gpupdate from a command line

 

🙂

Fixed Subtext View Picture Size Problem

Right I have fixed the view picture size problem in subtext as it was really bugging me.  I have removed the width and height settings so that it either defaults to the size of the picture, or you can override the settings using css now.

The new binaries with the change in are located here 

 http://www.paulfarrow.com/download/dottextpicupdate.zip.

You will then need to override the css in your options css override as follows:

.imageFrame img { width: 505px; height: 480px }

It does make the picture look a bit squashed but its in the correct place, play around with the sizes until you have what you want…..

Let me know of any problems that I have overlooked.  Take a look at the viewer here http://www.paulfarrow.com/gallery/2.aspx

 

javascript error in postback on ASP.net 1.1

Normal story, deploy code and what you think is live isnt actually live.  In this case I am talking about the ASP.net 1.1 Service pack 1.

And low and behold get a lovely javascript error when you have added controls to pages etc etc.

So after much digging around I found a solution to the problem (that is rather than deploying the service pack due to restrictions on the live server), which works lovely.  The solution …

You can override the render method in your pages or base classes depending on what your doing, like so

// Override the render method for all those machines
// without ASP.net 1.1 service pack 1

protected override voidRender(HtmlTextWriter writer)
{
StringBuilder stringBuilder = new StringBuilder();
StringWriter stringWriter = new
StringWriter(stringBuilder);
HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);
base.Render(htmlWriter);
string html = stringBuilder.ToString();
int start = html.IndexOf(”

int end = html.IndexOf(“\””, start);
string formID = html.Substring(start, end – start);
string replace = formID.Replace(“:”, “_”);
html = html.Replace(“document.” + formID, “document.” + replace);
writer.Write(html);
}  

This will only work if you have a form tag in your page, I guess we could adapt it so if the page doesnt have a form then dont do the replace, ie no postback needed.

Printing on Glossy Paper using a HP Deskjet 5850

Any tips guys for printing on glossy brochure paper using the HP Deskjet 5850???

I have been tasked by the wife to print a message on the back of a glossy brochure and wasnt having a lot of luck.

Basically the best quality was to set to print on brochure matt finish (although it was gloss) and to use maximum dpi (so the printing was fairly slow allowing the ink to dry) and to put the ink volume on its lowest, this then gave its best results.

Any other settings just smudged all the time.  Any one else have any tips for this printer.  Photos, and all other types of printing seemed to have been fine, perhaps its the dodgy brochure paper.  Its a rather good network (wired and wireless) printer would recommend it all be it for this little mishap.