Showing posts with label iis. Show all posts
Showing posts with label iis. Show all posts

Wednesday, November 12, 2008

IIS7 URL Rewrite Module Goes Live!

Just a quick note to say that the RTW version of IIS7's Rewrite Module has gone live! Go grab it from iis.net! If you aren't running IIS7 just ignore this message. If you'd like to read up on URL Rewriting you could always check it out on Wikipedia.

Monday, September 29, 2008

IIS7 On Windows Server 2008 Shinanigans

Once again I have been delving into the brave new world of IIS 7, Microsoft's enterprise strength web server software. This time round it was running on a Windows Server 2008 64 bit server. I had a few "gotchas" and seeing as I had little success with Google searches I thought I'd share them with you. If you're not a web developer I suggest you stop reading now and go watch the beached whale video on YouTube.

First up we have the battle of the bits. Upon deploying my .Net 3.5 site over to the new server I immediately starting seeing this error (click the image for full size view).



The error reads "Could not load file or assembly 'System.Data' or one of its dependencies. An attempt was made to load a program with an incorrect format". A mention of System.BadImageFormatException is down in the Exception Details too, another red herring.

System.Data, WTF? How can a grassroots part of .NET be broken? Well, after a bit of Googling I'd found a few people suggesting I should set the server to run everything as 32 bit. Sure, but what about the other websites running on this machine and why bother with a 64 bit server in the first place? Plus, I was doing my builds on my Vista 64 dev machine, surely it's all 64 bit.

After building and rebuilding with various target CPU settings to no avail I stumbled upon this setting in the Application Pool in IIS that my website was running in. Oh, look... it says "Enable 32-Bit Applications".



Set it to True and watch the magic happen. So apparently, even though I'm running Vista 64 my .NET DLLs are 32 bit... or something like that. Anyway, that was the first hurdle.

The second problem was I couldn't get access to the site either through anonymous access or via the Forms Authentication. At first I thought it was my custom MembershipProvider but that didn't explain why the authentication errors were from the SQL side of things.

More poking and prodding later (and a weekend of beer drinking) I came to the realisation that my LINQ to SQL entities were using the connection string name in the app.config, not the name of the connection string I had in my web.config. *slaps forehead*

So a quick rename of the connection string on the remote server's web.config and we're back in business... *phew*

Well, that's it... I hope the whale video was entertaining for you.

Wednesday, June 18, 2008

How To Get IIS To Serve Silverlight Content

I recently had success setting up IIS6 to serve Silverlight content. I got the info from a poster at this forum who had this to say.

It was really hard for me to find the settings needed to configure a server to "serve" Silverlight applications. So I've posted them here. Hopefully it will help someone else.


These are really for WPF, but they worked fine for me with deploying Silverlight applications. The key ones are highlighted in a bold green.


You must register several MIME types and file extensions so that the browser on the client's system can load the correct handler. You need to add the following types:

ExtensionMIME Type
.manifestapplication/manifest
.xamlapplication/xaml+xml
.dllapplication/x-msdownload
.applicationapplication/x-ms-application
.xbapapplication/x-ms-xbap
.deployapplication/octet-stream
.xpsapplication/vnd.ms-xpsdocument
.xapapplication/x-silverlight-app


Note: You do not need to register MIME types or file extensions on client systems

Another poster at on another forum had this to say also...

"I had the same problem and I've set the IIS server to "script only" insted of "scripts and executables" "

VBS to automatically set it up is here:
http://msdn.microsoft.com/en-us/library/ms752346.aspx

So there you go. That should be enough to get your IIS server serving Silverlight (say that 10 times fast!).


Thursday, June 12, 2008

Google Guy Goes Galactic


Engadget reports that Sergey Brin, one of the 2 founders of Google, has forked out a large wad of paper ($5M USD) to buy a ticket (invest) on Space Adventure's flight to the ISS in 2011 aboard the Russian Soyuz rocket. Perhaps he just wants to check out how realistic the Google Earth images are.