Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Backend Image creation and loading in webpage

Backend Image creation and loading in webpage

Scheduled Pinned Locked Moved ASP.NET
helpcsharpasp-nettoolsquestion
3 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bigjfunk
    wrote on last edited by
    #1

    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?

    B J 2 Replies Last reply
    0
    • B bigjfunk

      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?

      B Offline
      B Offline
      Bernhard Hiller
      wrote on last edited by
      #2

      Check for the existence of the image file in the main thread before you send the reply to the client.

      1 Reply Last reply
      0
      • B bigjfunk

        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?

        J Offline
        J Offline
        Jasmine2501
        wrote on last edited by
        #3

        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[^]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups