Project development is on the 4.5.1, do not know why the customer provided the server installed is 4.5, the difference is not to upgrade, and then deploy MVC when the Web. config error
<system.web> <compilation debug="true" targetframework=" 4.5.1"/> "4.5.1"/> </system.web>
And then did not care that the paragraph was deleted, and then the session of the piece began to error
Httpcontext.current.session[key.sessionopenid] = OpenID; The object reference was not set to an instance of the object because it was used asynchronously, so there was an error, and finally the reason was found in StackOverflow.
Https://stackoverflow.com/questions/18383923/why-is-httpcontext-current-null-after-await
It's really a sore egg.
Warning: If your project is upgraded to 4.5. Be sure to add this sentence to the webconfig.
Httpcontext.current.session[strname] Object reference not set to an instance of an object