Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I already have an image on a local disk but I don't know how to display it in a web service in the from of a url.

My Path Image = C:\Users\LAPTOP-I7\source\repos\webservice\Image
My Link Webservice = "http://192.168.x.xx/webservice/webservice.asmx"

Example "http://192.168.x.xx/webservice/image1.jpg"

If i search in link example in my browser it is show image1.jpg

Please help me solve this problem, Thank you

What I have tried:

previously I used a reference from here https://www.aspsnippets.com/Articles/Displaying-images-that-are-stored-outside-the-Website-Root-Folder.aspx
Posted
Updated 15-Dec-19 22:03pm
v3

1 solution

Add the image file to a proper location within the web project. Access to directories outside the project, especially those belonging to some user id, are not allowed.

[edit]
See Create resource files for .NET apps | Microsoft Docs[^]
[/edit]
 
Share this answer
 
v2
Comments
Reyhan M.T 16-Dec-19 4:01am    
Could you give me example because i only using webmethod and link from here https://www.aspsnippets.com/Articles/Displaying-images-that-are-stored-outside-the-Website-Root-Folder.aspx using <asp: image=""> to show image
Richard MacCutchan 16-Dec-19 4:14am    
I have no idea what code you have extracted from that website. But if it does not work then you need to ask the person who wrote it.
Richard MacCutchan 16-Dec-19 4:16am    
See updated solution.
Reyhan M.T 16-Dec-19 19:37pm    
Yes, thank you so much

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900