House: They start digging today!
The permit was approved on Friday and they will start digging today! I have not seen any paperwork and dirt has not been moved yet. But there is an excavator truck on the lot so it must be for real =)
Arches Park with mom and sis
My mom and sister are here and I took them this past weekend to Moab. We did some rafting in the Colorado river and we visited Arches Park.
House update
The permit to start building our house is still in in progress… What the heck South Jordan City! I hope you only suck at giving build permits. It’s been about 6 weeks since we requested it.
As you can see it’s driving me mad… I’ll be living in South Jordan and it feels like we’re starting off with the left foot.
Basic Authentication for a C# Web Service without configuring IIS
I have an ASP.NET C# web service (*.asmx) that I want to secure using Basic Authentication. This would also apply to a regular ASP.NET web page (*.aspx).
I could have told IIS that if someone is hitting the specific web service file (*.asmx), they need to provide Basic Authentication. But I did not want to do that because I wanted the credentials (username and password) to be stored in my application’s web.config .
So I added the following code in the web service’s constructor:
string configUsername = ConfigurationManager.AppSettings["username"];
string configPassword = ConfigurationManager.AppSettings["password"];
if (!string.IsNullOrEmpty(configUsername))
{
//---- Check Basic Authentication credentials
string requestUsername;
string requestPassword;
try
{
// The header is in the following format
// "Basic 64BitEncodedUsernameAndPasswordString"
string userAndPassEncoded =
this.Context.Request.Headers["Authorization"].Substring(6);
// userAndPasswordDecoded is in the following
// format "theusername:thepassword"
string userAndPassDecoded = new System.Text.ASCIIEncoding().GetString(
Convert.FromBase64String(
this.Context.Request.Headers["Authorization"].Substring(6)));
string[] userAndPasswordArray = userAndPassDecoded.Split(':');
requestUsername = userAndPasswordArray[0];
requestPassword = userAndPasswordArray[1];
}
catch (Exception ex)
{
throw new ApplicationException(
"Unable to get the Basic Authentication credentials from the request"
, ex);
}
if (configUsername != requestUsername || configPassword != requestPassword)
throw new ApplicationException(
"You are not authorized to access this web service");
}
Even though the code is not long or complex, I wonder if .NET has a class to deal with Basic Authentication (let me know if you know a better way) so I don’t need to access the headers, substring, and decode. I looked around and did not find anything so I’m leaving it as is.
Important note: Remember that Basic Authentication transmits the credentials in clear text. So you probably want to use Basic Authentication over SSL (https).
Randoms …
On my last post I said that my legs were probably going to get better on the next day, and they did. But they just started to get better. To recap: I hiked Mt. Olympus on Sunday and had the worst muscle soreness of my life on Monday and Tuesday. On Wednesday it started to get better but it was still bad, same thing Thursday. Friday felt like normal muscle soreness. Saturday I went biking, my muscles felt ok. Sunday I was 100% healed. It feels like it took forever!
This last weekend my brother confirmed that he will be coming to visit from Prague in about 4 weeks. He has the plane tickets and all! And my mom and sister will also come over from Guatemala in about a week or two, they will stay until my brother comes in and hang out with him for a week. And my cousin from Florida says he might join us as well. Awesome!
When they are all here we’ll go to Yellowstone national park to see geysers, other volcanic activity, and green nature. We’ll then go rafting in the red rock desert of Moab as well as doing some hiking at Arches Park.
And when some are here, but not all, we’ll do some local hikes and I’ll drive them around Salt Lake City =)
Muscle Fever!
This is day # 2 and my legs hurt just like yesterday.
I read about it and I found a some cool information: Muscle soreness after overdoing exercise is officially called Delayed Onset Muscle Soreness (DOMS) or muscle fever. I’ve got the fever alright, and it is not fun.
Another fun fact is that there are a lot of Grandma treatments but none of them are scientifically proven to help you heal faster.
The worst pain is usually experienced 12 to 48 hours after the exercise. So I should be feeling better tomorrow.
I was actually trying to figure out if it would be bad if I biked when I have this pain. But then why would I want to bike if it hurts? Also, if it hurts it is most likely bad for you. So I’ll stop biking until the weekend =(
My legs hurt!
I can’t walk up stairs today because I hiked Mount Olympus yesterday with some friends
http://www.trimbleoutdoors.com/viewtrip.aspx?tripId=8205
You gain a bit more than 4,000 feet in about 3.3 miles. That is hard core, at least for me since it was the first hike of the year.
It took us 6 hours total. 4 hours up and 2 down. On the way up I went with the group, no problem. We got to the top and took in the amazing view as we chewed up on our power bars or whatever food we had.
On the way down my legs wore out completely. My quads could not hold my body weight at all!! It was really weird because it came all of a sudden. I was trotting down feeling tired but still normal tired. I kept up with the fastest guy for a small while and that was the end of my legs. I seriously could not flex my knee to hold my weight, I was forced to go down the rest of the way (a half of the way, maybe one third) speed-walk style and doing tiny little steps. And when I was forced to do normal steps (because of any obstacle) the pain in my quads was almost unbearable.
The trip was fun though and we conquered the peak. This was also a measuring hike because I want to do harder hikes this year. I now know that I need to train before doing anything harder than this hike.