Hi ;
I have an web application which display images on the main page and this application is located in a DMZ.
The code functions perfectly in a development environment but ignores the image in production.
I verified this with Fiddler.
Our systems people say this is a code issue but the production code worked before the only differnce now is that I am pointing to a different URL.
Here is my code :
string myPath = "https://www.somewebsite.com/images/path1/path2/path3/" + "name of Image" + .jpg"
If (checkMyUrl (myPath == true))
{
img.imageurl = myPath;
}
else
{
img.imageurl = default.image;
}
protected bool (string _url)
{
System.net.WebRequest myReq = System.net.WebRequest.Create(_url)
try
{
System.net.WebResponse myResponse = myReq.GetResponse();
}
Catch (System.net.WebException e)
{
System.net.WebResponse r = (System.net.WebResponse)e.Response;
if r.StatusCode == Suystem.Net.HttpStatusCode.NotFound)
(
return false;
}
}
}
Thanks for any insights !