我的MVC3应用程序托管许多域,如
www.mysite.com
www.mysite.de
www.mysite.co.uk
...
然后,在开始请求时,我必须从url获取顶级域(例如".com");我在Global.asax中添加了以下代码
Private Sub MvcApplication_BeginRequest(sender As Object, e As System.EventArgs) Handles Me.BeginRequest
Dim toplevel_domain As String = Request.Url.Host
topl