Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

httpcontext does not contain GetFeature error

$
0
0

I want to use GetFeature of httpcontext ,but  httpcontext does not contain GetFeature  error  occurred,

how to use GetFeature of httpcontext?

publicTaskInvoke(HttpContextcontext){// Detect if an opaque upgrade is available. If so, add a websocket upgrade.varupgradeFeature=context.GetFeature<IHttpUpgradeFeature>();if(upgradeFeature!=null){if(_options.ReplaceFeature||context.GetFeature<IHttpWebSocketFeature>()==null){context.SetFeature<IHttpWebSocketFeature>(newUpgradeHandshake(context,upgradeFeature,_options));}}return_next(context);}

Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>