The basic purpose of the site is for authenticated users to post event
listings, which often include photographs. The user is faced with a page
where they can insert all of the information about the event in a typical
form with textboxes, drop down lists, etc. On this page there are also 4
file upload controls where the user can select 0 to 4 images on their file
system for inclusion in the event listing. On submit, the images (if any)
are uploaded to the server and named based on the user id and picture number,
eg. 123456_01.jpg, 123456_02.jpg, etc. The user is shown a preview of the
event with the images. On submit the event is inserted in the database with
a return value of the pk or EventID number. This number is used to rename
the images, eg. 123456_01.jpg becomes 9876_01.jpg, 123456_02.jpg becomes
9876_02.jpg.
This generally works very well. The image upload directory is directly
under the root of the website and has full control for ASP.Net, Network
Service, Everyone. this is IIS6 on Server 2003. However, a very small
portion of our users report that when they go to upload more than one event,
when the preview shows up for the second event, the photos from the first
event show up. We also get reports that if they "shut down the computer and
reopen it" between each listing it works ok. This is not acceptable since we
get paid by the listing. I have requested of some users that they clear
their browser cache, delete all temporary files and cookies, and try again
but these users report that it still occurs.
Is this a file upload permissions problem, or is it somehow that images are
being cached somewhere since the name of the images on the preview page is
the same (username + image number + .jpg)?
If this is a caching problem is there some way to make sure that images are
not cached anywhere? What tags, if any can be used on the pages, or settings
in iis? 3 3004
Would like help on this issue as the 48 hr response time has elapsed, so let
me further elaborate.
Because the image is always temporarily saved as the userId + extension then
for every event the image will have the same name as the previous event and
the one before that etc., but only when the event is saved is and eventId
generated, and so the image is then renamed to eventId + extension. User
then goes to add another event, uploads his description and pic, and then
there is the previous picture and not the one he just uploaded, preventing
the user from uploading any more events, and thus preventing us from earning
any money, causing my boss to bug me about fixing it, causing me to post here
where we are supposedly getting a response from Microsoft within 48 hours.
When this first started occuring I assumed it to be file permission problem
on the new server, but I went ahead and gave the Network Service account full
control over the imageUpload directory, which is under the website. Does
anyone have any opinions about this? Should Network Service have such
privilege, is having the directory under the website causing IIS to become
adversely involved in this somehow?
Since I thought it also might be that file upload control itseltf or the
resizing events were not releasing their references or holds or whatever on
these files, I went back and wrote a boatload of things like
Finally
rawBitmap = Nothing
resizedBitmap = Nothing
postedFile = Nothing
But then since every file gets renamed to the eventId + extension...Its
probably superfluous?
Then I think, what else could it be? It has te be an image stuck downstream
in a client or proxy cache? Isnt that what a cache does, prevents grabbing a
new version of something, and since the old image was username+extension and
the new image is also called username+extension is ist simply not getting the
latest image and so our clients look at the event preview and even though
their image was uploaded (?) they see the old image and freak out?
If this is the case, a MS engineer would probably say something like, ah ha
see, not a bug or problem in VS, but a problem somewhere else, case closed.
And yet I wrote an application that doesn't work for some users in some
situations and I need to fix it. If this is indeed what is happening (I have
no idea really) is there a better way to engineer the application such that
this will not happen to any users?
"Pitcairnia" wrote: The basic purpose of the site is for authenticated users to post event listings, which often include photographs. The user is faced with a page where they can insert all of the information about the event in a typical form with textboxes, drop down lists, etc. On this page there are also 4 file upload controls where the user can select 0 to 4 images on their file system for inclusion in the event listing. On submit, the images (if any) are uploaded to the server and named based on the user id and picture number, eg. 123456_01.jpg, 123456_02.jpg, etc. The user is shown a preview of the event with the images. On submit the event is inserted in the database with a return value of the pk or EventID number. This number is used to rename the images, eg. 123456_01.jpg becomes 9876_01.jpg, 123456_02.jpg becomes 9876_02.jpg.
This generally works very well. The image upload directory is directly under the root of the website and has full control for ASP.Net, Network Service, Everyone. this is IIS6 on Server 2003. However, a very small portion of our users report that when they go to upload more than one event, when the preview shows up for the second event, the photos from the first event show up. We also get reports that if they "shut down the computer and reopen it" between each listing it works ok. This is not acceptable since we get paid by the listing. I have requested of some users that they clear their browser cache, delete all temporary files and cookies, and try again but these users report that it still occurs.
Is this a file upload permissions problem, or is it somehow that images are being cached somewhere since the name of the images on the preview page is the same (username + image number + .jpg)?
If this is a caching problem is there some way to make sure that images are not cached anywhere? What tags, if any can be used on the pages, or settings in iis?
Add a QueryString with a random number to the image URL (e.g.
"/images/12345.jpg?n=520"). This will fool the browser into thinking that it
is not the same image, and it will request it from the server.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
"Pitcairnia" <Pi********@discussions.microsoft.com> wrote in message
news:B6**********************************@microsof t.com... Would like help on this issue as the 48 hr response time has elapsed, so let me further elaborate.
Because the image is always temporarily saved as the userId + extension then for every event the image will have the same name as the previous event and the one before that etc., but only when the event is saved is and eventId generated, and so the image is then renamed to eventId + extension. User then goes to add another event, uploads his description and pic, and then there is the previous picture and not the one he just uploaded, preventing the user from uploading any more events, and thus preventing us from earning any money, causing my boss to bug me about fixing it, causing me to post here where we are supposedly getting a response from Microsoft within 48 hours.
When this first started occuring I assumed it to be file permission problem on the new server, but I went ahead and gave the Network Service account full control over the imageUpload directory, which is under the website. Does anyone have any opinions about this? Should Network Service have such privilege, is having the directory under the website causing IIS to become adversely involved in this somehow?
Since I thought it also might be that file upload control itseltf or the resizing events were not releasing their references or holds or whatever on these files, I went back and wrote a boatload of things like
Finally rawBitmap = Nothing resizedBitmap = Nothing postedFile = Nothing
But then since every file gets renamed to the eventId + extension...Its probably superfluous?
Then I think, what else could it be? It has te be an image stuck downstream in a client or proxy cache? Isnt that what a cache does, prevents grabbing a new version of something, and since the old image was username+extension and the new image is also called username+extension is ist simply not getting the latest image and so our clients look at the event preview and even though their image was uploaded (?) they see the old image and freak out?
If this is the case, a MS engineer would probably say something like, ah ha see, not a bug or problem in VS, but a problem somewhere else, case closed. And yet I wrote an application that doesn't work for some users in some situations and I need to fix it. If this is indeed what is happening (I have no idea really) is there a better way to engineer the application such that this will not happen to any users?
"Pitcairnia" wrote:
The basic purpose of the site is for authenticated users to post event listings, which often include photographs. The user is faced with a page where they can insert all of the information about the event in a typical form with textboxes, drop down lists, etc. On this page there are also 4 file upload controls where the user can select 0 to 4 images on their file system for inclusion in the event listing. On submit, the images (if any) are uploaded to the server and named based on the user id and picture number, eg. 123456_01.jpg, 123456_02.jpg, etc. The user is shown a preview of the event with the images. On submit the event is inserted in the database with a return value of the pk or EventID number. This number is used to rename the images, eg. 123456_01.jpg becomes 9876_01.jpg, 123456_02.jpg becomes 9876_02.jpg.
This generally works very well. The image upload directory is directly under the root of the website and has full control for ASP.Net, Network Service, Everyone. this is IIS6 on Server 2003. However, a very small portion of our users report that when they go to upload more than one event, when the preview shows up for the second event, the photos from the first event show up. We also get reports that if they "shut down the computer and reopen it" between each listing it works ok. This is not acceptable since we get paid by the listing. I have requested of some users that they clear their browser cache, delete all temporary files and cookies, and try again but these users report that it still occurs.
Is this a file upload permissions problem, or is it somehow that images are being cached somewhere since the name of the images on the preview page is the same (username + image number + .jpg)?
If this is a caching problem is there some way to make sure that images are not cached anywhere? What tags, if any can be used on the pages, or settings in iis?
Thank you Kevin, this works precisely as described, very low overhead simply
generating a random number. Thanks for your help.
We are not happy that this problem exists, however. We set up caching
wherever we need it and we do not expect anything to be cached elsewhere.
We instruct our clients to change their browser settings to check for a new
version of the page with every request but that setting does not affect
images, i presume.
What about an application that generates images using system.drawing and the
like and it is always returned the same way as in an aspx
<img src="captcha.aspx">
There needs to be a meta tag for this and browsers including and especially
Internet Explorer need to respect the tag.
Just my two cents while I have a soapbox.
"Kevin Spencer" wrote: Add a QueryString with a random number to the image URL (e.g. "/images/12345.jpg?n=520"). This will fool the browser into thinking that it is not the same image, and it will request it from the server.
-- HTH,
Kevin Spencer Microsoft MVP ..Net Developer What You Seek Is What You Get.
"Pitcairnia" <Pi********@discussions.microsoft.com> wrote in message news:B6**********************************@microsof t.com... Would like help on this issue as the 48 hr response time has elapsed, so let me further elaborate.
Because the image is always temporarily saved as the userId + extension then for every event the image will have the same name as the previous event and the one before that etc., but only when the event is saved is and eventId generated, and so the image is then renamed to eventId + extension. User then goes to add another event, uploads his description and pic, and then there is the previous picture and not the one he just uploaded, preventing the user from uploading any more events, and thus preventing us from earning any money, causing my boss to bug me about fixing it, causing me to post here where we are supposedly getting a response from Microsoft within 48 hours.
When this first started occuring I assumed it to be file permission problem on the new server, but I went ahead and gave the Network Service account full control over the imageUpload directory, which is under the website. Does anyone have any opinions about this? Should Network Service have such privilege, is having the directory under the website causing IIS to become adversely involved in this somehow?
Since I thought it also might be that file upload control itseltf or the resizing events were not releasing their references or holds or whatever on these files, I went back and wrote a boatload of things like
Finally rawBitmap = Nothing resizedBitmap = Nothing postedFile = Nothing
But then since every file gets renamed to the eventId + extension...Its probably superfluous?
Then I think, what else could it be? It has te be an image stuck downstream in a client or proxy cache? Isnt that what a cache does, prevents grabbing a new version of something, and since the old image was username+extension and the new image is also called username+extension is ist simply not getting the latest image and so our clients look at the event preview and even though their image was uploaded (?) they see the old image and freak out?
If this is the case, a MS engineer would probably say something like, ah ha see, not a bug or problem in VS, but a problem somewhere else, case closed. And yet I wrote an application that doesn't work for some users in some situations and I need to fix it. If this is indeed what is happening (I have no idea really) is there a better way to engineer the application such that this will not happen to any users?
"Pitcairnia" wrote:
The basic purpose of the site is for authenticated users to post event listings, which often include photographs. The user is faced with a page where they can insert all of the information about the event in a typical form with textboxes, drop down lists, etc. On this page there are also 4 file upload controls where the user can select 0 to 4 images on their file system for inclusion in the event listing. On submit, the images (if any) are uploaded to the server and named based on the user id and picture number, eg. 123456_01.jpg, 123456_02.jpg, etc. The user is shown a preview of the event with the images. On submit the event is inserted in the database with a return value of the pk or EventID number. This number is used to rename the images, eg. 123456_01.jpg becomes 9876_01.jpg, 123456_02.jpg becomes 9876_02.jpg.
This generally works very well. The image upload directory is directly under the root of the website and has full control for ASP.Net, Network Service, Everyone. this is IIS6 on Server 2003. However, a very small portion of our users report that when they go to upload more than one event, when the preview shows up for the second event, the photos from the first event show up. We also get reports that if they "shut down the computer and reopen it" between each listing it works ok. This is not acceptable since we get paid by the listing. I have requested of some users that they clear their browser cache, delete all temporary files and cookies, and try again but these users report that it still occurs.
Is this a file upload permissions problem, or is it somehow that images are being cached somewhere since the name of the images on the preview page is the same (username + image number + .jpg)?
If this is a caching problem is there some way to make sure that images are not cached anywhere? What tags, if any can be used on the pages, or settings in iis? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: NohaKhalifa |
last post by:
Dear All;
I'm developing a web site and i need to make adminisration for this
site it's a site for Real Estates .
But I don't need the administration to be online .. I want them to
fill data...
|
by: Eric |
last post by:
Hi, can anyone guide me throught this:
In my application, I have a global DataSet. I then run
FTP processes in up to 10 simultaneous threads and each
thread calls progress events in the main...
|
by: R Reyes |
last post by:
I am trying to code a file uploader (for forum/email attachments) from the
client computer to a remote web server via the PUT method (since POST is not
allowed ). However, the upload works ONLY...
|
by: Viktor |
last post by:
Hi all,
I'm trying to host my web application which is wriiten in ASP.NET/C#/SQL on
webhostingcenter.com. They use H-SPHERE control panel. I have written my
application on my PC, so the SQL...
|
by: theburnetts |
last post by:
I am building an ASP.NET application that has a requirement that the
user should be able to download all of the data that they have input
into the system and save it to a file on their local PC. ...
|
by: suresh_nsnguys |
last post by:
Hi,
I am working in digital signage application where user can upload image,flash and movie files .and later thay can view the uploaded files in digital LCD screen.
I am facing 1...
|
by: phpfreak2007 |
last post by:
Hi all,
I am trying to upload file using VB HTTP Post method and winsock control . Can successfully upload the files when client machine is English OS, but create problem when upload from Chinese...
|
by: agarwalsrushti |
last post by:
Hi,
Ive created a registration page in which at the last it asks the user to upload the resume file. When the user clicks on the upload button to upload the file it automativcally submits all the...
|
by: Curtis Rutland |
last post by:
Building A Silverlight (2.0) Multi-File Uploader
All source code is C#. VB.NET source is coming soon.
Note: This project requires Visual Studio 2008 SP1 or Visual Web Developer 2008 SP1 and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
| |