Hi, I write a page and use TempData to transfer information to other view. the code like this TempData["TP"]=tpDoc; //tpDoc is a xml file In another view, I use System.Xml.XmlDocument tpDoc = TempData["TP"] as System.Xml.XmlDocument; above code is working in VS2019. But after I deploy to website, there is error:
Error.
An error occurred while processing your request.
so what is wrong in the code? Why it works in VS2019 and failed on Server?