简体   繁体   中英

Asp.Net httpcontext.current.request works on virtual windows server 2012 running iis7 but not on windows server 2016 iis10

I am experiencing a very strange issue(strange to me) with HttpContext.Current.Request. I have recently deployed a Asp.Net site using Razor Syntax pages on Server 2016 iis 10. The issue I am experiencing with HttpContext.Current.Request. is that it is coming back null. only on iis 10. I have tested on another server running iis 7 and I have no issue at all. The data posts from page to page as expected. I do not believe this is a syntax issue because I have not rewritten anything since the move.

I figured out what the issue was. The image type for the button was not passing the value to the second page. I changed the type to Submit and the data is posting as expected.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM