I was trying to Export to Excel in ASP.NET MVC, but I got this error

Why am I seeing this error and how do I resolve the problem.
See my code as attached.

Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ankit SharmaPosted Dec 20, 2017, 7:54 AM
mike idowuPosted Dec 20, 2017, 7:47 AM
Ankit SharmaPosted Dec 20, 2017, 7:34 AM