Monday, May 10, 2004

The Weekend

So, an interesting thing happened this weekend. I didn't work. I mean, I did but not really. Monitor a server doesn't really feel like work work. I got to spend time with my Beautiful Wife and the Little. My Dad and I helped a friend move. (You can always tell if someone is really your friend if they help you move) Sunday morning I was exhausted from helping our friend move. (Dad and I didn't get home till after 2:45am saturday night/sunday morning). So I couldn't do much sunday morning but sit around the house and rest up a bit.

I got to feelin' a little better in the afternoon so my Beautiful Wife, the Little Boy and I headed down to the happiest place on earth. It wasn't too crowded. The crowds weren't as light as when we went last weekend with Mom and Dad but it was good. Anyhow we did all of the little boys favorites, pirates, pooh, autopia, his new favorite star tours and honey I shrank the audience. That last one was a little too intense for him. I don't think we'll do that one for a while.

My favorite quote from the day is from the Little Boy (most of my favorite quotes here lately are from him). So let me set the scene, we are on Autopia. He steers the car, I work the gas pedal. It works good for us since he reach the pedal yet. Anyhow, the Little Boy works very hard at, driving it well, keeping it between the lines. He hates when the car bumps the inner rail because it jerks the steering wheel out of his hands. That being said, he didn't quite get the car straightened out in time, and the rail got him, and moved the steering wheel, with the attitude of someone that's been driving LA traffic, everyday for the last 10 years, he balls up his little fist, and yell "Stupid Car" and hits section of the steering wheel where the horn would be. Now this has to be all him. I don't drive during the week. (I metrolink it to work) So my driving has calmed down tremendously. My Beautiful Wife doesn't drive like that either. She is a very calm driver and doesn't get rattled by traffic. So it has to be his little personality. It's amazing to see it coming out.

Friday, May 07, 2004

Searching Indexing Services with ASP.NET and C#

So I have a project that requires we have a mini site search. And being that I have written the whole site in ASP.NET/C#/XML/XSL I didn't want to have to go back to classic ASP for search. I did some searching online and found a really good post on using ASP.NET with Indexing Services. The article/post "Query the Indexing Service with Ixsso and ASP.NET" covered the issue really well. However it was written in VB. So of course I needed a C# version of it, so I just translated the VB stuff to C# and voila!.

private void searchIndexing(string strValue)

{

try

{

CissoQueryClass Q = new CissoQueryClass();

CissoUtilClass util = new CissoUtilClass();

OleDbDataAdapter da = new OleDbDataAdapter();

DataSet ds = new DataSet("IndexServerResults");

Q.Query = strValue;

Q.SortBy = "rank[d]";

Q.Columns = "vpath, filename, rank, characterization";

Q.Catalog = "query://contentserver/catalogname";

Q.MaxRecords = 1000;

util.AddScopeToQuery(Q,"\\","deep");

Q.LocaleID = util.ISOToLocaleID("EN-US");

da.Fill(ds, Q.CreateRecordset("nonsequential"), "IndexServerResults");

DataGrid1.DataSource = ds;

DataGrid1.DataBind();

 

}

catch(Exception f)

{

lblError.Text = f.Message.ToString();

}

}

Just make sure you add a reference to the IXSSO COM Object in your project and away it goes!

 

Thursday, May 06, 2004

Things I've learned about ASPNET (the local user account for ASP.NET)

Well, I have been trying to trackdown an incredibly irritating issue with my ASP.NET v1.1 code not running on one of our w2k (windows 2000) servers. I think the root cause of it all has to deal with the fact that this box runs OWA (Outlook Web Access) and OWA doesn't play well will other. So here is the run down. In the machine.config , node processmodel where use name says "machine" it is using the ASPNET local user. For the most part this user has access to everything it needs because it is in the Group user. (I know a user in the user group... a little redundant). However there are some instances, depending on patches and services packs where this user doesn't get the correct NT users permissions. This table from Microsoft really helped.

Table 1. Required NTFS permissions

FolderRequired PermissionAccountComments
C:\WINNT\Microsoft.NET\
Framework\<version>\
Temporary ASP.NET Files
Full ControlProcess and fixed impersonation accountsThis is the ASP.NET dynamic compilation location. Application code is generated in a discrete directory for each application beneath this folder.
The tempdir attribute on the <compilation> element can be used to change this default location.
C:\WINNT\tempRead/Write/DeleteProcessLocation used by Web services to generate serialization proxies.
Note that the Delete permission is set using the Advanced button on the Security page of the Windows Explorer folder properties dialog box.
Application folderReadProcessThe location of your Web application files (that is, your application's virtual root directory: for example, c:\inetpub\wwwroot\webapp1).
By default, the Users group has the appropriate access rights.
%installroot% hierarchy
(C:\WINNT\Microsoft.Net\Framework\v1.0.3705)
ReadProcess and fixed impersonation accountsASP.NET must be able to access .NET Framework assemblies.
By default, the Users group has the appropriate access rights.
C:\WINNT\assemblyReadProcess and fixed impersonation accountsThis is the global assembly cache. You cannot directly use Windows Explorer to edit ACLs for this folder. Instead, use a command Windows and run the following command:
cacls %windir%\assembly /e /t /p domain\useraccount:R
Alternatively, prior to using Windows explorer, unregister shfusion.dll with the following command:
regsvr32–u shfusion.dll
After setting permissions with Windows explorer, re-register shfusion.dll with the following command:
regsvr32 shfusion.dll
Web site root:
C:\inetpub\
wwwroot or the path that the
default Web site points to
ReadProcessASP.NET reads configuration files and monitors for file changes in this folder.
C:\WINNT\system32ReadProcessFor system DLLs loaded by the Framework.
Parent directories of contextList Folder/ ReadProcessFor file change notifications and the C# compiler.

Wednesday, May 05, 2004

It's 3AM

Well, It's 3 AM. I don't know why I am not sleeping away, dreaming of being on a beach with my beautiful Wife drinking some tropical drink with a little umbrella in it. Instead I am ftping a xml parser to the server and installing that. My beautiful Wife and I even talked about this. I want to be a good sleeper. It is on my goals list. Top five even, but I'm awake and working away. And working on server configurations at that. Now that is boring stuff. People have decided to have elective surgery over having to work on server configurations. But here I am plugging way at it.

Tuesday, May 04, 2004

A Weekend with VAM

So this weekend I worked a lot. Come to find out that one of my applications that was ASP.NET Validators had NO client-side validation for netscape, mozilla and opera. Of course there was no mention of this deficience in the .NET framework documentation. This explains the ghost problems that I have been chasing for close to a year with this application. That being the case I need to fix it and fix it quick. That is where VAM comes in. VAM is a fantastic validation framework that Peter Blum has put together. It is completely cross-browser and cross-platform compatible validation. Simply put is it brilliant. Peter has done a great job of documenting the product. So this weekend armed with the documentation and the new validation framework, I went to work at rewriting the application the take advantage of VAM and get back a little self respect. (It's really hard to realize that something you wrote, didn't work as you planned for a year. It's kind of humiliating).

Between learning the new framework and writing some code the make the application better than it was. (I know a year more of .NET then I did when I wrote it) I spend about 15 hours this weekend on it, but I am much happier with the product. Interesting enough, some of the code from a year ago seemed a little sloppy, and the validators thought so too. Like I would have two buttons, one for each mode the page would have and then I would hide or show the button depending on the mode. Well, that is a little redundant. So I rewrote the pages with one button that would change dependingo on the mode. It all goes back to KISS (Keep It Simple Stupid). Why would I need two buttons when one will do the job. I did a lot of clean up like that , that I feel will make the application run quicker. The less controls that have to be rendered the faster the ASP.NET will run.

Well, this weekend wasn't all work. My Beautiful Wife vowed to get me way from my squareheaded girlfriend (my laptop). So sunday afternoon/evening, we picked up Mom and Dad and headed down to the happiest place on earth. We decided to go in the other disneyland park. It was a blast. Sunday was very warm, so everyone had apparently decided to skip going to the park that mouse built. I don't thiink I had ever seen the park so empty. We walked on to "Soarin' over California", checkout the Grand Californian, got drenched on "Grizzly Rapids", had some wine and dine at the Golden Vine. It was all so nice, and it cool down perfectly. (Especially after the soaking we got on Grizzly Rapids) Then Dad and I got to check out the new Tower of Terror Ride! I have to say that it is first rate. We both thought that it was a lot of fun. A good sunday afternoon.

Friday, April 30, 2004

A Week has gone by

Well, I know I haven't been very good that last couple of weeks about blogging everyday. I have two projects due, pretty much today, and my asthma has been acting up. So by the time I get home, if I have any energy, I am working. If not, then I am sleeping.

Asthma and the Attacks, not just a band anymore
Last night was little tough, I had a pretty good asthma attack. It was one of those that just shuts you down.

It was interesting, I was trying to think how to describe it. I mean, you take all of your medicine, but that doesn't make it go away. It just makes it think about going away. So you end up laying there, and sleeping, but it's not like regular sleep. Because your body has been lacking in oxygen, it just kind of goes to sleep, but your mind isn't sleeping. You can hear everything and feel time go by and you kind of can't do anything about it. I heard my beautiful Wife come in to the room to check on me, but, I couldn't really acknowledge that I knew she was in the room. Also because you are trying to move but can't really, you feel really heavy. Where regular sleep you don't feel like you are made of stone.

So after about three to four hours of this kind of sleep your body will start responding to your mind. But everything is slow and an effort. It's one of those things that I don't talk about much. It's not the focus of my life, it is just one of those things I deal with. But today I thought, hey maybe I will write about it so that you would know what it was like. Well enough about that.

NDoc and Documenting Code
So I have got the one project pretty much wrapped up. I have written a lot of code that is reusable, and helpful. It authenticates with Active Directory, uses AD groups to see whether the user has access to the application and what perrmissons they have, if they do have access. It uses XML to help archive the documents, giving the user a current and archived view on the fly. A WYSIWYG (what you see is what you get) editor written to work in the Internet Explorer browser, and is written in JavaScript and XSL so that I can use it to edit content that is stored in XML if I am so inclined (I was).

So will all of this code I need documentation to let others in the company use it and see what I Was thinking right? So am I going to sit down and type it all out in Word? No! I comment my code in C# using XML comments, and then when I build the project it gives me a xml file with every function documented! Now we have to make it human readable (I think that XML is human readable, but I am among the minority) . So I downloaded NDoc. This is a great program that takes that xml file and the dll that is created for your project and generates MSDN like documentation. Now .NET developers live and die by this stuff, so this is as good as gold. I can hand the project off to any other .NET developer and they can pretty much pick it up from there! Good stuff.

Tuesday, April 27, 2004

Riding and XML

Well, the camping/riding trip was great. It was really relaxing and I got to ride a lot. The ole' XR 500 did just great. The 30 dollar ebay shock worked great and over all it was a lot of fun to ride. I really enjoyed the long group ride. It's really cool seeing 10 bikes scooting across the dry lake bed. There are some pictures on the photoblog. Saturday we had a nice surprise, my Beautiful Wife called and said, "Hey, I'm at Kramer Junction, come get me". I was so thrilled she came. Everyone was!

So sunday morning, we hopped on a quad and went for a little ride. It was something that I have always wanted to share with her. I don't know what it is about dirt riding, I just really enjoy the feeling and the visuals of it all.

Well, the train is getting close to work, I will talk about the XML portion of this post a little later.

Thursday, April 22, 2004

Gone Ride Be Back Later

Well, tomorrow I am heading out with my Folks to go Camping and Dirt Riding. It should be a lot of funny and I am really looking forward to it.

Now I know that this week has been a little light on the post. What can I say, work has kept me pretty busy. I have written some very cool things though. We now have a web application that is using active directory. Not just for authentication, but also assigning roles by what groups the user is in. I wrote a fairly good xml based ASP.NET forms engine. It uses XSL and transforms a xml config file in to Web forms, that includes validation. I am going to be working on adding functionality to that and making it as good as I can. In fact once I get a couple more things polished we are going to start using it at work.

Now I know I still owe, the htmlGenerator, that takes xml and your xsl files and write you an html file. I will get it up here, I promise. I just need to takes some time to write a little documentation on it, before I set it free. But I have to tell you, I've been using the heck out if it. Infact on the ASP.NET form engine.

So next week, some more indept post on the path to Authenication with Active Directory (i.e. how to get the microsoft example code to actually work), ASP.NET webform from an XML template. (I love code that generates code...It makes me happy) and even a little talk about the Riding Trip.

 

Tuesday, April 20, 2004

Active Directory and Web Form Validation in ASP.NET (How I am learning to love Active Directory)

So it's been a little while since my last post. I have been working on a project that of course is due by the end of the month or even sooner if I can. The best part about this project is we are using active directory for our authentication engine. (If it's good enough for the network login it's good enough for me.) The data that this project is dealing with is very hush hush, only upper echelon people get to read kind of stuff (This would not be me!). So it has to be very secure and very reliable, and I have had a month to get it done. (humm, not sure how that worked out)

The tough part about this project has been the Security. It has to be tight, and with good reason. So we decide to use AD (Active Directory). Now how about find good information on authentication with AD? Not so easy really. There is not a great deal of stuff out there, and I have had to reread a lot of it to get the idea. But it is now starting to click. There is two parts to it. The LDAP authenication, and the FormsAuthentication. The first is to authenticate the user against AD, and the second is to make sure they don't have to login on every page. I don't have all of this mastered as of yet, but I am hoping to by wednesday.

Here are some of the links I have collected in this authentication journey.
Use Form Authentication with Active Directory
Forms Authentication with Active Directory
Active Directory Authentication with ASP.NET
ASP.NET Forms Authentication

Sunday, April 18, 2004

Movie Quote

Movie Quote for the Day
Movie : "Mystery Men"
Character: "The Shoveller"
Quote: "We have a blind date with destiny and it looks like she ordered the lobster."

Saturday, April 17, 2004

RSS Feed Junkie...have iPod will Travel

So I admit, I am an RSS feed junkie. I rather have my RSS aggregator open and the feeds stream into it, then to open a browser and look at the site that the content is coming from. At work I leave it open all day, and check it whenever it is updated. Now I know that everyone has worked really hard to make their blog nice to look at, I know that I have, but I just like having the content coming to me, instead of me going to it.

Now, I have my iPod, and it is great for my music, but what about RSS feeds. I know what you are thinking, those two things have nothing to do with each other. And at one time that is true. However, someone has written an app that lets you sync RSS feeds on your iPod. It is called iPod Agent. It is written in .NET (of course) and does a lot of stuff to make your iPod not only your music play, but a real world PDA. You can sync Mail, Contacts, Calendar, Tasks, Notes, Weather and RSS News Feeds.

So now,  I can listen to Dave Brubeck "Take Five" and catch up on reading my Email, and favorite blogs! Engagdet has a great post on it.

Thursday, April 15, 2004

Quote of the Week

The Wayward WebLog (Matt Warren) has summed up how it has been at work for me lately.

Some days you get stuck and you end up doing more thinking than anything else. On those days it?s easy to take a break and punch out a few paragraphs of pondering for the internet elite. But all this week I?ve been reluctant to do anything but spit out for-loops and conditionals.>I think my F10 finger is getting sore from too much debugging.I tried to go web-surfing and it started to hurt whenever I clicked. Maybe it?s some typing related malady, or maybe it just hungers for more code.

For me, it is the F5 key, but basically the same idea!

The Code Project

The Code Project is one of the best sites I've found for coders to get great examples and tutorials from other coder.

Tuesday, April 13, 2004

XAML

XAML stands for "eXtenisible Application Markup Language". basically it is a new technology that allows you to created user interface of your Windows applications using markup syntax to create and describe, text, links, images and controls. This will be available on the next Windows operation system. (code named "Longhorn"). Here is an interesting article showing an application created in XAML running on "Longhorn". Click here

Sunday, April 11, 2004

Started a Photoblog

So yesterday I started a photoblog. I plan on updating it once a week or so. So far, I have gotten some nice comments about my train picture. Check it out

Saturday, April 10, 2004

The next Wave of blogging

So I have been reading about mobbloging. It's been around for about a year, but with cameraphones getting cheaper, it is becoming more and more popular. What is a moblogging? Simply put it is the practice of submitting text messages and images directly to online diaries. This article from the Guardian Unlimited explians the whole thing better than I can.

It's an interesting movement. I have thought for awhile that some of the beauty of the photos that I've seen from cameraphones is the candidness of them. That the picture was very much of the moment, and had very little to do stoping everyone and getting the camera out and taking the picture. While I love those pictures, they aren't as truly a representation of day to day life. I really love the fact that moblogging lets you share those real life/real moment images with your friends and family and even the world.

Some links to check out:
textamerica
http://www.buzznet.com
http://cellphones.engadget.com/

DNS Changes

So yesterday, I made some (scary) changes to the DNS for our Domain at work. I changed the DNS Servers used for the domain, and transfer all of the records to the new DNS Servers. If I  goofed up, little things email for the entire company would of been down, and no one would of been able to get to our website.

I am happy to say that none of those bad things happened. The transfer and propagation happened in about 14 hours. (which is incredibly fast) Which means when I show up on monday, I get to keep my job :-).

Friday, April 09, 2004

Meetings are options, days off required

So I am not sure how it worked. We were suppose to have a meeting today about a project that is on a tight timeline. So feeling miserable, I get myself out of bed to come in to work, for this meeting. I was suppose to present what I have coded up. To show the protype site (1/3 of it with functionality built and usable) and get feedback. Little design and usability tweeks. Anyhow not one of the other people sheduled to be in the meeting were in the building today. Now, most people have a good idea earlier in the week that they are going to take friday off don't they? My boss was the only one that told me. And truth be told, he deserves some time off, he is a hard worker, and does his best to make my job easier. Sometimes he is the only reason my job is even doable. But how come the others couldn't reschedule.

In the end it was probably good I came in, there were issues that I needed to take care of. But still it would of been nicer to be sick at home instead of sick at work.

Thursday, April 08, 2004

feeliing Ill

Just not feeling well today. Got sick at work. Can't seem to keep anything down. But tomorrow is friday, maybe it will be better tomorrow.

Tuesday, April 06, 2004

Wrote something cool, saw something cool

Wrote something cool
So as a programmer, it is in my best interesting to be lazy. Not afraid of hard work lazy, and not slacker lazy. I mean lazy in a way that I never want to write the same code twice. Moreover, I don't want to write code, that I can generate with other code. Funny enough about this kind laziness, you can spend longer on writing a solution, then just doing the task at hand. Fortunately I broke even today. So what I wrote today, is a little utlity, that you feed a xml document, and the xsl stylesheet that your wrote for the xml, and it creates a html file from your xsl. So including the xsl I wrote 270 lines of code (145 for the xsl, 125 for the utlity), to create an html document, that only has 185 lines of code. Why would I do that?

Several reasons come to mind. First, accuracy, the xsl is going to more accurate, in writing the links, that I am going to be. In 185 lines of code, there are 150 links. Anyone would started to get a little bored and start to let their mind drift off, and the links won't of been as accurate because they are thinking about lunch or that movie they just saw. Second, flexibility, what if tomorrow, my boss says hey, 'Russ that looks great, but lets try this format instead'. Correctly changing the html page around could take a lot of time. However, changing the format of the xsl, is much quicker, and I can regenerate the html in half a second after the xsl is finished. Finally, that laziness factor we were talking about earlier. I don't want to write the code, when I can have something else do it for me.
An example of this would be the electric handsaw (skilsaw). Now you know it took longer to make the first skilsaw, then it did to cut 10 boards. But did it take longer to create the skilsaw then it would of taken to cut 5000 boards? Probably not.

In a couple days once I get my little utility all polished I will post it. I still need to write in some error checking and clean up the UI. (Ed we can do a command line version if you want :-> )

Something cool I saw
Checking the logs today I saw that I got a someone who came to my site from a yahoo.com search. I was pretty please to see with the keywords "Real Life Adventure" I was ranked 6th on the search results. So, I am thinking, right on, movin my way up the search engine ladder. Out of curiosity I typed in the title of my blog "Adventures in Real Life" and I came up ranked 2nd in the search engines. Now how cool is that.