Andrew's Blog

Random Thoughts of an ASP.Net Code Monkey

Handling Webpage Display Issues in Internet Explorer 8.0 using IIS

September 9, 2008 14:32 by Andrew Westgarth

I have been using Internet Explorer 8.0 since the release of Beta 1.  IE 8 requires more standards compliance in the code of web pages for them to display correctly.  Today I was catching up on my RSS Feeds and came across this very useful article - Configuring IIS to work around webpage display issues in Internet Explorer 8.0 and this article discusses the use of adding a HTTP Response Header which then informs IE to run in IE Compatibility mode, therefore rendering the page as it would render in Internet Explorer 7.

The article gives complete details of how to set this up on IIS6 and 7 (integrated and classic mode) and it is very straight forward.  I have implemented it on our live webserver but not on our development server - so we can fix the issues rather than relying on compatibility mode.  Also the default is to set this for your entire server, i.e. any sites, applications and pages served.  However by adding this remove tag into the root web.config of a site you can remove the use of the HTTP Response Header from that particular site and the site will run in true mode (remember to place the httpProtocol element within the system.webServer element in your configuration):

<system.webServer>
  <
httpProtocol>
    <
customHeaders>
      <
remove name="X-UA-Compatible"/>
    </
customHeaders>
  </
httpProtocol>
</
system.webServer>

I must stress I definitely see this as a temporary workaround and only as a backup plan to buy you a little time to sort out the rendering issues!  I would always advocate coding your XHTML and CSS to correct standards!!  Standards Compliance has many added benefits including search engine optimisation and accessibility benefits for users of your sites!!

Categories: ASP.Net | IIS
Actions: E-mail | Permalink | Comments (2) | Comment RSSRSS comment feed

Tutorial for Using ASP.Net MVC Framework on Different Versions of IIS

September 5, 2008 14:49 by Andrew Westgarth

Last night Alan Dean came up to VBUG in Newcastle to speak on ASP.Net MVC Framework.  One of the discussion points we had was any potential issues for hosting sites on IIS due to the routing and url rewrite elements of the MVC Framework.  I wasn't clear on the implications, and I hadn't seen much traffic personally on the issue.  So with a task of downloading ASP.Net MVC Framework Preview 5 so I could have a good look at it and understand it all as an alternative to Webforms, and looking into the implications and workarounds for hosting within versions of IIS I went of in search of information.

I immediately thought that with IIS7 and applications running in Integrated Mode, which is the mode I aim to run all of my applications on IIS7 in, there should be no configuration changes or modifications required since ASP.Net is part of the pipeline so all requests are processed by ASP.Net by default.  In classic mode ASP.Net requests are processed through the aspnet_isapi.dll as they would be in IIS6 so unless files are mapped to the ASP.Net Isapi filter then they wouldn't be processed.  In reading up about ASP.Net MVC on the ASP.Net website I found a great tutorial on Using ASP.NET MVC with Different Versions of IIS - hopefully this will be of help to you looking to configure and use the ASP.Net MVC Framework on IIS.

Categories: ASP.Net | How To | IIS
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Creating Http Redirects in IIS7 on Virtual Directories like IIS6

July 31, 2008 10:04 by Andrew Westgarth

In IIS6 when creating a virtual directory it was possible to set the virtual directory to actually add as a redirect to another page or site.  In IIS7 this is still possible however it needs to be achieved slightly differently.  Lets take an example.  Say you have a website and you are running a number of offers and would like to offer users the option of navigating to them through a short path such as domain/offer1, domain/offer2 etc then you would have in IIS6 set these Virtual Directories up with dummy Physical Paths, e.g. the root of the parent site, and set the option to redirect to a URL.

In IIS7 because the configuration is stored in a web.config file in the physical path of the virtual directory, this can cause the redirections to be overwritten, i.e. if you set up the redirection of domain/offer1 to go to domain/offers/offer1 and then go and set up domain/offer2 to go to domain/offers/offer2 you will find that both redirections go to domain/offers/offer2 because the value in the web.config file has been overwritten by the second redirect rule.  In order to achieve the desired effect and get the redirections to work, you need to actually add the redirections to the applicationhost.config file and set a location tag for the site you are working in.  This is currently not possible in the User Interface but is possible to achieve using the APPCMD utility.  Here are the steps to achieve this.

1. Open an elevated command prompt

2. then run the following command -

%windir%\system32\inetsrv\appcmd set config "nameofsite/virtualdirectoryname" -section:system.webServer/httpRedirect -enabled:true -destination:destinationofredirect -commitpath:apphost

an example of this command would be:

c:\windows\system32\inetsrv\appcmd set config "Default Web Site/offer1" -section:system.webServer/httpRedirect -enabled:true -destination:Offers/Offer1/default.aspx" -commitpath:apphost

 

The key element here in this command is the commitpath directive which adds sets the configuration in the applicationhost.config:

<location path="Default Web Site/Offer1">
  <system.webServer>
    <httpRedirect enabled="true" destination="Offers/Offer1/default.aspx" />"
  </system.webServer>
</location>

 

Hope this clears it up :).

Categories: How To | IIS
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Awarded Microsoft MVP Award for IIS!

July 1, 2008 15:07 by Andrew Westgarth

This afternoon I received an email from Microsoft telling me that I've been awarded the 2008 Microsoft MVP award for my efforts in the Internet Information Services Community over the past year.  This is a great honour to be classified in the same group as the many other great MVPs who do great work throughout the community.  I hope I can continue in the same way in the coming months and years.

Categories: IIS | Microsoft | MVP
Actions: E-mail | Permalink | Comments (9) | Comment RSSRSS comment feed

IIS 7 for ASP.Net Developers - Black Marble Community Event on Wednesday 2nd July 2008

June 10, 2008 14:48 by Andrew Westgarth

black_marble_logo_motif On the evening of Wednesday 2nd July 2008, I'll be presenting a session on IIS 7.0 for ASP.Net Developers at Black Marble's Community Evening in Bradford.  This event is part of a full day of sessions which Black Marble are hosting.  In the morning they're hosting a session on Overview of the current and future states of Microsoft’s Real World SOA and Business Process Automation platform and in the afternoon they are hosting a TechNet in the North session - Microsoft's Vision for Unified Communications - delivered by James O'Neill and then I will be completing the day with the community element.

The abstract for my session is as follows:

IIS7 for ASP.NET Developers

One of the biggest and best new features of Windows Server 2008 and Windows Vista is Internet Information Server 7.0.  IIS 7.0 is the latest and most significant release of Microsoft's Web Server. With this release comes a new extensibility model which gives developers more options than ever before, more diagnostic tools with which developers can debug and locate issues. During the session Andrew will investigate the new architecture, look at extending, configuring and developing for IIS7, take a look at its management user interface, and introduce the debugging and diagnostic facilities within IIS7.

For more information and to register for this event go to - http://www.blackmarble.co.uk/events.aspx?event=Andy%20Westgarth%20on%20IIS7

New Site for IIS 7 AppCmd samples

May 29, 2008 15:45 by Andrew Westgarth

Steve Schofield, IIS MVP, recently set up a new site - http://www.appcmd.com - which is a great resource for commonly used appcmd scripts.  Appcmd is the new command line administration utility for IIS7.  I've used the Tech Preview of the PowerShell provider for IIS and I use the IIS7 Manager a lot but I still like to work with APPCMD an awful lot and this new site is definitely going to be top of my list for daily checks to see any new content.  Go take a look and let Steve know what you think.  Also if you have any favourite APPCMD Scripts also let Steve know and they may get posted.  Thanks for starting this site Steve, it's a great resource.

Categories: IIS
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

IIS 7 and FrontPage Server Extensions

May 9, 2008 02:48 by Andrew Westgarth

I've been taking a look at the web stats from my blog over the past few days and have noticed a lot of hits on a previous post - FrontPage Server Extensions for IIS7 and thought I would follow that up with a link to a great series of blog posts which Robert McMurray has been writing recently about Life after FrontPage Server Extensions  Hope this post helps anyone searching for info on IIS 7 and FPSE and the ways forward.

Categories: IIS
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Internet Information Services Resources Page

May 8, 2008 15:50 by Andrew Westgarth

After announcing I would do this shortly after my session at IMTC, unfortunately I have only just managed to get round to actually completing the page and putting it live.  I have written a page and added it to my blog listing all of the blogs and IIS Resources I use to research and keep up with developments on IIS - IIS 7 Resources.  I hope you find this useful and I'll keep adding to it as I find new and interesting ways and resources in my quest to stay up to date.  One thing I must stress is that the first point of call should always be the excellent IIS community site - www.iis.net.

www.iis.net - The IIS Community Site

Categories: IIS
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

IIS 7 PowerShell Provider featured on PowerShell Podcast

May 8, 2008 15:49 by Andrew Westgarth

Recently I blogged about the new IIS7 PowerShell Provider, and this was picked up by the people behind the PowerScripting Podcast - who commented on the post to say they would be included in the next PowerScripting podcast.  Well that podcast has now been released - Episode 23 - IIS7 Special and includes a great interview with Thomas Deml, Senior Program Manager on the IIS Team, who goes into more detail on the roadmap and features for the IIS 7 PowerShell Provider.  Check it out now it's a great listen and if you're interested in PowerShell as a whole, why not subscribe to the podcast?

Categories: IIS
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

PowerShell Provider for IIS7

April 16, 2008 05:28 by Andrew Westgarth

Last night when I was reviewing my blog feeds, I noticed an interesting post by Thomas Deml - http://blogs.iis.net/thomad/archive/2008/04/14/iis-7-0-powershell-provider-tech-preview-1.aspx on the use of PowerShell with IIS7.  I have been intriqued by PowerShell for a while and have seen a couple of great sessions at recent Developer Day events.  The IIS Team are currently working on a PowerShell Provider with which you can administer IIS and you can get hold of the first Tech Preview now - .  I particularly like command line utilities as it reminds me of sitting in DOS and other command Shells.  I love the appcmd command-line utility which can be used to administer IIS7.  I like the new UI for managing IIS7 too but sometimes I just like to get a little geeky and sit and work in a command shell window :).

This morning I was sat in the garage, waiting for my Car to have it's MOT test, and I had downloaded the PowerShell snap-in walkthroughs (http://learn.iis.net/page.aspx/447/managing-iis-with-the-iis-70-powershell-provider/) last night and sat and worked through them in the garage waiting area.  There are nine walkthroughs so far and they guide through Administering Sites/Apps/VDirs/AppPools etc.  If you are comfortable using PowerShell, I haven't done a lot of work with it but picked the syntax up quickly, then this is definitely worth a look.  I haven't decided yet which I prefer but the fact that we are now getting so much development, new features and so many new tools for IIS7 can only be great news.

Categories: IIS
Actions: E-mail | Permalink | Comments (4) | Comment RSSRSS comment feed


MCTS

Post calendar

<<  April 2024  >>
MoTuWeThFrSaSu
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2024