wow, busy lately. Went and saw Nickelback at the Xcel Center on the 14th, that was pretty sweet. Had a house warming on the 16th, that was even sweeter. Now I just need to put my grill together 🙂 I put up some pictures I took right before the party here so check it out. Hopefully things will semi-calm down and I will have more time to post/geek around with projects.
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.
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.
Object myObjectLock = new object();
//Use the lock statement to ensure that only one request
//check again if the cache is not populated by another request
if (HttpRuntime.Cache["myCacheKey"] == null)
DataTable cacheValue = GetDataFromDatabase();
//remove the cache key
//insert into the cache
HttpRuntime.Cache.Insert("myCacheKey", cacheValue, null, DateTime.Now.AddHours(8), TimeSpan.Zero);
Now, when your cache is rebuilt, you will avoid race conditions and bad performance on your site/database.
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 🙂
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
Another good Beatles mashup – Beatles and The Beach Boys – two of my favorite bands.
here is the link