Joseph James
Joseph James

Reputation: 5

Could not find part of the file path

I've come across this error which states that part of the file path cannot be found. I'm fairly new to coding, but is this mistake obvious?

I've created the same application before off a USB

Which works fine, so quite confused as to why the application on my machine isn't.

Error message itself

Update - thank you for the comments so far.

Upvotes: 0

Views: 911

Answers (1)

Setherith
Setherith

Reputation: 329

Assuming you want the relative directory of \Images you want to change line 33 to:

filename = Path.Combine(Server.MapPath("~/Image"), fileName);

You are missing the tilde '~' to make it relative.

Upvotes: 1

Related Questions