“System.Web.HttpContext cannot be serialized because it does not have a parameterless constructor.”

后端 未结 2 371
挽巷
挽巷 2020-12-18 05:12

I\'ve created a web service that other sites can use to store errors in my database. They can then come to my site to view their errors, search through errors, filter error

2条回答
  •  再見小時候
    2020-12-18 05:42

    You're not going to be able to serialize the HttpContext. Your best bet would be to create a custom class to encapsulate the information that you want out of the HttpContext and pass that into your WebMethod.

提交回复
热议问题