ho acquistato un dominio da aruba.it con servio hosting windows.
utilizzo il seguente file resized.aspx per ridimensionare foto al volo.
in locale funziona tutto, online non mi carica le foto.codice:<%@ Page Language="vb" Debug="true" %> <%@ import namespace="system.drawing" %> <%@ import namespace="system.drawing.imaging" %> <%@ import namespace="system.drawing.drawing2d" %> <% ' initialise objects Dim strFilename as string Dim i as System.Drawing.Image strFilename = server.mappath(request.QueryString("img")) i = System.Drawing.Image.FromFile(strFilename) 'Dim b as new system.drawing.bitmap(i.width, i.height, pixelformat.format24bpprgb) Dim b as new system.drawing.bitmap(request.QueryString("w"), request.QueryString("h"), pixelformat.format24bpprgb) dim g as graphics = graphics.fromimage(b) ' blank the image g.clear(color.white) dim unit = GraphicsUnit.Pixel dim swidth = i.width dim sheight = i.height dim sx = 0 dim sy = 0 dim dx = 0 dim dy = 0 dim dw = request.QueryString("w") dim dh = request.QueryString("h") dim rw,rh,val1,val2 rw = swidth/dw rh = sheight/dh if rw<rh then val1=swidth val2=(swidth*dh)/dw else val1=(sheight*dw)/dh val2=sheight end if g.drawimage(i,new rectangle(dx,dy,dw,dh),new rectangle(sx,sy,val1,val2),unit) ' set the content type response.contenttype="image/jpeg" ' send the image to the viewer b.save(response.outputstream, imageformat.jpeg) ' tidy up b.dispose() %>
ho provato ad utilizzare anche percorsi completi con http://www ma niente.
cosa sbaglio? grazie.

Rispondi quotando