Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Raw Outputstream code in a page. 1

Status
Not open for further replies.

qwert231

Programmer
Sep 4, 2001
756
US
I found this page/code which looks like it will do what I want, but it only sends the image to the client. I want to use this in conjunction with my page... I was thinking of programatically changing a place holder to the image, but I am not sure how... any ideas/thoughts?

 
Does anybody know what this message means?

System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+. at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams) at System.Drawing.Image.Save(String filename, ImageFormat format) at secure.seniors.makeThumb() in C:\Inetpub\ 342

Code:
thumb.Save(saveName, ImageFormat.Jpeg)
 
means that the asp.net account does not have write permissions on the directory you're trying to save that image to.

penny1.gif
penny1.gif
 
K, that works... however, I started to use it with the images in my database, which have UNC paths. I get this error:
System.IO.FileNotFoundException: \\Dell2400\Images_03\Brian\Ryan\Ryan 070.jpg at System.Drawing.Image.FromFile(String filename, Boolean useEmbeddedColorManagement) at System.Drawing.Image.FromFile(String filename) at secure.seniors.makeThumb(String fName) in C:\Inetpub\ 315


So, it says the file isn't there, but it is. Does it need write access to open this? I don't need to write this file... so can I open it read-only? Ideas/thoughts/rants/insults...
 
ASP.NET won't read a file from another server using UNC or a mapped drive letter. All files need to be local to the machine that the scripts are running on.
penny1.gif
penny1.gif
 
It can't be. It is on our raid, which is separate from our Web server. Is there no way then?
 
.Net? Or ASP.Net? If ASP.Net, there should be some workaround I can do!
 
How 'bout I write a little command line utility. Is there some way to trigger that to run and pass it a variable?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top