Backend Image creation and loading in webpage
-
I am running into a problem here, and I have no code needed or that requires debugging. I am looking for more of an idea to solve this issue, so here it is. I have a *.exe that is a command prompt utility that generates images. What I am doing is using this utility for my asp.net website. In the background I do processing for each date in a asp.net calendar. If the image doesn't exist in the images directory for that date, Calendar_DayRender calls the backend to use the exe via Process. The image creation works great. As does the loading, if the image was already created in a previous session by any other user. The problem is that the images are being created too quicky and I cannot load the image because when I try to add the Image to the cell, it was not created quickly enough. Any ideas on how I can solve this timing issue?
-
I am running into a problem here, and I have no code needed or that requires debugging. I am looking for more of an idea to solve this issue, so here it is. I have a *.exe that is a command prompt utility that generates images. What I am doing is using this utility for my asp.net website. In the background I do processing for each date in a asp.net calendar. If the image doesn't exist in the images directory for that date, Calendar_DayRender calls the backend to use the exe via Process. The image creation works great. As does the loading, if the image was already created in a previous session by any other user. The problem is that the images are being created too quicky and I cannot load the image because when I try to add the Image to the cell, it was not created quickly enough. Any ideas on how I can solve this timing issue?
Check for the existence of the image file in the main thread before you send the reply to the client.
-
I am running into a problem here, and I have no code needed or that requires debugging. I am looking for more of an idea to solve this issue, so here it is. I have a *.exe that is a command prompt utility that generates images. What I am doing is using this utility for my asp.net website. In the background I do processing for each date in a asp.net calendar. If the image doesn't exist in the images directory for that date, Calendar_DayRender calls the backend to use the exe via Process. The image creation works great. As does the loading, if the image was already created in a previous session by any other user. The problem is that the images are being created too quicky and I cannot load the image because when I try to add the Image to the cell, it was not created quickly enough. Any ideas on how I can solve this timing issue?
Make the image request synchronous? How are you requesting the image in the first place? If you do it with a tag, the browser should wait for a response. I've done this in the past...
If the myImageGenerator.aspx page streams back an image, the browser will display it. I learned this technique from an OLD article on here about Captcha - the image streaming technique is still valid. A CAPTCHA Server Control for ASP.NET[^]