I can't seem to get a bitmap to return to my page.
web.config
<jsonConverters>
<add type="AjaxPro.BitmapConverter,AjaxPro.2" mimeType="image/jpeg"
quality="100"/>
</jsonConverters>
...
<location path="ajaximage">
<system.web>
<httpHandlers>
<add verb="GET" path="*.ashx"
type="AjaxPro.AjaxBitmapHttpHandler,AjaxPro.2"/>
</httpHandlers>
</system.web>
</location>
code behind
using (Bitmap bmp = new Bitmap(width, height){ {
using (Graphics g = Graphics.FromImage(bmp))
{
g.DrawString("TEST TEST", new Font("Arial", 12),
Brushes.Black, 10, 10);
return bmp;
}
}
callback
function imageLoaded(bmp) {
document.images['img0'].src = bmp.value.src;
}
I've been getting 500 errors and the following stack
[NullReferenceException]: Object reference not set to an instance of an
object.
at AjaxPro.AjaxBitmapHttpHandler.ProcessRequest(HttpContext context)
at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously)
I'm using ver 6.6.29.2
Am I missing something? Thanks in advance.
Tim
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ajax.NET Professional" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/ajaxpro
The latest downloads of Ajax.NET Professional can be found at
http://www.ajaxpro.info/
Don't forget to read my blog at http://weblogs.asp.net/mschwarz/
-~----------~----~----~----~------~----~------~--~---