Accessing image from other server

孤街浪徒 提交于 2019-12-06 09:41:43

You shouldn't use Server.MapPath. This is used to map virtual paths under your site to physical paths under file system. If the file exists on another server, just access it by name directly, without Server.MapPath.

The answer above is incorrect because the images reside on a separate server.

So System.Images will not no where the image is.

Secondly you have to use server.Mappath for system images, it requires a windows path i.e. c:\blah\blah\whatever.jpg. you will need to use \\server\C$\folder\image.jpg this works well with system.image.FromFile

Also saving you can also utilize this.

Cheers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!