Categories
Geeky/Programming

Unit Testing Verisign Payflow Pro with VS2005

When you set up payflow pro on a system, you usually are going to use it through the web, you usually dump the certs folder into the inetsrv folder and it works fine. Thing is, when you are using VS2005 Unit Testing, you arent on the web, you can even try setting an HttpContext, but that still doesnt work, you end up with:

Get error “RESULT=-31&RESPMSG=The certificate chain did not validate, no local certificate found, Cert Path = certs, Working Directory = C:ProjectsMyProjectTestResultsuser.name_COMPUTERNAME DateTimeOut”

before you make your request in your tests, do this:
System.Environment.SetEnvironmentVariable(“PFPRO_CERT_PATH”, “c:certs”, EnvironmentVariableTarget.Process);

Copy your certs directory to your C: drive, or you can set the path wherever – mostly likely you would want to add it to your test project, and then set the path when you setup your environment variable as releative to your project.

When you run your unit tests again, you should see a valid response and the request to Verisign should go through correctly.

Categories
Geeky/Programming

Caching got you down? Try an Object Lock

If you are using caching in ASP.net, and when your cache invalidates, you see some really bad performance or race conditions, you probably need to implement object locks.

Categories
Life

Perfect Weather

I love weather like I am having now, 50-60’s – nice to open the windows and let some fresh air in, feels like good “cross country” weather 🙂

Categories
Life

Labor Day Weekend

Seemed that wherever I went this weekend ,the bad weather just couldnt keep up. Milacs Lake – the rain was back home. Then went up to the Iron Range, rain was still south of me. Was a pretty fun weekend, I have a few pictures posted here

Categories
Random

The Beachles

Another good Beatles mashup – Beatles and The Beach Boys – two of my favorite bands.

here is the link

Categories
Life

Lucy


Lucy

Originally uploaded by ScaleOvenStove.

Well, now I have a dog. Lucy (in the Sky) – Beagle, pretty mellow dog. 12 weeks old. Hopefully she stays cool. 🙂

Categories
Geeky/Programming

Windows ME – Vendor CD, SU0173 Error – What do you do?

So, I needed to install a Windows ME VPC today. I have a Dell CD that has ME on it, so I figured I would use that, and then probably just use my MSDN key or maybe it wouldnt need one. Well it turned into a mini-ordeal.

If you set up a new Microsoft VPC image for ME, and put the CD in, it goes fine, gets to setup, and bam! – SU0173 Error.  Pretty much means,  “you cant use this cd on a pc that isnt by the OEM manufacturer of the computer”. So after a couple minutes digging, found this site which give more information.  I downloaded the precopy1.cab .

Then I download undisker – created an iso from the CD. Got magic ISO going, added precopy1.cab to the iso. Got Microsoft’s virtual cd rom tool, mounted a drive and pointed at my modified ISO. Set my VPC image to boot the newly created virtual cd rom from the ISO, and I would good to go. Now I can use good ol’ ME 🙂

Categories
Geeky/Programming

To Catch or Not To Catch

Earlier today, it came up in discussion, on when to catch exceptions. Really, you end up getting bitten if you just catch exceptions in your code. Basically what happens is that you are using exceptions as flow control, and not using if/end, etc. What usually ends up happening is an exception is getting eaten, but you didnt want it to, and you dont know how your program is reacting to use. ELMAH is great, you should set it up if you are using .NET programming. Also, and it is funny, but this always happens, Scott Hanselman blogged about almost the exact same topic today. And if you can avoid, dont catch a System.Exception – use a more specific exception. If you turn on Code Analysis or run FxCop, it will tell you about that as well.

Categories
Geeky/Programming

New @Home Project: VehicleInfoTracker

I decided to start a new project at home, VehicleInfoTracker. I swooped up the domain, and started building a class library to support what I want to do. Using VS2005, C#, TDD, SQL2005. Have some basic parts done already – registering as a user, registering a vehicle(s) to a user. Working on adding a GasFillup/GasStation object model now. Since I bought my new car, I have been tracking my fillups and saving info on them so I can track my gas milage. We will see where it goes from here.. 🙂

Categories
Geeky/Programming

Installing IIS – Cannot find STAXMEM.DL_

Ahhh, IIS, gotta love it. Nothing can ever be easy.

So, as I am trying to install IIS on my Dell that I just reformatted, I get this:

Cannot find the file STAXMEM.DL_ in my C:i386 dir. hmm….

well, after a little looking, if you run this command

esentutl /p %windir%securitydatabasesecedit.sdb

If you then retry the install, it should work