a collection of technical fixes and other randon stuff

Spodworld

  • Join Us on Facebook!
  • Follow Us on Twitter!
  • LinkedIn
  • Subcribe to Our RSS Feed

Problem connecting to port 25 on windows Vista

If you're havinf problems connecting to port 25 on Windows Vista, try the following :

 

1. Try using Telnet from the command prompt.

2. If Telnet is not installed, add it from the Control panel.

3. If you can use telnet but still cannot connect, try Telnetting to port 25 on a different server.

4. If still no success, then there is probably some blocking in progress.

5. Try turning off Windows Firewall, and retry your connection.

6. Check the Applciation event log (via control panel/ admin tools) for any  suspicious events. Most likely an antivirus program cas blocked connectivity to prevent spammers.

7. Check your Antivirus settings. Mcafee Antivirus had blocked me in my case.

 

Hope that helps! :)If so, dont forget to say thanks!

Installing Windows 2000 on VMWare workstation

Possibly the most frustrating afternoon i've had in a long while is trying to install Windows 2000 on VMWare workstation.

 What was the big problem?

Hanging on the "Installing Windows 2003" shortly after it had copied it's basic drivers to begin the install.

Firstly, bear in mind that Windows 2000 was always a bit poor when it comes to SCSI drivers etc... 

Second ...note, that whizzing through the default set-up wizard will probably provide you with an emulation running on a SCSI drive.

Thirdly... all the forums inform you to try adding

 MAGICBOOT1 = 400

To the .vmx configuration file.

 

Here's what I did, follow the process bit by bit, if it works, fine... use it asa it is:

  • Add the magicboot command as the forums recommend. 
  • Go to [Edit]->[Preferences] and Change the default hardware compatability to "Workstation 4".
    (This was the last thing i tried before it worked so it would be wise for you o try it first ;)  )
    It also makes sense to downgrade the hardware a bit.
    Dont trust VM to do this... close VMWare and open up the .vmx file, you can change this from 6 to 4 in the config.
  • If that doesnt work, go to the hardware settings
    Use the [remove] button on USB, Network, Sound and Hard Disc Sections so that the icons are gone.
    Change your CD ROM advanced settings to use IDE 1:0 for your CD
    Create a new Hard drive. Make sure it's IDE (I used IDE0:0). I also reduced the size to 6GB and reserved the space in advance, so that the disc is all nice and ready.
  • Check the .vmx file try removing any references to SCSI drives and repeated referenced to the same hard drive on disused IDE controllers.
  • Reduce the processors from 2 to 1. (Simplify things for the installer)
  • In [virtual machine settings] ->[options] ->[advanced]... Disable acceleration and disable memory page timing. (It might help... although mine worked without changing this on the successful run)
Anyway, hope that helps .... i'm now looking at it havin problems detecting keyboard and mouse.... oh well!

UPDATE: a quick reset and enableing the Enhanced Virtual Keyboard.... and setup resumes...

Feel free to look at my VMX file below for tips

Windows 2000 Server.vmx (1.92 kb)

Code coverage - PartCover and Nunit f

I recently have been looking into Code coverage tools, as i need some measureable information on how well a product is tested.

Being .NET based, i looked around NCover first(theres two versions of this) so i also stumbled across PartCover , which is free and although could do with a few tweaks, proved to be of use, certainly for an older project of mine that had NUnit tests already written.

 Step 1 . Install and run

Run the installer as you would normally, You get a start menu entry under [Start] ->[Programs] ->[Gubka bob]

 Step2.  Choose your Run target

 Go to [File] ->[Run Target]

  • I Pointed the [Executable File] To the Nunit GUI  (TypicalllyC:\Program Files\NUnit 2.4.8\bin\nunit.exe)
  • Then i Pointed the [Working Directory] to the overall solution path of an old website. The solution contained a core dll with most of the code in it
  • Next I added a rule to tell it what Classs to report on. I just used " [MyCoreDLL]* "
    (Where MyCoreDLL was the name of the assembly]
 

ASP,net Compiled DLLs and simplifying builds

Recently i've needed to understand more about the methods and naming of compiled dlls in an ASP.net website.

I'd come across a problem in a system that auto updates it's self, and the fact that we wanted to do controlled partial updates to the system.

What i had noticed in testing is that some developers code produced lots of .compiled files and strangely named dlls , whereas others had just one or two files when the site was published.

This was a big problem when looking at the update process because if a customers site has a mixture of the two release methods, then it was pretty much guaranteed to fall over with error messages like 

"The file has not been precompiled".

 Two options

 In Visual Studio 2008, you get an option when publishing a web site to "Allow this precompiled site to be updatable".

When not selected, each asmx asn aspx page gets compiled to it's own dll and a .compiled file is created for each page also. To cut a long story short, this makes the client side content of your pages uneditable and more secure. The ".compiled" files reference the relavant dlls and provide checksums to ensure they are valid.

When selected, the file list becomes much simpler with fewer dlls and ".compiled" files.

Facing future updates and testing of code releases, the latter option sounds the most promising and most managable but there are still a few files that cause cause a bit of head scratching.

App_Code.dll

App_Web_xxxx.dll (sometimes several of these)

App_global.asax.dll

 App_Web_xxxx.dll

These little guys offer the most confusion for our planned auto update service because the name of these files changes with each build and are pretty randomised. This can pose a big headache when trying to know which dlls to replace, add or delete. Without a solution, the only alternative is to do updated of the whole bin director.

Luckily there is, but first, an explanation of the files and what you can do to reduce them.

  •  App_Code.dll - Is where all your classes reside. Basically everything that has come from your App_Code folder in Visual Studio gets compiled into here.
  • App_Web_xxx.dl -This contains all "CodeBehind" code. Typically the c# or VB classes that are in files outside of the  App_Code folder. (aspx pages etc...). I've found that you are more likely to have more of these if web pages have the same class definitions in them. "public partial class _default" was a classic example in some of my files. You can reduce the number of dlls byreducing this duplication.
  • App_global.asax.dll - ??????????????????????????

A Nicer Way

There is a nice tool called "Web Deployment Projects for VS 2008." A walkthrough and download is available here.

Oncedownloaded and installed you get an extra option in the build menu and whe nright clicking on your solution. This allows you to ass a deployment project. 

Like publishing,setting properties and for the new project will allow you to choose  "Allow this precompiled site to be updatable". But also allows you to merge the nasty dlls into one and ensure the dll always has the same name.

Basically, App_Code.dll, App_Web dllls and App_global dlls merge into one so, you dont have to remember which dll is required for your fixes or updates later on.

 

Dynamically relocating shortcuts in Wise Installation Studio

I often find trying to get an all singing all dancing installer working in Wise Installation studio can be a long drag for some features.

I was attempting to create a generic installer using parameters to change the properties i needed. The application was a simple lockdown browser tool but was required by multiple customers.

For this

a) The program(s) should go in a standard location eg: c:\program file\mycompany

b) The installation location should be customer related  to allow for multiple installs eg:  c:\program file\mycompany\myproduct\mycustomer

c) Have different Shortcuts for different customers(so teach release of the installer doesnt overwrite the other

d) Have different installer IDs foreach customer (so they dont end up having to uninstall to install a new instance)

  This solved the problem of location, but i've yet to change the shortcut name dynamically.

 

For this article... c) was causing a problem as there was no obvious way that seemed to work. (There were obvious ways that didnt lol)

 

 

How to change the locations of the shortcut file......

 

1. Goto the [files] section in [Installation Expert]

2. Goto Windows\Profiles\Start Menu\Programs and create yourself a dummy shortcut folder eg: myShortCuts 

3. Create your shortcut in the [Shortcuts] section in [Installation Expert].

4. Set the Dest. Directory to the new location you created (you can tweak icon and name later)

5. In [Setup Editor] go to [Product] ->[properties] and create yourself a propery called MYCUSTOMER and give it a value of 'defaultcustomer'

6. In [MSI Script] interface, use the [Set Directory] action as follows:

  • Call it MyShortCutPlacement
  • For Directory, browse to Windows\Profiles\Start Menu\Programs\myShortCuts. the value will change to MYSHORTCUTS to be referenced by wise.
  • For the Directory Value enter   [ProgramMenuFolder]\[MYCUSTOMER]\ THis should place your shortcut under the programs section with your customer name.
  • I placed the action towards the end of the User Interface script. Anywhere else seems to product the standard unhelpful error codes from windows installer.


This deals with the shortcut once using this parameter, you can alter it however you wish in the interface. I also changed the location of the installed files to be dependant on customer name. to avoid any overwriting of files

 

 

A winge about wise!

I can't complain too much because 12 months ago i reviewed a lot of installers for the company i work for and found Wise Installation Studio was the most suitable for the job at the time.

 

Pet peeves

  • No decent help out there
  • The official forum is really bad for searching
  • There doesnt seem to be any nice collections of scripts available.
  • Setting at scattered acrosss several interfaces, and the websites keep resetting/ disabling every time the project is saved.
  • Removal of websites seems a bit hit-n-miss as to if it removes it entirely.


Top tips

  1. Save your work frequently, back it up or use a repository like subversion so you can revert back to a previous version
  2. Customise your page views....
    Make yourself a custom list of pages (down the left hand site) that only lists the pages you need. It saves time staring blankly at the screen for the feature you want to use.
  3. Remember the IIS options are split between the dialog boxes and the Website [Details]. SOmetime , i find you can't access these, (Adding a new website and then removing it refreshed the display and lets you get at them)
  4. Add files with the 'Update installation as files are added; option.
    This saves time later on updated releases.
  5. Add some tool tips.
    For IIS and sql installs this little extra info improves the installer interface a lot and makes it easier for your end users.

SQL Management Studio Express glitch

I came across an annoying glitch in an instance SQL Management studio express today.

The install was with SQL2005 Express, and windows 2003 server. 

When i expand some child nodes eg: list of databases, i got a persistent error that would require a second retry to expand the nodes.

 The error was :

 

TITLE: Microsoft SQL Server Management Studio
------------------------------
Unable to cast COM object of type 'System.__ComObject'
to interface type
'Microsoft.VisualStudio.OLE.Interop.IServiceProvider'.
This operation failed because the QueryInterface call
on the COM component for the interface with IID
'{6D5140C1-7436-11CE-8034-00AA006009FA}'
failed due to the following error: No such interface
supported (Exception from HRESULT: 0x80004002
(E_NOINTERFACE)). (Microsoft.VisualStudio.OLE.Interop)
 
To solve this  i found registering a dll worked for me...
try entering this at a command prompt
----------------------------
regsvr32 actxprxy.dll
----------------------------
 
...wish i tried this days ago now it cut my click count in half :)
 

Subversion

I have to admit, I have been converted  from the dark side (Microsoft Source Safe) to the Subversion family of tools/add ons.

Thanks to a fellow code monkey, my opinion was changed, in all but a matter of weeks.  I wouldn't say it was a 'kicking and screaming' moment, rather a reluctance to move off the nice warm couch, assume the lotus position and do things in a differently painful way. Similar creaking of joints came from the rest of our team.

The problem is, source code control is an essential  process which can be painful you don't have the right tools. Like a lot of you out there , you may think the commercial offerings are too costly, and i for one have in the past, still managed to lose several  hours of work to source safe due to program oddities, process isues, or just bad practice. 

 

What i'm saying is... pucker up and embrace Subversion. If all yuo've known is SourceSafe, you're going to love this, and all it's little quirks.

 

  Subversion can be found at http://www.tigris.org;

 

Welcome to my Blog

I've been avoiding blogging for a long while now..Im not sure why people do it, but as i'm always finding useful bits of information on other peoples , i thought i'd share a bit of the knowledge.

Who knows... someone might find something useful on here, if you do , send me a postcard, or even better a blank cheque :)

 

I'll try and keep the coding stuff separate from teh insane ramblings, but there might be a grey area in between the two. I appologise in advance.