Can't load graphics in .NET 2.0 site

G

Guest

I had an ASP.NET 2.0 site which works fine on my PC. I have just copied it to
a server, and set it up to run in a virtual folder. The web pages work fine,
but the graphics won't load - if I try to open a gif from one of the folders,
I get the following message. Why would an ASPX file load, but a GIF file
won't?

I have tried messing with security on the files, and have even given
'Everyone' access to read and execute, but still no joy.

Surely I don't need a specific httphandler for GIFs and JPEGs?

Thanks!

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 07/04/2006 09:33:14
Event time (UTC): 07/04/2006 08:33:14
Event ID: 6c1b482203d248a287fd180cd08e563e
Event sequence: 6
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/Root/all-in-one-1-127888723889584620
Trust level: Full
Application Virtual Path: /all-in-one
Application Path: C:\Inetpub\all_in_one\
Machine name: FWSERVER01

Process information:
Process ID: 6876
Process name: w3wp.exe
Account name: THEFAITHWORKS\IWAM_FWSERVER01

Exception information:
Exception type: HttpException
Exception message: Path '/all-in-one/images/AoG_blue.master/spacer.gif'
is forbidden.

Request information:
Request URL: http://10.0.0.3/all-in-one/images/AoG_blue.master/spacer.gif
Request path: /all-in-one/images/AoG_blue.master/spacer.gif
User host address: 10.0.0.3
User:
Is authenticated: False
Authentication Type:
Thread account name: THEFAITHWORKS\IWAM_FWSERVER01

Thread information:
Thread ID: 1
Thread account name: THEFAITHWORKS\IWAM_FWSERVER01
Is impersonating: False
Stack trace: at
System.Web.HttpForbiddenHandler.ProcessRequest(HttpContext context)
at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)


Custom event details:

For more information, see Help and Support Center at
 
G

Guest

Hello,
Please send more information.
Can you load the graphics by typing address in browser?
Can you show us some of the html sent to the client browser?


Thanks
DWS
 
G

Guest

Hi DWS

If I put the link to the GIF directly, I an error saying:

This type of page is not served.
Description: The type of page you have requested is not served because it
has been explicitly forbidden. The extension '.gif' may be incorrect.
Please review the URL below and make sure that it is spelled correctly.

Requested URL: /all-in-one/images/AoG_blue.master/outreach_hdr.gif

=============

Also, here are a couple of sample bits of HTML, none of which work:

<td background="../images/AoG_blue.master/blue_headings.gif" width="754"
height="84">

<td><img src="../images/AoG_blue.master/spacer.gif" width="200"
height="30"></td>
</tr>
<tr>
<td> <img src="../images/AoG_blue.master/outreach_hdr.gif"
width="754" height="66"></td>

Thanks

Iain
 
G

Guest

Good Morning Ian,

../images .. says to go up a directory. try removing the ../

<td background="../images/AoG_blue.master/blue_headings.gif" width="754"
height="84">
<td background="images/AoG_blue.master/blue_headings.gif" width="754"
height="84">

If you're making dotnet controls in code you write
image.imageurl="~/images/Aog_blue.master...

Good Luck
DWS
 
G

Guest

Hi, DWS

This code works fine on my PC - the path to the images is "../images", as
the web page is in a folder called web which sits at the same level as the
images folder.

I have since tried this on a separate server, and have got the same result
(i.e. the same problem). Is there anything I need to do to get GIFs to
appear? Surely this should be default behaviour?

Is there anything to do with the web.config or machine.config that needs
changing?

Ta

Iain
 
G

Guest

Solved it - it's a bit of an odd one.

Basically, it didn't work because one of the folder names was
"AoG_blue.master"

The problem is that ".master" has a registered mapping to the aspnet dll,
and it was presumably trying to process it. As soon as I changed the folder
name to "AoG_blue_master", it started working.

The reason it worked on my PC but not the server is that on my PC, it was
being tested with the built in web server with VWD, rather than with IIS,
which obviously is what's running on the server.

Thanks

Iain
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top