could not find file Error if file exists c#
<pre><code>SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();
Attachment data = new Attachment(@"\\MYPC\Share\FinalReport.html");
message.Attachments.Add(data);
smtpClient.Send(message);
</code></pre>

<p>This Code has worked fine for the last week. But today I got an exception as it could not find file: <em>\MYPC\Share\FinalReport.html</em>. I tried for an hour in different ways then I restarted my system. Again its Worked fine.</p>

<p>Key point: I didn't shutdown or restart my PC for the past week.</p>
