Hi Michael

I tried with additional configuration to web.config.
And what happens when I run my test?
Well, test finishes, and I don't get my picture.
Instead, I just see alternative text.


My callback function looks like:



{
desc: "Should return bitmap image :)",
run:function() { MyAjaxMethods.Test27(callback); },
callback:function(res) {
    var image1 = document.getElementById('image1');
    image1.src = res.value.src;
    return true;
}
},



Server methods:

    /// <summary>
    /// AJAX Bitmap test
    /// </summary>
    /// <returns>Returns the Bitmap Object which we use to add
image.</returns>
    [AjaxPro.AjaxMethod]
    public static Bitmap Test27()
    {
        int varDebug = 0;

        Bitmap pic = new Bitmap(300, 80);
        Graphics g = Graphics.FromImage(pic);
        g.SmoothingMode = SmoothingMode.AntiAlias;

        g.FillRectangle(new SolidBrush(Color.White), 0, 0, 300, 80);
        g.DrawRectangle(new Pen(new SolidBrush(Color.Black)), 0, 0,
299, 79);

        return pic;
    }



Web.config:

<?xml version="1.0"?>
<configuration>
    <configSections>
        <sectionGroup name="ajaxNet">
            <section name="ajaxSettings" type="
AjaxPro.AjaxSettingsSectionHandler,AjaxPro.2" requirePermission="false"
restartOnExternalChanges="true"/>
        </sectionGroup>
    </configSections>
    <ajaxNet>
        <ajaxSettings>
            <urlNamespaceMappings useAssemblyQualifiedName="false">
            </urlNamespaceMappings>

            <jsonConverters>
                <add type=" AjaxPro.BitmapConverter,AjaxPro.2"/>
            </jsonConverters>
            <debug enabled="false"/>
            <token enabled="false" sitePassword="password"/>
        </ajaxSettings>
    </ajaxNet>
    <!-- Common ASP.NET configuration -->
    <appSettings/>
    <connectionStrings/>
    <system.web >
        <roleManager enabled="true"/>
        <compilation debug="true"/>
        <authentication mode="Forms"/>
    </system.web>
    <!-- Handler configuration for Ajax.NET Professional -->
    <location path="ajaxpro">
        <system.web>
            <httpHandlers>
                <add verb="*" path="*.ashx" type="
AjaxPro.AjaxHandlerFactory,AjaxPro.2"/>
            </httpHandlers>
        </system.web>
    </location>
    <location path="ajaximage">
        <system.web>
            <httpHandlers>
                <add verb="GET" path="*.ashx"
type="AjaxPro.AjaxBitmapHttpHandler,AjaxPro.2"/>
            </httpHandlers>
        </system.web>
    </location>
</configuration>




Of course, I added img tag into my aspx page:

<img alt="some bitmap picture" src="" id="image1" />


I did some screen shots of response and response.value debug mode
values. I attached them to this reply.

p.s. Congratulations on wining Costarica. I hope Germany to meet Serbia
and montenegro in the finals :)


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to