Can't load image file in asp.net : System.IO.FileNotFoundException HResult=0x80070002 Message=data-science.png

0

I am trying to load images from my computer to sql database when web application starts but I can't load image data to vb. It is giving file not found exception even though file path is right.

Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
    Dim imgpaths As Array = {"crslogo\data-science.png", "crslogo\python.jpg", "crslogo\acc.jpg"}
    MsgBox(imgpaths(0))

    Dim bArr As Array = {}
    For i = 0 To imgpaths.Length - 1
        Dim img As Image = Image.FromFile("crslogo\data-science.png")
        bArr(i) = imgToByteArray(img)
    Next
End Sub

image

asp.net
vb.net
asked on Stack Overflow Oct 16, 2020 by wo m

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0