How to resolve this System.IO.FileNotFoundException

I hate to point out the obvious, but System.IO.FileNotFoundException means the program did not find the file you specified. So what you need to do is check what file your code is looking for in production. To see what file your program is looking for in production (look at the FileName property of the exception), try these … Read more

PHP $_SERVER[‘HTTP_HOST’] vs. $_SERVER[‘SERVER_NAME’], am I understanding the man pages correctly?

That’s probably everyone’s first thought. But it’s a little bit more difficult. See Chris Shiflett’s article SERVER_NAME Versus HTTP_HOST. It seems that there is no silver bullet. Only when you force Apache to use the canonical name you will always get the right server name with SERVER_NAME. So you either go with that or you check the host name against a white … Read more

How can I output only captured groups with sed?

The key to getting this to work is to tell sed to exclude what you don’t want to be output as well as specifying what you do want. This says: don’t default to printing each line (-n) exclude zero or more non-digits include one or more digits exclude one or more non-digits include one or more digits … Read more