I am having an issue with images not showing in Chrome or FireFox. In chrome i get this message in the Console "Not allowed to load local resource.". The images appear fine and correct in IE11 & MS Edge. I'm assuming this is some king of security problem I need to address, but am not at all sure what. Could someone point me in the right direction?
I have posted the code behind and Mark Up below.
Regards,
Dan
// Code Behind
string imgPath = Server.MapPath("/images/");
List<FileInfo> images = new List<FileInfo>();
DirectoryInfo directoryInfo = new DirectoryInfo(imgPath);
FileInfo[] fileInfo = directoryInfo.GetFiles();
foreach (FileInfo file in fileInfo)
{
images.Add(file);
}
return images;
// Markup
<asp:Repeater ID="imgRepeater" runat="server">
<ItemTemplate>
<div data-big="<%# Eval("FullName") %>" class="lightbox 3u 6u(small)">
<img style="width: 100%; height: 300px;" src="<%# Eval("FullName") %>" alt="Image">
</div>
</ItemTemplate>
</asp:Repeater>