Work VPN kills Internet connection

by Rick Glos 7/2/2008 10:40:07 AM

So I've been connecting to work lately via VPN using the laptop directly instead of using a virtual machine.  It's helpful when I need to get to source control or the work item tracking systems we use since they can't or aren't setup to work over HTTP/S.

One thing that bugged me was that after I connected to the work VPN, it would kill my ability to use the Internet on my laptop.  Sure I could get source or browse the fileshare, but I could no longer connect to articles on MSDN or whatever.

So I thought I'd post a solution here in case someone else may find this handy.

We need to disable the option to 'Use the default gateway on the remote network'.  See below for details.

Connecting to work is nothing fancy - we just use the built in VPN abilities with the operating system - in my case Windows Vista.

Setup.VPN

Setup to use your existing Internet connection.

Setup.VPN.02

Enter in where you want to connect to - you'll need an IP address or domain to connect to.

Setup.VPN.03

Enter in your work related username, password and domain.

Setup.VPN.04

Notice though that there isn't an option to modify anything.  Sure the connect works but this is where it kills our Internet connection.

Go into Network connections and we'll modify this VPN connection.

Setup.VPN.05

First we need to modify the IPv6 and then IPv4

Setup.VPN.06

And now IPv4

Setup.VPN.07

And that should do it.  Connect now to your work VPN and then you can still use the web.

Later

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

programming

Installing Virtual Server on Vista

by Rick Glos 6/16/2008 10:18:24 AM

It took me about an hour and a half to install and configure Microsoft Virtual Server 2005 on Vista.  A little frustrating.

So I'm throwing this out there in case someone else finds it useful.

This is specifically in regards to the latest version at this moment, Virtual Server 2005 R2 SP1, and Vista with Service Pack 1.

You should have already installed IIS on Vista because you use this to manage the virtual machines.  However whenever I tried to use the url http://localhost/VirtualServer/VSWebApp.exe, Internet Explorer and Firefox both kept trying to download the VSWebApp.exe.

Apparently you also need to make sure the CGI portion of IIS is installed on your Vista IIS install:

Installing CGI Feature on Vista IIS

After that, or before it doesn't really matter, make sure you apply the patch from KB948515 so that is works Vista SP1.

You have to run the patch, a .msp file, from the command line using the msiexec utility like so:

msiexec /p path of .msp file

After that, I was able to connect to the administration website, but still was getting an error that stated, "Could not connect to Virtual Server. Access Denied."

Virtual.Server.Access.Denied

I am logging into Vista with UAC on and trying to suffer through all the 'Allow this...' pop-ups that occur now and again.  So the quick fix is to run IE as an administrator:

Run.IE.as.Administrator

This will launch IE in administrative mode so that Virtual Server is now happy. 

There's a couple of other ways this might be solvable but I did not attempt them.  One is to run dcomcnfg per this article.  It states WinXP but I do see the options in Vista.  I cannot use my domain account at home so I'm having trouble attempting this.  Second is to add your account in Virtual Server security per this article, but I seem to be already in there and it's not working soo... go figure.

For now it'll have to be a right-click, run as admin launch method.  That works for now.

Later

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

programming

Turn off the annoying beep sound on virtual machines

by Rick Glos 6/9/2008 2:00:59 PM

I was building a new windows 2003 server using Microsoft Virtual PC and was getting that annoying beep through the pc speaker and remembered that I have a registry fix for this buried on my scripts folder I've carried along through the years.  I thought perhaps this would also help someone else.

This is a registry change on your virtual machine.  Copy this file onto your virtual machines desktop, right-click and select Merge.

how to run a registry file

Here's the contents:

   1:  Windows Registry Editor Version 5.00
   2:   
   3:  [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Beep]
   4:  "Start"=dword:00000004

Reboot the Virtual Machine for the change to take effect.

Later

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

programming

Working from your computer at home on your work laptop

by Rick Glos 6/4/2008 6:04:00 PM

Second day working from home.  With my laptop sitting on the same desk my existing pc, it has become a exercise in coordination.  I've hooked up an external mouse because who can use the silly laptop pad or stubby knob in the IBM laptops.  It's for portable use only, like in airports, it's not meant for serious desktop use.

So on my home PC I'm listening to tunes through Pandora, running a web browser displayed on my home monitor.  And down on the desktop of got the laptop open.  Sitting there are two mice, one for the home pc, another for the laptop, the home pc keyboard and ahhh...

There's got to be a better way.

First I thought a KVM switch.  I could use 1 monitor, keyboard and mouse and switch between the two pc's.  But that seems really old school.  It uses hardware.  Can't I emulate this stuff?

Ah hah.  How about terminal services/remote desktop?  Why not just connect to my laptop with my home pc and run the laptop like a black box that could sit anywhere in the house connected to the network?  Ok so that's what I did.

First we have to enable Remote Desktop in Vista (that's right - I'm trying to use Vista for work).

Enable.Remote.Desktop.For.Windows.XP

Apparently you cannot use the Network Level Authentication from a Windows XP machine.  It's Vista only.  So it means you must select the less secure method.  If you're doing Vista to Vista then choose the more secure option.

Now we can connect from the Windows XP machine.  Easiest way is Start --> Run --> mstsc

Start.Run.mstsc

Then enter the remote computer name you want to connect to and log in.  There you have it.

Another thought I had was the programmers bill of rights and multiple monitors.  At least two, preferable three.  Can this even be done with terminal services?

Apparently it can.

mstsc /span

This MS KB article states it can be done but that you're limited to 4096 x 2048.  Essentially two monitors.

I have yet to test it out since I'm only a 1 monitor guy at home.  That's going to be remedied here shortly.

Later.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

programming

Updated bandwidth test

by Rick Glos 5/4/2008 8:45:18 AM

Tested the bandwidth almost two years ago.  I wanted to see if the numbers still held up.

May 2008

Aug 2006

They've gotten better.  2x better on the download (12605 kb/s vs 6166 kb/s).  4x better on the upload (1450 kb/s vs 351 kb/s).  I've not changed my service.  Good for comcast.  The only thing I really use the upload for is ftp, accessing my music, photo's, media, etc. from remote pc's.  Been running FileZilla for the server as well as using the client.  No complaints.  Although my server is constantly trying to be hacked.  From the logs:

(000001) 4/15/2008 21:23:07 PM - (not logged in) (219.106.227.188)> 220-FileZilla Server version 0.9.24 beta
(000001) 4/15/2008 21:23:07 PM - (not logged in) (219.106.227.188)> 220 Welcome to Rick's FTP Server
(000001) 4/15/2008 21:23:08 PM - (not logged in) (219.106.227.188)> USER Administrator
(000001) 4/15/2008 21:23:08 PM - (not logged in) (219.106.227.188)> 331 Password required for administrator
(000001) 4/15/2008 21:23:08 PM - (not logged in) (219.106.227.188)> USER Administrator
(000001) 4/15/2008 21:23:08 PM - (not logged in) (219.106.227.188)> 331 Password required for administrator
(000001) 4/15/2008 21:23:08 PM - (not logged in) (219.106.227.188)> PASS *********
(000001) 4/15/2008 21:23:08 PM - (not logged in) (219.106.227.188)> 530 Login or password incorrect!
(000001) 4/15/2008 21:23:08 PM - (not logged in) (219.106.227.188)> PASS *********
(000001) 4/15/2008 21:23:08 PM - (not logged in) (219.106.227.188)> 530 Login or password incorrect!
(000001) 4/15/2008 21:23:09 PM - (not logged in) (219.106.227.188)> USER Administrator
(000001) 4/15/2008 21:23:09 PM - (not logged in) (219.106.227.188)> 331 Password required for administrator
(000001) 4/15/2008 21:23:09 PM - (not logged in) (219.106.227.188)> USER Administrator
(000001) 4/15/2008 21:23:09 PM - (not logged in) (219.106.227.188)> 331 Password required for administrator
(000001) 4/15/2008 21:23:09 PM - (not logged in) (219.106.227.188)> PASS ********
(000001) 4/15/2008 21:23:09 PM - (not logged in) (219.106.227.188)> 530 Login or password incorrect!
(000001) 4/15/2008 21:23:11 PM - (not logged in) (219.106.227.188)> PASS ********
(000001) 4/15/2008 21:23:11 PM - (not logged in) (219.106.227.188)> 530 Login or password incorrect!

I don't think there is really anything I can do about it.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

programming

How to run cmd files from Visual Studio

by Rick Glos 2/27/2008 1:25:59 PM

This will take you a few minutes to setup but once your done, it will save you countless minutes.

It's not unusual to have scripts in your project or solution that automate tasks.  Everything from executing a powershell script, moving files around, or some other custom automation tool you may have written.

The default for double-clicking a cmd file in Visual Studio is for it to open the script for editing.

image

But what if you want to execute it?

One way is to right click the folder above the file, choose 'Open Folder in Windows Explorer', wait for that window to open, find the file with your eyes again, and double-click to execute it.

I tried using the 'Open With...' menu item and adding cmd but it doesn't allow you to pass in the file.

image

So what you end up with is an empty cmd prompt window that hasn't executed the script you thought it would.

Ok great so how did you do it?

On the tools menu you can add external tools and add arguments.  So Tools -> External Tools and a window will open that allows you to run with cmd and also pass in the initial directory as well as some additional arguments.

I created two:

One that terminates the window after executing

Title Run With Cmd
Command C:\Windows\System32\cmd.exe
Arguments /C $(ItemPath)
Initial directory $(ItemDir)

image

One that remains after executing

Title Run With Cmd and Remain
Command C:\Windows\System32\cmd.exe
Arguments /K $(ItemPath)
Initial directory $(ItemDir)

image

So now you can select the file in solution explorer, then select Tools -> Run With Cmd.

You could go one step further and add it to the context menu.

There's many ways to get into menu customize mode, one way is to choose View -> Toolbars -> Customize.  Make sure to select the 'Context Menus' toolbar and you'll notice a toolbar appear in your menu when you're in customize mode.

image

This next part is tricky.  Leave the customize dialog open - it's semi model, if you close it, you're out of edit mode.  Click Tools -> and you'll see you're new command listed something like 'External Command 3', you'll have to remember which ones you created (or yes you could go and customize that text as well).

Hold down control and left click (we want to copy this to the context menu not move it), slide your pointer over the 'Project and Solution Context Menus' menu item in the context menu toolbar, then down to 'Item', and drop it in there wherever you like.

image

Close the customize dialog.

Now you can right-click on a cmd file in Solution Explorer and select either 'Run With Cmd' or 'Run With Cmd and Remain'.

image

Later

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

programming

Visual Studio 2008 - Not enough storage space is available

by Rick Glos 2/11/2008 10:39:00 AM

We get a, "Not enough storage space is available" error at the office quite abit, especially with the move to VS 2008 and instead of just passing around the fix internally, I thought I'd post it publicly in case others may find it useful.

We gleaned this information from a forum post on the MSDN message boards here.

Basically, you're going to allow VS to use more memory.  Since we have WinXP boxes with 4GB this is useful.

First, edit your boot.ini file on your C: drive.  Make a backup of the file just in case (copy+paste it in the same directory for example).

Locate your boot.ini

Next, add the 3GB switch option.

Add 3GB switch.

Now we need to use a utility.  Open a command prompt.  And run the editbin utility with the /LARGEADDRESSAWARE switch on the visual studio exe, devenv.exe.

Since they are not in the same folders, specify everything with full paths.  For a majority of you that used the defaults to install, this should work, but change the paths if you need to:

"C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\editbin.exe" /LARGEADDRESSAWARE "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe"

image

Now you need to reboot your machine.

Done.

Later

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

programming

Google Chart API

by Rick Glos 1/30/2008 12:57:00 PM

Google has introduced a way to dynamically create charts by using a url.  As an example, here's my bicycle mileage by week for the month of January.

2008 Bicycle Mileage

If you right click the image on the right you'll see that's it's not a static image by looking at the properties (right-click the image and select Properties).

What's that mean?  Well if you navigate to Google's homepage and check the properties of their image you'll see it links directly to a file called logo.gif, whereas the image above does not link to a file at all, it's generated each time the page is accessed.

StaticVsDynamicImage

It gets all the information needed to render the image from the garbage you see after the question mark: http://chart.apis.google.com/chart?cht=p3&chd=s:hW&chs=250x100&chl=Hello|World.

To get an idea of how it works and what's possible I graphed my cycling mileage.

What I needed first was to aggregate the data.  If I look at the mileage log that I keep in Microsoft Excel it looks something like this:

Date Mileage
2008.01.15 19
2008.01.16 30
2008.01.22 25
2008.01.24 25
2008.01.28 23
2008.01.30 23

Using a pivot table we can quickly summarize this data:

Week Number Mileage
Week 1 0
Week 2 0
Week 3 49
Week 4 50
Week 5 48

Now we need to put that into a format that the Google Chart API can handle.

Here's a breakdown of the long url needed to create the image above:

http://chart.apis.google.com/chart? this is the API endpoint
chs=300x200 create a chart 300 pixels wide by 200 pixels tall
&chd=t:0,0,49,50,48 chart data for the 5 weeks
&cht=lc line chart (vs pie, bar, venn, and scatter)
&chxt=x,y,x,x multiple chart axis
&chxl= labels
0:|Week+1|Week+2|Week+3|Week+4|Week+5| labels for the 1st x axis
1:||25|50|75|100 labels for the only y axis
2:|Jan| label for the 2nd x axis
3:|2008| label for the 3rd x axis
&chtt=2008+Bicycle+Mileage chart title
&chm=B,FFE4BB,0,0,0 chart fill color
&chxp=1,0,25,50,75,100 y axis label positions

It looks like alot of work and it was at first.  You could get better hacking this out over time but you'd definitely want a some kind of method that would start with the data and just emit the url.

Currently there's a limit of 50,000 queries per day per user.  It would take alot of hits to max that out, and this blog doesn't have that kind of traffic.  It is a good tool for creating an image of a chart.  They state that it was created to, "support rapid embedding of charts within our own applications".  I'm not sure how rapid this is compared to whipping it up in Excel and saving the image as a file for the average user.  A developer could get some mileage out of this but the 50,000 day limit would be something to consider.

You can find all the documentation for the API here.  As a proof of concept I may try and update the graph weekly or monthly and see how it goes.

Later.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

programming

Powered by BlogEngine.NET 1.2.0.0
Theme by Mads Kristensen

About the author

Rick Glos Rick Glos

Moved to the Portland, OR after living 35 years in Chicago, IL and Milwaukee, WI. Write software to pay the bills. Aquire bills by being interested in bicycles, computer gaming, movies, and books.

E-mail me Send mail

Calendar

<<  July 2008  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar

Recent posts

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Sign in