Home / ASP.NET Weblogs

Latest Microsoft Blogs

Browse by Tags

Related Posts

  • Redirecting ASP.NET Legacy URLs to Extensionless with the IIS Rewrite Module

    ASP.NET has included support for "friendly URLs" for a while now. ASP.NET MVC has always supported friendly URLs and more recently, so has Web Forms. That means if you don't want to have the .aspx extension, you certainly don't have to. However, there's a LOT of existing legacy apps out there as well as apps that you may not have full control over. For example, there's a site that I want to influence but it's got dozens (hundreds) of links to foo.html and bar.html existing pages. Legacy (n): A super-fancy way of saying "already exists." What I want to do is kind of sloppy and I'm doing it for aesthetic reasons. I'll hopefully get around to updating the site's links later and know that future...


  • Changing ASP.NET web.config inheritance when mixing versions of child applications

    My blog and all the sites in and around it are a mix of .NET 2.0, 3.5 and 4. This blog engine is currently .NET 3.5 and runs at http://hanselman.com/blog , but the application at http://hanselman.com/ (the root) is .NET 4. You can happily mix and match applications across .NET versions on a single IIS instance. You can see how mixed my system is in the screenshot at right there. However, things got messy when I changed the parent / application to .NET 4, but kept the child /blog as .NET 3.5 (the 2.0 CLR). I got lots of errors like Unrecognized attribute ‘targetFramework’. Note that attribute names are case-sensitive. The targetFramework attribute was inherited from the root .NET 4 Web.config file in the Default Web Site root using ASP.NET configuration...


  • Moving old apps from IIS6 to IIS8 and why Classic Mode exists

    I had an interesting emailed question today. Here's a paraphrased one sentence version of the question: Why does an ASP.NET Runtime issue surface in IIS 8.0 Integrated Pool for an application we have run successfully on previous versions of IIS and classic mode in IIS 8.0 ? It's less interesting that they've moved from IIS6 to IIE8 and more significant that they've moved from Classic Mode to the Integrated Mode pipeline. So, the short answer. These pipelines are different and if you write an app expecting the behavior of one pipeline and the move it, your observed behavior will likely be different when you move it to the new pipeline. IIS6 was released in Windows Server 2003 over 10 years ago. Apps used the ISAPI pipeline. By...


  • Specs for Haacked.com

    Once in a while folks ask me for details about the hardware and software that hosts my blog. Rather than write about it, a photo can provide all the details that you need. There you have it. Well actually TM , my blog runs on a bit more hardware than that these days. Especially after the Great Hard-Drive Failure of 2009. As longtime readers of my blog might remember, nearly two years ago, this blog went down in flames due to a faulty hard-drive on the hosting server. My hosting provider, CrystalTech (now rebranded to be the Web Services home of The Small Business Authority ), took regular backups of the server, but I hosted my blog in a virtual machine. As it turns out, the backups did not include the VM because it was always “in use”. In order...


  • New Tools and New Content - ASP.NET, Visual Studio 11 Web and .NET 4.5 Developer Preview (with commentary)

    While all of you Build attendees are making me feel bad because you have a fancy Tablet and I don't (sell me yours!) the folks over here in the "Angle Brackets Team" (I'm trying out some new names. One will stick.) have been busy. Here is a summary of all the items from our team that have been announced and shown at Build this week, all of this will be publicly available today (9/16) along with a some narrative and asides from yours truly. They are listening One of the things I am am personally enjoying in working daily with this build of Visual Studio is that there's dozens (hundreds) of little "mental speed bumps" that are smoothed over. A lot of thought was put into workflow and common scenarios in order to...


  • The Importance (and Ease) of Minifying your CSS and JavaScript and Optimizing PNGs for your Blog or Website

    Hello Dear Reader. You may feel free to add a comment at the bottom of this post, something like "Um, DUH!" after reading this. It's funny how one gets lazy with their own website. What's the old joke, "those who can't, teach." I show folks how to optimize their websites all the time but never got around to optimizing my own. It's important (and useful!) to send as few bytes of CSS and JS and HTML markup down the wire as possible. It's not just about size, though, it's also about the number of requests to get the bits . In fact, that's often more of a problem then file size. First, go run YSlow on your site. YSlow such a wonderful tool and it will totally ruin your day and make you feel horrible...


  • Asynchronous scalable web applications with real-time persistent long-running connections with SignalR

    I've been spending some time exploring asynchrony and scale recently. You may have seen my post about my explorations with node.js and iisnode running node on Windows . Every application has different requirements such that rules to "make it scale" don't work for every kind of application. Scaling a web app that gets some data and for loops over it is different from an app that calls out to a high-latency mainframe is different from an app that needs to maintain a persistent connection to the server. The old adage "when all you have it is a hammer everything looks like a nail" really holds true in the programming and web space. The more tools - and the knowledge to use them - the better. That's why I'm an...


  • Working with SSL at Development Time is easier with IISExpress

    One of the demos in my Mix 11 talk " An Overview of the MS Web Stack of Love " was showing how IIS Express and Visual Studio SP1 (as well as WebMatrix) can make working with SSL (Secure Sockets Layer) a heck of a lot easier. If you've used Cassini before (that's the little built in Visual Web Developer Server) you've likely noticed that I doesn't support SSL. This makes working with real world sites a little challenging. If you want your Login pages and Account Management pages to use secure sockets, you'd typically have to do all your work with the full version of IIS, either installed on your own machine or using a shared server. Here's a few ways to enable SSL. The first is new in Visual Studio 2010 SP1 and...


  • Mix 11 Videos - Download them all with RSS

    Such a fun time was had at Mix 11 this last week in Vegas. I only saw a few talks as I was busy presenting, but now as I sit at home on my first day back, I say to myself, Self, how can I get all the Mix videos at once? First, you can watch all the videos online at http://channel9.msdn.com/Events/MIX/MIX11   Second, you can get them via RSS. Most major browsers are hiding the RSS button these days, but the discovery metadata is all still there. In IE9, for example, if you show the Command Bar, you can see the RSS Feeds for the Mix site: What's all this awesomeness? Oh, yes, it's the Mix talks via RSS with enclosures, just as you've always wanted. Now you can list the thousand ways that you might retrieve these lovely files and...


  • Enabling dynamic compression (gzip, deflate) for WCF Data Feeds, OData and other custom services in IIS7

    I'm working on a thing that uses an HttpWebRequest to talk to a backend WCF Data Service and it'd be ideal if the traffic was using HTTP Compression (gzip, deflate, etc). On the client side, it's easy to just add code like this request.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate or more manually var request = HttpWebRequest.Create("http://foofoo"); request.Headers["Accept"] = "application/json"; request.Headers["Accept-Encoding"] = "gzip, deflate"; However, you need to make sure this is installed and turned on in IIS7 in you server. Launch your IIS Manager and go to the Compression module. There's check boxes, but it's not installed you...


Page 1 of 19 (189 items) 1 2 3 4 5 Next > ... Last »

Archives