I was playing around with the Northwind database, just to catch up on ASP.NET 2.0 stuffs. I am not sure if it is just me or the web server that comes with VS 2005 is missing some features. For example, it took me hour to find out why my page design is not displayed with the correct styles.
I have <link rel=”stylesheet” type=”text/css” href=”styles/global.css” /> tag in my <head> section of the aspx file. I checked and rechecked that my tags are using the correct CSS class name... and they are. But, to no avail, every time I ran the web app for debugging, it shows up w/ the wrong (default IE styles). I had set my body tag to use Tahoma font, but yet the one that showed up in the browser is Times New Roman, etc.
At first, I suspected my Internet Explorer was misbehaving. Spent an hour or so looking through the Internet Options...(everything OK, Accessibility features are all off), going through the registry entries...nothing suspicious there also.
Finally I decided to create just a plain HTML file with inline styles... lo and behold... it worked. So I decided to try to do the same thing with the web app. page that I was testing (remove the <link> tag and move the CSS into inline <style> tag. Well, that seems to work.
Instead of suspecting IE, I now begin to suspect the built in webserver.
To test my theory further I move the web application into full blown IIS and it seems to be working well from there (from the same browser on the same test machine).
I guess it was the built in web server after all? Can it be that it does not support linked CSS? Is it just me or this is the case? Hmm.. I will have to try on a different development machine sometime...
Oh btw, if you are running IIS with both ASP.NET 1.1 and ASP.NET 2.0 on the same machine, make sure you put your 2.0 in a different Application Pool / App. Domain or it won't run at all.