Server Error in '/' Application.

Sequence contains no matching element

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Sequence contains no matching element

Source Error:


Line 64: 
Line 65:             Response.Status = "301 Moved Permanently"
Line 66:             Response.AddHeader("Location", PageFunctions.GetApplicationPath(True) & "it/staff/" & Split(_url, "/").Last & "/" & oList.First(Function(o) o.AppInsegnanteLingua_rewrite = Split(_url, "/").Last).InsegnanteID & "/nsg")
Line 67:             Response.End()
Line 68:         End If

Source File: C:\inetpub\wwwroot\DanzaSiBootstrap\global.asax    Line: 66

Stack Trace:


[InvalidOperationException: Sequence contains no matching element]
   System.Linq.Enumerable.First(IEnumerable`1 source, Func`2 predicate) +281
   ASP.global_asax.Application_BeginRequest(Object sender, EventArgs e) in C:\inetpub\wwwroot\DanzaSiBootstrap\global.asax:66
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +144
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +73


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0