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


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"}

    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)
End Sub

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