views:

62

answers:

3

hey,

i am fetching image using webservice into dataset and displaying for that its to be get worked after deployment i have done following line of code but its still not able to display the image after deployment

String imageName = row["ImageName"].ToString();
String physicalPath = HttpContext.Current.Request.Url.AbsoluteUri.ToString();
String imagePath = physicalPath.Substring(0, physicalPath.LastIndexOf("/", 
    StringComparison.OrdinalIgnoreCase) + 1) + imageName;

can anyone help me to resolve the issue?

+1  A: 

I don't know if this is the issue here, but try using Path.Combine

Dror
A: 

If your images are in the web sites path this might help.

Server.MapPath("relative url"); 
Thomas James
A: 

thanks for ur replies. i have resolved the issue its due to aurtorization problem to iis.

Neo