这是微软MSDN公布的Fix,希望对碰到同样问题的朋友有所帮助:

This appears to be inaccurate. The AlternateView class does not have a constructor that takes a string as the first argument and a media type as the second. This throws an error when I try it, because it treats the body variable as a file name and attempts to find said file.

Here's the fix:

AlternateView alternate = AlternateView.CreateAlternateViewFromString(body, null, MediaTypeNames.Text.Html);

Courtesy of Mike Pope's site:

http://www.mikepope.com/blog/AddComment.aspx?blogid=1264

posted on 2007-07-11 21:21  Sam Zhang  阅读(557)  评论(0编辑  收藏  举报