OK, so work is picking up quite a bit, but I am still checking out articles everywhere. I just do not have the right amount of time to post them on the Blog.
Serving CSS from IIS 7 - This could be a common issue for the uninitiated admins.
Twitter thinking of scrapping Ruby On Rails - If the Microsoft Dev team is smart they will pursue them with everything they have.
Joe Stagner Videos on ASP.NET Security programming - Never have enough security measures I say.
IIS 7 Machine Keys
.NET 3.5 Enhancements Training Kit - Free Learning Material
IIS 7 Resource Kit - I have not read this, but found it being detailed.
ASP.NET Crash: StackOverflowException with Server.Transfer
Creating user friendly strings for enum values - I had this question posed to me after the Raleigh Rollout event.
Lazy Loading in the Entity Framework - I have a mandate to learn EF and maybe NHibernate this summer.
I am not going to even bother talking about what is in it, I am reading it like everyone else! But go get it, install it into your favorite virtual machine development environment and see for yourself.
Scott Gu Talks about Visual Studio 2008/3.5 SP1
Download It
The 'official' announcement on Somasegar's Blog
I like what I am reading and if I get a chance I will talk about it more later. :) But I did like reading this on ScottHa's Blog:
On the .NET 3.5 side of things, since this is an SP (Service Pack), yes, some stuff goes in your GAC and gets changed. However, the changes are completely additive. That means if an API's method signature has changed, that's a bug that we need to fix. It will be a fully compatible service pack release. It shouldn't break any of your existing code.
So I found this really neat new site this morning written in ASP.NET, CallerComplaints.com. The site allows you to look up complaints about a phone number and report the number The site is a vigilante site that will allow you to blow off some steam when it comes to annoying and harassing phone calls. You can read more about Caller Complaints on Mashable, which is where I found it.
The site is not only fast, but very informative too. It will tell you any side information about the number it has, such as existing complaints or information about the type of number. It also will tell you if a number was spoofed, which means the caller tricked your called id. So the next time you have an odd number on your called id, go check it out. And of course if you are abused by a telemarketer go ahead and report it!
I am honestly not sure how I created this error, but I know this I did not find much out there on how to solve the issue. I think part of the reason this occurred is I was adding existing pages from another site to reuse in a new web site. But I have not conclusive evidence to isolate this as the source of the exception.
Since I did not find anything of help to solve the issue I resorted to a tried and true trick, deleting the temporary files created by Visual Studio. This requires you first close Visual Studio, because Visual Studio will lock these temporary files while you are actually working. The temporary files are located in the %WINDOWS%\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files folder. Here you will see another folder for each of your web sites. Under that you will find a random hodge podge of child folders I will not waste our time examining, just just looks like a hacker got a hold of your open FTP server (trust me :).
After Visual Studio has been closed, simple select the folder for the site, I honestly just delete them all to be on the safe side, and delete them. I mean just hard delete them and do not even go to the recycling bin (Shoft+Delete).
Now reopen your site and build and execute it. If that was your only exception it seems to be resolved at this point. At least it was for me. I hope this helps you out, feel free to leave a comment if you have another way to solve this issue. I use this technique to solve many befuddling issues I have in everyday ASP.NET development.
I suddenly found myself getting this error the first time I tried to run a freshly minted ASP.NET 3.5 web site with the ScriptManager in place on the Master Pages. I did a quick search, but only found some references from the time before 3.5, and they did not seem to apply at all. I continued my search for an answer and came across an article by Amit where he discovered the ambiguous ScriptManager error.
Well, that was the end, as it turns out I had installed both the Ajax that comes with the .NET 3.5 and the Ajax that comes with ASP.NET 3.5 Extensions, and I had referenced them both! All I needed to do was to remove one of the references and that’s it.
Yep, sure enough I was referencing the 3.6 version of the System.Web.Extensions library. But I was not exactly sure where to verify that was the problem, so I wanted to share with you where to look.
On the Yellow Screen of Death (the page displayed when you have an unhandled exception) You will see a hyperlink to expand a section to get more detail. If you click it you will get some pretty good exception information. I wish I could now replicate the error so I could give you a screenshot. But the first line of information is really quite long and it is the one you need to pay attention to. I copied it and pasted it into Notepad with word wrapping enabled. Somewhere at the top of the information you will find your verification:
/R:"C:\Windows\assembly\GAC_MSIL\System.Web.Extensions\3.6.0.0__31bf3856ad364e35\System.Web.Extensions.dll"
This is easy enough to rectify, open the references for the web site and you will find both references to a System.Web.Extensions.dll. You can do this by selecting 'Properties' from the context menu invoked by Right-Clicking at the root of the web site in the Solution window of Visual Studio. Remove the reference to the 3.6 version of the dll and you should be fine.
Last week I had the pleasure of showing the attendees at the Raleigh Hero's Happen Here event an introduction to LINQ. I hated I only had about 15 minutes to introduce this great new feature of .NET 3.5. I was able to demonstrate a few simple aspects of using LINQ to query of data.
- LINQ to SQL
- Select Customs
- Select Customers with 'Bike' in their name
- Filter Customers by last name
- LINQ to Objects
- Select Processes on System
- Select folders on Hard Drive
- LINQ to XML
- LINQ to Flickr
I posted my demo introduction to LINQ Web Site for download. I had a great time and hope I was able to answer everyone's question.
WROX, one of the .NET community's best friends over the years, has started a new line of eBooks called WROX BLOX. I like the idea of publishing in an eBook format, because you can buy just the part of the book you really want and it give authors the ability to focus on a topic to produce something that can go deeper than a magazine article, but not as demanding as a full book.
Earlier this year I proposed two WROX BLOX to Chris Webb based on one of my popular presentations, httpModules and httpHandlers. The httpModules BLOX was made available while I was in Seattle at the MVP Summit and I have not had a chance to post about it.
- Configure a Site's Settings
- Background Thread
- Modify Content (this is a basic demo)
- Optimize the Response (this is the good one)
- Create an IP Filter
- URL Rewriting
- Custom Error Handler
I really like httpModules and I try to run through seven practical examples from my own coding to demonstrate how they can be used. I also talk about some fundamental concepts around httpModules that I think every ASP.NET developer should be familiar. I also go a quick run through on how to integrate httpModules in IIS 7, I really like that feature of the new web server. My favorite example is showing how to intercept the output just before it is sent to the client and move the ViewState to the bottom of the page. Trust me this is worth the $7 alone!
The price of the httpModule eBook is $7 and you can buy it immediately and download it and apply it to your everyday development. My proof is 40 pages long and there is a source project with my code in both VB.NET and C#.
OK, so this is a little more than a week. Sorry I have been very busy since getting back from Seattle. I think a lot of the Bloggers out there have been busy too, but still there are some great gems that I found over the last 10 days or so.
Rules for making a startup in ASP.NET
ASP.NET Security Practices - A nice long list of great security tips for ASP.NET development.
New Dynamic Data Web Site bits - I think there will be more coming from me in the near future...
Copy Source as HTML from Visual Studio 2008
SharePoint Search Video Tutorials - This is one of the primary topics my SharePoint clients ask me about, right behind migration.
SharePoint Load Tests
SEO Manager for ASP.NET - Very similar to something I do from what it looks like, I still need to dig into it.
A look into Generic Caching
Storing the ViewState in SQL Server - Grrrrrrrr, very sexy. I am not sure what sort of performance impact it might have.
Text Editors for ASP.NET, part 1 and part 2 - This is a great list. I am looking for one (for free) that will actually work on the MAC, but I am not holding my breath.
Silverlight Breakout Game
Silverlight Chart
Polyglot Fish Bowl - Look for me!!!
I was fortunate that my schedule changed slightly just before the MVP Summit. This gave me the opportunity to stay a few more days for the Alt.Net conference. I have to admit that I was not really sure what to expect and had some preconceived notions before showing up. My only exposure to the Alt.Net conference and community before this weekend was hearing about the October conference in Austin after it happened. At that conference Scott Guthrie made the now famous presentation of the MVC framework for the first time. I also knew that many of the top developers in the .Net space were there.
While I am intrigued about the MVC framework right now, I have not had a real opportunity to actually work with the MVC framework and I sort of thought this conference would be a lot of MVC sessions. I was completely wrong! I am glad I was wrong. The Alt.Net conference (which is really not a conference as much as it is a face to face meeting of some of the greatest minds in our industry) is really about how to develop software the absolutely best way.
There is no agenda, no schedule and only a few rules of how things operate. Carl Franklin started DotNetRocks as a way to get some of the great conversations the Regional Directors have outside of the conference sessions out to the masses. After spending a few years running around to Code Camps, conferences and user groups those conversations are really at the heart of getting better. Alt.Net is really a gathering of these great minds that provides some loose structure for them to come together, discuss issues and try to share experiences, opinions and come away with a much better understanding of what the reality is or might be with different ideas in practice.
I found it very revealing that much of my own experience, meaning the methodologies and architectures that I have built over the years out of necessity are really close to these 'best practices'. I did not have formal names for my processes, but now I do and I can see how to make them much better. That means I can now go back refactor my processes and become a much more efficient developer.
Development is a continuous process where you should constantly be refining your process and architecture based on your experience. You should be adding new tools to automate your code and development process. The Alt.Net community does this all the time and they are very passionate about developing great applications by using great tools and process. That is why they created the community and whether the community survives or not does not matter to the individuals, each will press to be better every day. They want to share that passion with the masses.
I love Ayn Rand and Atlas Shrugged is my favorite book. In the book there is a secret society of very smart people that create their own little utopia where they can do things the right way, without being bound by society's limits. I think Alt.net is much like that group, with the exception they want the world to know what they are doing and want to share what they are doing.
What did I take away from my Alt.net experience? Well I learned about Mocking frameworks beyond what Scott Hansleman has shared in the past. I learned that many of the Alt.netters are very passionate about how Mocking should be done too! I learned about some great .Net related tools to help develop stronger applications and processes. I learned more about unit testing and available tools. I learned more about ORM frameworks and yes a little more about MVC.
But more importantly I was able to extend some existing relationships and make some great new ones. I was able to have some really good one on one conversations about software development and just personal fun things. The biggest thing was learning others love StarBlazers! It is great to meet authors and presenters you have been admiring over the years and see they are just normal like you and I and very approachable.
I want to encourage as many .Net developers as possible to keep up with what this community is working on and passionate about. I can see the arguments and concepts these guys are hashing out will ultimately result in how we develop software in the near future. So register at www.altdotnet.org and sign up for their Yahoo Group. These are not set of arrogant programmers or folks so caught up in their celebrity they wont talk to you. They will and you should feel comfortable approaching anyone in the community about what they are good at. Also as a rule, find a way to hang out with those that are smarter or better at what you want to do than yourself. You will be amazed at how much you can walk away being better.
I have been using Vista on both of my primary machines pretty much since day 1, and there have been some funny issues. Service Pack 1 is finally out and I have been a little hesitant to do the upgrade, mostly because I have been in the middle of a few projects I did not want to change the base too much during.
Since I am here at the MVP Summit with about 5000 of the smartest folks in the Microsoft Stack (man I feel intimidated), I thought this would be the perfect time to work on the upgrade.
List of Vista SP 1 Changes
Get more free space after installing Vista SP 1
The upgrade itself was very simple. I was able to start it then go hang out with some friends. When I came back the login screen was in front of me and all seems to be normal. I am sort of waiting to see how much my system has improved, if at all. The word I got from those at the MVP Summit is the Vista SP1 actually is almost exactly like Windows 2008 Server, which I like.
So if I have any issues I will be sure to pass it along. But everyone seems to like it a lot.
Thursday afternoon my first Microsoft Global MVP Summit officially came to an end, sadly. But that did not mean the experience ended. Even now I am still in Seattle on Saturday, taking a few moments out of my time at the Alt.net conference to document a little about the experience I had at my first MVP Summit. There is not one word I can think of that will adequately describe what I was able to experience, well maybe wow.
I thought I knew what being an MVP meant before I came up here, but I was wrong, in a good way. Before I really thought the MVP program was a program Microsoft offered to reward folks that not only were good at a particular technology, but were also active in the community. This means leading local user groups, maybe public speaking about how to leverage Microsoft Technologies, helping others solve problems through forums, etc. And the program has a lot to do with that, no doubt. But after my first Summit I realize more now that Microsoft hand selects particular experts in a technology because they want truly involved feedback from those that are passionate about what they do.
To me this means that Microsoft realizes they have limitations, despite how big and smart they are. Trust me these folks are very smart and I am glad it rubs off on me at times. But they realize other than maybe the operating systems and office folks they may not really use their applications and platforms in the 'real world'. They rely on MVPs and Regional Directors to provide qualified feedback on what has been released to the market and what they are planning on releasing to the market.
Things I was exposed to are things I cannot really talk about in a public forum, or with others outside of this summit for now. But I will say this, Microsoft knows they cannot make every perfect in each release, but they do make tremendous efforts to solve problems and pains that we all have. Things I saw this week often were solutions to problematic issues many of us have on a daily basis with their products. And yes, I think their will always be that cycle with any software product.
I am so glad I received the Microsoft MVP award this year. Not because it is something to brag about, but because of what that means in the overall process of having direct input on where things are going with things in Microsoft. I think this sort of program should exist with any large company that reaches out to the masses on the scale Microsoft does. Maybe I can become a Full Throttle MVP next year too! I think all companies would be stronger for doing so. Now if we could really get the government to have an MVP program....
But if you know someone who is an MVP and you know their discipline, for me that is ASP.NET, get to know them. We are typically some of the most passionate people you will find on a technology and will generally have some very intelligent discussions about it. We can take the feedback from you and talk directly to the Microsoft product teams. Those are the folks who write the code that you buy. Who knows the issue you bring up may be a much needed feature or a bug fix in the next version of the product.
I recently got a copy of my friend Scott Forsyth's IIS 7 book from WROX. The book has 6 authors and covers just about everything you need to know about IIS 7. I have examined a few IIS 7 books and have played a little with IIS 7 so far. Professional IIS 7 provides a great wealth of information about the latest version of the Microsoft Web Server.
It provides a really good deep dive into the new IIS architecture and compares it directly with IIS 6 so you get a good grasp on how things are actually changing under the hood. It also reviews deployment techniques, new administration tools and interfaces and how to manage other services like FTP and SMTP. My favorite sections show how to write .NET applications to automate IIS 7. These are very valuable sections from my point of view because I have never felt comfortable creating scripts to hit the WMI interfaces.
I also really like how the book walks you through deployment strategies, setups on various versions of Windows 2008 and security practices. There is so much packed into this book I think it will be a very worn out reference for IIS admins all over the world for several years.
You may get this the first time you try to execute an ASP.NET site on a Windows XP installation of IIS 5.1 The error will point you to a Microsoft Knowledge Base article to solve the Failed to Access IIS Metabase error that instructs you to use a Metaacl.vbs script to apply permissions to the IIS Metabase on your workstation. This is fine for older versions of ASP.NET, but with ASP.NET 2.0 and above you need to be aware of the aspnet_regiis command line utility.
The aspnet_regiis utility is located in the %Windows%\Microsoft.NET\Framework\v2.0.50727 folder on your system. So you will need to bring up a command prompt and change to the folder or have it in your system paths.
Once you can execute the aspnet_regiis, add the -i or the -ir command switch to install or reinstall ASP.NET on your system. The first switch will install and upgrade all application pools in the existing instance of IIS, which may not be exactly what you want to do. The second option just installs ASP.NET 2.0, but may not necessarily solve the issue.
What has most likely happened to cause the error is the required permissions have been removed from the web site's folders. If you are in a corporate environment this can happen if your network monitors access permissions, services, etc and forces them back to a standard state. I have seen this be a problem with systems I was working on at various client sites over the years, not just with this issue, but many other applications and utilities we were using, so be aware of your infrastructure.
Developing applications that work across the Internet requires knowledge of protocols. To actually debug any communications or protocol errors you need to be aware of status codes. For the web you need to know and understand http Status codes and in our case how IIS responds with status codes. For e-mail you need to be aware of the SMTP and POP status codes. Remember when you send a communication across the Internet you are really doing an old fashion telnet session.
I used to amaze folks by sending an e-mail by typing commands at the command prompt. I learned to do this by trying to learn how SPAM is sent and finding holes in the SMTP protocol that needed to be plugged to eliminate much of the SPAM I see each day.
I was able to get a handle on the SMTP protocol status codes and commands to be able to do this. The reason you need to be aware of status codes is they will tell you what the server or client (whichever is on the other end) thought of the last thing you said. Can you imagine if you could get just a simple numeric response to indicate what your wife thought of the last thing you said? That would be great. Status codes do just that for us.
With e-mail they will indicate if we made a protocol error, or let us know if the server thinks we are SPAM, or maybe what we need to do next. With the web it lets us know if the request was good, or bad and why it was bad. A 404 Status code lets us know the resource we requested did not exist, and a 200 lets us know all was good with the request and this is what you asked for.
So when ever you do any sort of application that communicates in anyway across the wire, learn the full stack of status codes and your application will be better and your enjoyment will be too.