By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,740 Members | 844 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,740 IT Pros & Developers. It's quick & easy.

cookieless=true, no images are loaded

P: n/a
When I change the 'cookieless' flag in the WebConfig file to true,
everything works fine on my local PC, but the images fail to appear when
using the remote server.

I specify my images throughout using a relative directory structure, such as
'images/topbanner.jpg'. I tried changing this to ~/images/topbanner.jpg and
.../images/topbanner.jpg, but this didn't work locally so I didn't even
bother trying it out remotely.

Tthe problem occurs even with static img tags that are hardcoded into the
HTML (as in the above examples)

Can anybody help please?

Thanks,
Bernie
Nov 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
images are not handled by asp.net by default, so .net cookie munger is not
called. try mapping images to asp.net in your vdir (some performance loss),
or use full paths to the images.

-- bruce (sqlwork.com)

"Bernie Raffe" <be*********@adslmail.newnet.co.uk> wrote in message
news:e5**************@TK2MSFTNGP14.phx.gbl...
When I change the 'cookieless' flag in the WebConfig file to true,
everything works fine on my local PC, but the images fail to appear when
using the remote server.

I specify my images throughout using a relative directory structure, such as 'images/topbanner.jpg'. I tried changing this to ~/images/topbanner.jpg and ../images/topbanner.jpg, but this didn't work locally so I didn't even
bother trying it out remotely.

Tthe problem occurs even with static img tags that are hardcoded into the
HTML (as in the above examples)

Can anybody help please?

Thanks,
Bernie

Nov 18 '05 #2

P: n/a
Hi Bruce,

Thanks for the reply. Forgive me for being thick, but I don't really
understand what your saying!
images are not handled by asp.net by default, so .net cookie munger is not called.
Then why are the images not appearing? A simple change to the WebConfig to
set cookieless back to false has the immediate effect of displaying all the
images again.
try mapping images to asp.net in your vdir (some performance loss), You lost me here completely, can you elaborate please.
or use full paths to the images. This would be a considerable amount of work as most of the images are just
HTML tags, and so they would have to be changed over to ASP:IMAGEs and I
would have to determine the full application path in my code behind for
every image)

This seems a fairly fundamental problem, I don't understan why its not
affecting others to the same degree

Thanks for any further help.

Cheers,
Bernie

"bruce barker" <no***********@safeco.com> wrote in message
news:ek*************@TK2MSFTNGP09.phx.gbl... images are not handled by asp.net by default, so .net cookie munger is not
called. try mapping images to asp.net in your vdir (some performance loss), or use full paths to the images.

-- bruce (sqlwork.com)

"Bernie Raffe" <be*********@adslmail.newnet.co.uk> wrote in message
news:e5**************@TK2MSFTNGP14.phx.gbl...
When I change the 'cookieless' flag in the WebConfig file to true,
everything works fine on my local PC, but the images fail to appear when
using the remote server.

I specify my images throughout using a relative directory structure, such
as
'images/topbanner.jpg'. I tried changing this to ~/images/topbanner.jpg

and
../images/topbanner.jpg, but this didn't work locally so I didn't even
bother trying it out remotely.

Tthe problem occurs even with static img tags that are hardcoded into

the HTML (as in the above examples)

Can anybody help please?

Thanks,
Bernie


Nov 18 '05 #3

P: n/a
cookieless session work by munging the url with the session id

http://localhost://mysite/sessionid/foo.aspx

when asp.net proccess the request, it strips out the sessionid, and rewrites
the url to

http://localhost://mysite/foo.aspx

with a relative image ref, the browser requests

http://localhost://mysite/sessionid/img.gif

asp.net does not process the request, so iis looks for the folder sessionid
and doesn't find it. in iis you can remap image extensions to be processed
by asp.net, so it will unmunge and rewrite the url. of course this adds .net
processing overhead to the image fetch (url rewrite and asp.net reads and
write the image instead of iis directly)

-- bruce (sqlwork.com)
"Bernie Raffe" <be*********@adslmail.newnet.co.uk> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Bruce,

Thanks for the reply. Forgive me for being thick, but I don't really
understand what your saying!
images are not handled by asp.net by default, so .net cookie munger is not
called.
Then why are the images not appearing? A simple change to the WebConfig to
set cookieless back to false has the immediate effect of displaying all the images again.
try mapping images to asp.net in your vdir (some performance loss),

You lost me here completely, can you elaborate please.
or use full paths to the images.

This would be a considerable amount of work as most of the images are just
HTML tags, and so they would have to be changed over to ASP:IMAGEs and I
would have to determine the full application path in my code behind for
every image)

This seems a fairly fundamental problem, I don't understan why its not
affecting others to the same degree

Thanks for any further help.

Cheers,
Bernie

"bruce barker" <no***********@safeco.com> wrote in message
news:ek*************@TK2MSFTNGP09.phx.gbl...
images are not handled by asp.net by default, so .net cookie munger is not called. try mapping images to asp.net in your vdir (some performance

loss),
or use full paths to the images.

-- bruce (sqlwork.com)

"Bernie Raffe" <be*********@adslmail.newnet.co.uk> wrote in message
news:e5**************@TK2MSFTNGP14.phx.gbl...
When I change the 'cookieless' flag in the WebConfig file to true,
everything works fine on my local PC, but the images fail to appear when using the remote server.

I specify my images throughout using a relative directory structure, such
as
'images/topbanner.jpg'. I tried changing this to

~/images/topbanner.jpg and
../images/topbanner.jpg, but this didn't work locally so I didn't even
bother trying it out remotely.

Tthe problem occurs even with static img tags that are hardcoded into

the HTML (as in the above examples)

Can anybody help please?

Thanks,
Bernie



Nov 18 '05 #4

P: n/a
Thanks for the detailed description, I get it now.

My site is hosted at an ISP so it may prove difficult getting them to change
the IIS settings to remap image extensions. I just took a look at the web
properties but havn't been able to find where this remapping gets done, do
you happen to know?

Without changing the IIS settings, is there by chance any other way of
specifying the image path, other than by specifying the full absolute path.
As I said originally, i've tried '~/images/img01.jpg' and
'../images/img-1.jpg' but they didn't work locally.

I'd love to know why other's don't appear to be having this problem, i'm
sure they are not specifying absolute paths for their images!!

Cheers,
Bernie

"bruce barker" <no***********@safeco.com> wrote in message
news:Ok**************@tk2msftngp13.phx.gbl...
cookieless session work by munging the url with the session id

http://localhost://mysite/sessionid/foo.aspx

when asp.net proccess the request, it strips out the sessionid, and rewrites the url to

http://localhost://mysite/foo.aspx

with a relative image ref, the browser requests

http://localhost://mysite/sessionid/img.gif

asp.net does not process the request, so iis looks for the folder sessionid and doesn't find it. in iis you can remap image extensions to be processed
by asp.net, so it will unmunge and rewrite the url. of course this adds ..net processing overhead to the image fetch (url rewrite and asp.net reads and
write the image instead of iis directly)

-- bruce (sqlwork.com)
"Bernie Raffe" <be*********@adslmail.newnet.co.uk> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Bruce,

Thanks for the reply. Forgive me for being thick, but I don't really
understand what your saying!
images are not handled by asp.net by default, so .net cookie munger is not
called.
Then why are the images not appearing? A simple change to the WebConfig to set cookieless back to false has the immediate effect of displaying all

the
images again.
try mapping images to asp.net in your vdir (some performance loss),

You lost me here completely, can you elaborate please.
or use full paths to the images.

This would be a considerable amount of work as most of the images are just HTML tags, and so they would have to be changed over to ASP:IMAGEs and I
would have to determine the full application path in my code behind for
every image)

This seems a fairly fundamental problem, I don't understan why its not
affecting others to the same degree

Thanks for any further help.

Cheers,
Bernie

"bruce barker" <no***********@safeco.com> wrote in message
news:ek*************@TK2MSFTNGP09.phx.gbl...
images are not handled by asp.net by default, so .net cookie munger is not called. try mapping images to asp.net in your vdir (some performance

loss),
or use full paths to the images.

-- bruce (sqlwork.com)

"Bernie Raffe" <be*********@adslmail.newnet.co.uk> wrote in message
news:e5**************@TK2MSFTNGP14.phx.gbl...
> When I change the 'cookieless' flag in the WebConfig file to true,
> everything works fine on my local PC, but the images fail to appear when > using the remote server.
>
> I specify my images throughout using a relative directory structure,

such
as
> 'images/topbanner.jpg'. I tried changing this to ~/images/topbanner.jpg and
> ../images/topbanner.jpg, but this didn't work locally so I didn't even > bother trying it out remotely.
>
> Tthe problem occurs even with static img tags that are hardcoded

into the
> HTML (as in the above examples)
>
> Can anybody help please?
>
> Thanks,
> Bernie
>
>



Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.