Random images giving 401/403 errors

S

Simon

This problem has been driving me mad for months.... Seen a few posts on
forums about it but no answers... No mention on MSDN etc.

XP Pro SP1, VS.NET (c#) .Net framework 1.1, IIS 5.1. In a nutshell when
testing my ASP.NET (localhost) apps images randomly don't load on the page.
Examining the IIS logfile shows the missing images give 401 or 403 errors.
Here's an example -

10:15:47 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/prospect.gif 401
10:15:47 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/member.gif 401
10:15:47 127.0.0.1 GET
/SDA/Tsunami.net/TsunamiWebClient/UserControls/images/announce.gif 401
10:15:47 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/homeicon.gif 401
10:15:47 127.0.0.1 GET
/SDA/Tsunami.net/TsunamiWebClient/UserControls/images/addlead.gif 401
10:15:47 127.0.0.1 GET
/SDA/Tsunami.net/TsunamiWebClient/UserControls/images/addprospect.gif 401
10:15:47 127.0.0.1 GET
/SDA/Tsunami.net/TsunamiWebClient/UserControls/images/addmember.gif 401
10:15:47 127.0.0.1 GET
/SDA/Tsunami.net/TsunamiWebClient/UserControls/images/changepwd.gif 401
10:15:47 127.0.0.1 GET
/SDA/Tsunami.net/TsunamiWebClient/UserControls/images/logoff.gif 401
10:15:47 127.0.0.1 GET /sda/tsunami.net/tsunamiwebclient/null 401
10:15:47 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/prospect.gif 200
10:15:47 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/member.gif 200
10:15:47 127.0.0.1 GET
/SDA/Tsunami.net/TsunamiWebClient/UserControls/images/announce.gif 200
10:15:47 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/homeicon.gif 200
10:15:47 127.0.0.1 GET
/SDA/Tsunami.net/TsunamiWebClient/UserControls/images/addlead.gif 200
10:15:47 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/contactlist.gif 200
10:15:47 127.0.0.1 GET
/SDA/Tsunami.net/TsunamiWebClient/UserControls/images/addprospect.gif 200
10:15:47 127.0.0.1 GET
/SDA/Tsunami.net/TsunamiWebClient/UserControls/images/addmember.gif 200
10:15:47 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/home.gif 200
10:15:47 127.0.0.1 GET
/SDA/Tsunami.net/TsunamiWebClient/UserControls/images/changepwd.gif 200
10:15:47 127.0.0.1 GET
/SDA/Tsunami.net/TsunamiWebClient/UserControls/images/logoff.gif 200
10:15:47 127.0.0.1 GET /sda/tsunami.net/tsunamiwebclient/null 403

The page rendered with two missing images, which have shown as 'null' above
(the first with the 401 error, the second gave a 403 error). If you
right-click the images and go 'show image' they magically appear. When the
page is posted again, a different number of images will randomly not load or
sometimes you will get lucky and it will all render ok. Sometimes the
page's css file won't load either and I lose the page's stylesheet. The
images directory has anonymous access with full permissions to everyone.

The problem only seems to occur with pages on my local IIS server. Please
someone save my sanity as its making my job as a web developer a nightmare
:(

thanks,

Simon
 
B

bruce barker

401 means a permission error.
403 means access denied

with a 401 the browser retrys with creditals, but not with 403.
 
S

Simon

That would explain why I have all the 401's and then 200's for the 'ok'
images... but it should be using anonymous access?

On further study I'm also getting 404 (not found?) errors and now 500 errors
as well (the 404 errors also replaces the image path suffix with null). The
'UserControls' is actually a manually mapped virtual directory to another
web app, which I use for the common elements such as images and
stylesheets.. (also allows sharing of webusercontrols between apps). Its
looking like this virtual dir could be causing the problems... Looking at
the log its logging the path up to 'UserControls' as if its denying access
to it (though it is also anonymous / full control to everyone)...

But why are these errors (randomly) occurring? The random part is the most
worrying...

It doesn't happen on production servers (2003 Server with IIS6) btw...

here's another log of a first post to the same page -

16:29:34 127.0.0.1 GET /sda/tsunami.net/tsunamiwebclient/main.aspx 200
16:29:34 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/global.css 304
16:29:34 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/mnu_vSpacer.gif 200
16:29:34 127.0.0.1 GET /webctrl_client/1_0/tabstrip.htc 200
16:29:34 127.0.0.1 GET /webctrl_client/1_0/tabstrip.htc 200
16:29:34 127.0.0.1 GET /sda/tsunami.net/tsunamiwebclient/global.css 401
16:29:34 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/prospect.gif 200
16:29:34 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/homeicon.gif 500
16:29:34 127.0.0.1 GET /sda/tsunami.net/tsunamiwebclient/global.css 500
16:29:34 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/member.gif 500
16:29:34 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/pending.gif 500
16:29:34 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/lead.gif 200
16:29:34 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/announce.gif 200
16:29:34 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/addlead.gif 403
16:29:34 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/addprospect.gif 200
16:29:34 127.0.0.1 GET /sda/tsunami.net/tsunamiwebclient/null 401
16:29:34 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/changepwd.gif 200
16:29:34 127.0.0.1 GET /sda/tsunami.net/tsunamiwebclient/null 404
16:29:34 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/addmember.gif 200
16:29:34 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/logoff.gif 200
16:29:34 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/home.gif 200
16:29:34 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/images/contactlist.gif 200
16:29:39 127.0.0.1 POST /SDA/Tsunami.net/MemberWS/SecurityWS.asmx 200
16:29:39 127.0.0.1 POST /sda/tsunami.net/tsunamiwebclient/main.aspx 200
16:29:39 127.0.0.1 GET
/sda/tsunami.net/tsunamiwebclient/UserControls/global.css 304
 
S

Simon

back from holidays :) I'm also getting the odd 500 error as well... What
could be causing this? I've tried disabling AV but it makes no difference...
 
A

Anonymous Poster

I *think* I've solved it by giving Everyone full access to Temp ASP.NET
files...!? I was getting 'access denied <insert random dependent assembly
name here>' errors after EVERY build of the app (cured by killing
aspnet_wp.exe). As a cure for this I set the full access permissions on
<windir>\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files, which
also seems to have cured the random dissapearing image problem as well...

Simon
 

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

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top