Images and Style sheets not found


M

Mark Stevens

I'm just in the process of moving my development environment from XP
and IIS 6 to Win 7 and IIS 7. I am experiencing a problem with style
sheets and images.

In the master page I have a link to the style sheet:

<link rel="stylesheet" type="text/css" href="Style/Style.css" />

and in the page I have some image controls with links such as this:

<asp:ImageButton ID="img" runat="server" ImageURL="~/images/logo.gif"
PostBackURL="~/default.aspx" />

On IIS 6 these work OK an the images are displayed correctly and the
page is formatted as expected.

On IIS 7 the images display as the red cross - image cannot be found
and the page is not formatted. The source for the page which is
presented to IE has the src for the image set to "images/logo.gif"

The site is set up as a virtual directory in the default web site and
I have converted it to an application.

Anyone have any pointers as Google is not returning anything helpful
so far.

Thanks in advance,
Mark
--
|\ _,,,---,,_ A picture used to be worth a
ZZZzzz /,`.-'`' -. ;-;;, thousand words - then along
|,4- ) )-,_. ,\ ( `'-' came television!
'---''(_/--' `-'\_)

Mark Stevens (mark at thepcsite fullstop co fullstop uk)

This message is provided "as is".
 
Ad

Advertisements

M

Mark Stevens

Found a quick solution - I deleted the directory and let VS 2010
recreate it.

Regards,
Mark

I'm just in the process of moving my development environment from XP
and IIS 6 to Win 7 and IIS 7. I am experiencing a problem with style
sheets and images.

In the master page I have a link to the style sheet:

<link rel="stylesheet" type="text/css" href="Style/Style.css" />

and in the page I have some image controls with links such as this:

<asp:ImageButton ID="img" runat="server" ImageURL="~/images/logo.gif"
PostBackURL="~/default.aspx" />

On IIS 6 these work OK an the images are displayed correctly and the
page is formatted as expected.

On IIS 7 the images display as the red cross - image cannot be found
and the page is not formatted. The source for the page which is
presented to IE has the src for the image set to "images/logo.gif"

The site is set up as a virtual directory in the default web site and
I have converted it to an application.

Anyone have any pointers as Google is not returning anything helpful
so far.

Thanks in advance,
Mark
--
|\ _,,,---,,_ A picture used to be worth a
ZZZzzz /,`.-'`' -. ;-;;, thousand words - then along
|,4- ) )-,_. ,\ ( `'-' came television!
'---''(_/--' `-'\_)

Mark Stevens (mark at thepcsite fullstop co fullstop uk)

This message is provided "as is".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top