Jump to content
Software FX Community

Post Paint Event not Invoking on remote Machines


urwithat
 Share

Recommended Posts

Hi,I have an issue, where the event of Post Paint is not invoking from remote machine call.Below is the code: 

// Gloabal Variable.Chart

chart1 = new Chart();protected void Button_Click(object sender, EventArgs e){ // Creating Event for a dynamic chart.  chart1.PostPaint += new CustomPaintEventHandler(Chart1_PostPaint); fileStream = new System.IO.FileStream(Path, System.IO.FileMode.Create, System.IO.FileAccess.ReadWrite, System.IO.FileShare.ReadWrite); imgMapText = System.IO.File.CreateText(Path); htmlTag = System.IO.File.CreateText(Path); chart1.ImageSettings.ToolTips = ImageToolTipStyle.AsTitle;  chart1.ID = "Chart"; chart1.Width = 320; chart1.Height = 80; chart1.RenderFormat = "bmp"; // Genrating the image. chart1.RenderToStream(fileStream, imgMapText, htmlTag);}protected void Chart1_PostPaint(object sender, CustomPaintEventArgs e){ // Some Design.}

I have added the above code, when it executes on my local system after the "chart1.RenderToStream(fileStream, imgMapText, htmlTag);" the Post Paint event used to be triggered. But this seems not to be the case when the code is added into IIS and run from a remote system.I have tried many other way, but unfortunatly unsuccessfull as yet.I had tried to invoke the Post Paint method:chart1.PostPaint += new CustomPaintEventHandler(Chart1_PostPaint).Invoke(chart1, new CustomPaintEventArgs());ANDthis.Chart1_PostPaint(chart1, new CustomPaintEventArgs());Unfortunatly CustomPaintEventArgs has been sealed due to which we cant access the consturtor for our means.

If your sure on how to rectify such an issue please leave a comment.Thanks & Regards..aT..

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...