Friday, June 29, 2007

Active Directory ASP.Net

So over the last week I have been working with Active Directory(AD) and ASP.Net. Before this week my only experience with AD in the past has been with windows forms applications.

I found that the using AD with either technology to be about the same, although with ASP.Net there were some additional steps needed to make it all work. The problem is these additional steps are not really obvious and took some trial and error on my part. I am now going to discuss what these additional steps are and why I had to take them.

First I am going to talk about the code itself. For both cases I used the DirectoryEntry object. The difference since our IIS server is sitting in the DMZ, I actually has to define the path to the AD server, something like this 'LDAP://ServerName/DC=corp,DC=DomainName,DC=com', and I also had to pass the proper credentials to the AD Server. So the whole think looked like this...

DirectoryEntry entry = new DirectoryEntry("LDAP://ServerName/DC=corp,DC=DomainName,DC=com", @"DomainName\UserName", "password");

If this was a windows forms application, you really don't need to pass the credentials or even a path, since it would use the default of the users machine. The funny thing is if this web application was hosted on a server inside the DMZ you wouldn't need this extra information either. I know this because in our Development environment the AD calls worked just fine, but once moved to the QC region, which happens to be in the DMZ, it failed with the following cryptic error..

System.Runtime.InteropServices.COMException

Luckily there was some posts on the web about this error with AD.

Next in the web.config I had to make the normal changes shown below....

<authentication mode="Windows" />
<authorization>
<deny users="?" />
</authorization>
<identity impersonate="true"/>


The final changes I had to make were in IIS. On the Directory Security Tab in the IIS properties form, you click the edit button for Authentication and access control. Then you need to un-check the Anonymous access check box. Check Integrated Windows Authentication. The cool thing here is if the user is using IE, the web application will automatically detect the user, and no login will be needed. This is not the safest way to protect an application, however for my application it is all that is needed.

So those are the steps I had to take to AD a web application. Hope this helps.

Monday, June 25, 2007

Are the DVD Wars Over

So a couple weeks ago Blockbuster announced they would be only offering Blu-Ray DVDs at there stores. This is a big loss for HD-DVD. So now many are claiming that the format wars are over.

I disagree.

Sony struggling sales of it PlayStation3 along with the fact that stand alone Blu-Ray players still cost around $1000.00 and are not selling well shows that consumers are not ready to jump on the Blu-Ray technology. Also, since you can buy a HD-DVD player for around $300.00 and an increasing offering of games and movies is keeping Toshiba and it's partners in the competition.

I still am not sure if either format will win the DVD war. In fact both Blu-ray and HD-DVD offers consumers something more than regular DVDs and each has some advantages over the other. If I had to predict, my guess would be once one of the technologies starts to dominate the market, something even better will be made.

Friday, June 15, 2007

MacBook Pro

So for the last couple months I have been thinking about getting a MacBook Pro. Growing up I always had apples or macs for my home computer. It wasn't until I got to college that i bought a PC. It was easier for me to do development on it at school, and to be quite honest in the work place.

Ever since Apple moved to the Intel platform, and Macs can now run anything either on OS X or with any flavor of Windows running in emulation, I really have no excuse not to use a mac, except cost.

Well the cost myth has pretty much been debunked thanks to the following post... To add to that, now three people I work with have MacBook Pros. Every time I see them do demos with their macs or just work with them in general, I do get a little jealous.

The other reason I have held back is because I am worried, that although it is a mac that I would work emulated all the time. Since 90% of the work I do is .Net development would I benefit from the Mac part of the Mac. Will the emulation really slow down the development process? Do I have to use ITunes?

Friday, June 08, 2007

Random Thoughts

So I realize I haven't posted in a while but I have been very busy. Between My Birthday and other birthdays in my family and traveling for work, I have not been left much time. That said here are some random thoughts from the last few weeks.

  1. Can it possibly rain anymore than it has. I think every other day we have had rain. I know it is my fault for buying a convertible, but lets be honest I would like to drive it once with the top down.
  2. The Brewers need to start playing better baseball. It seems that when they score a lot of runs, the pitching is bad and when they get a good start they waste it with terrible hitting. I did, make it to two game of the last series against the Cubs, and the crowd was 50%/50%. Also for the most part the Cubs fans weren't as annoying as they have been in the past.
  3. I really don't have any interesting use of technology stories. I have been keeping an eye out so I can do a little research but I have not found anything. At work we have been talking about ways to make our lunchtime sheepshead game better with technology. Maybe I will blog about our ideas.
  4. Yes it is true I turned 31 last weekend. How sad I know.
Well there it is. Hopefully after fathers day my life will start to slow down a bit and I will have some time to post more.