aspnet core use TempData error!
-
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?
-
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?
You need to find out what the actual error is. Trying to diagnose a problem based solely on "an error occurred" is never going to work.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
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?
The most common problem is that the file that loads into tpDoc is not where you think it is on the server or you do not have permissions to access is.
Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP