Could not find a part of the path (asp.net)
Hi I keep getting this error:
Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of th开发者_开发技巧e path 'D:\Websites\site_sitecore\Website\Template\claim.htm'.
The code I'm using is:
message.BodyFileName = "/Template/claim.htm";
Basically trying to send an email template via email but I can't get it to find the path. If I use a external link with that file it denies access to it but can't work out how to get the correct path to work internally, any ideas?
Use Server.MapPath('~/Template/claim.htm'). Does that work?
try message.BodyFileName = "Template/claim.htm";
精彩评论