On Dec 3, 1:33 pm, StevieT <Stev....DeleteThis@discussions.microsoft.com> wrote:
> I am using VS2005 and creating a simple web application (file based). Works
> fine when running in the Dev environment.
>
> Then I open IIS and create a new web site and application (points to a copy
> of my file based web site). Now the site works pretty much but it does not
> find any of the referenced gifs, css files etc. When I type the address of a
> gif into the browser it does not error, just doesnt show anything. What
> silly thing am I overlooking?
>
> Code:
> <link id="Link1" rel="stylesheet" type="text/css"
> href="~/app_themes/AAF.css" runat="server" />
>
> No style sheet applied by this!
>
> TIA,
> Steve
Sounds like static files (like .css, .gif) are not configured to be
downloadable. This is a problem with your handler definition.
1. Make sure that "Static File" feature is installed. It should be by
default
2. Are you running the application in "Integrated Mode" or "Classic
ASP.Net Mode"
3. If Classic mode, then please provide the <handler> and
<httpHandler> sections applicable to the URL in question. If in
Integrated mode, please provide the <handler> section applicable to
the URL in question
How to do #3 is to look up the appropriate sections in either the
web.config file in the directories or the appropriate <location> tag
for the URL in the applicationHost.config file.
Recently, someone else also had problems with static files not being
shown, no errors, and it was due to improper <handler> definition that
came from some other software installation. It left a handler for
StaticFile that did not serve up downloads, thus no static files were
being handled. Search this newsgroup for that thread, also with me.
IIS7 is highly extensible and configurable, so with a single
misconfiguration any functionality can be crippled or misbehave. It
gives great power to those that want to leverage the server. It also
means it is very sensitive and easy to misconfigure and malfunction.
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
>> Stay informed about: IIS 7 Web Site Issues