Mono 下运行asp.net程序(windows环境) http 请求报错

因为业务需要,我需要使用Mono平台来运行asp.net程序,但是移植过去后,程序中其他功能正常,可是使用HttpWebRequest来做http请求报错,错误信息如下:

System.NotImplementedException: The requested feature is not implemented. at System.Net.HttpWebRequest.set_DefaultCachePolicy (System.Net.Cache.RequestCachePolicy value) [0x00000] in :0 at Maticsoft.Common.WebClient.CreateRequest (System.String url, System.String method) [0x00000] in :0 at Maticsoft.Common.WebClient.Post (System.String url, System.Byte[] postData) [0x00000] in :0 at Maticsoft.Common.WebClient.Post (System.String url, System.String postData) [0x00000] in :0 at PX.BLL.T_CourseInfoBLL.GetModelListByCache (Boolean flag, System.String username, Int32 year, Int32 month) [0x00000] in :0  

不知道到底什么原因,求解!

四季花海
浏览 610回答 1
1回答

慕哥6287543

使用了MoMA验证dll发现dll里那个http请求的写法在mono下不兼容,换了另一种http请求的写法就ok了,moma这个工具还真是强大。
打开App,查看更多内容
随时随地看视频慕课网APP