且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

尝试在HTML中将HTML保存为Word时出现HttpContext错误

更新时间:2023-02-08 08:37:53

If I were to guess I'd say your project is a class library or some non web application project.

If this is the case you will not have access to httpcontext and you'll either have to change your project to a web project or you can look at alternative methods of saving your file. For example: Writing Text File to Folder on Desktop

*note I've not tried the suggested solution.