我在asp.net做開發。最近我發現在asp.net 5
沒有Global.asax
文件。在asp.net 5中放置HttpContext.Current.RewritePath的位置?
放入Global.asax
文件的東西之一是url rewriting
。
隨着Global.asax
文件不見了。我可以在哪裏放置url rewriting
的代碼。我的意思是我做這樣的事情在asp.net 4.0
HttpContext.Current.RewritePath(...);
我不想用url rewriting modules
我只是想用HttpContext.Current.RewritePath
方法來做到這一點。
我的問題是我可以把上面的代碼放在asp.net 5
?
OWIN中間件是ASP.NET vNext中的HttpModules的替代品。 – Neel
和耶,因爲我說它是Startup.cs! – Neel
在global.asax中是否有像Application_BeginRequest這樣的事件? – Alex