Using .NET image manipulation from classic asp

Discussion in 'Classic ASP' started by soupy, Apr 15, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi I need to resize and do some other stuff with images on a classic ASP site, so I've writtena .NET page with a pageload event which does what I want. This page works fine when I just manually put the URL into a browser, but when I try to use it within the classic asp application I'm having problems.
    The code I'm using looks like this:

    strURL = Application("gstrSYSTEM_URL") & "/Includes/Library/ImageResizer.aspx?image=" & Server.MapPath(strImageName) & "&thumb=" & Server.MapPath(strThumbName) & "&width=200&height=-1"

    Set objXML = Server.createobject("Msxml2.XMLHTTP")

    objXML.Open "GET", strURL, false

    objXML.Send

    Set objXML=Nothing

    I get the following error on the 'objXML.Open "GET", strURL, false' line:
    error '80004005'



    Unspecified error





    does anyone know what be causing this, or any other way I can do what I'm tring to do. I've sritten out strURL and copied this into a rowser to ensure that it's coming out correctly and it works when I do that.


    Any help appreciated,


    Soupy.
     
  2. First, Dim objXML


    Try removing the 2, i.e. Set objXML = Server.CreateObject("Msxml.XMLHTTP")
    If that doesn't do it pass a known good URL and test the object that way.
    i.e. objXML.open "GET", "HTTP://mysite.com", False

    (Well formed XML is wayyyyyy tricker in ASP than in .NET)
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page