macekond/burza_projektu — Issue #88: Lektora nelze přiřadit k předmětům
Author: macekond
Created: 2012-02-07 14:14:09+00:00
State: open
Labels: BUG

na stránce Lector/ListLectors klepnu na Enroll to subject a získám chybu:

Server Error in '/' Application.

Sequence contains no elements

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 elements

Source Error:

Line 35:

Line 36:

Line 37: <%:Html.ListBox("SelectedSubjects", Model.GetSubjectsSelectList(User.Identity.Name, Model.ActualSubjects.ToArray()), new { @class = "select" })%>
Line 38:

Line 39:

Source File: d:\websites\f2\797c3\0x000a\_publishedwebsites\ibupro2\Views\Lector\EnrollToSubject.aspx Line: 37

Stack Trace:

[InvalidOperationException: Sequence contains no elements]
System.Linq.Enumerable.First(IEnumerable`1 source) +336
iBupro2Model.EnrollLectorToSubject.GetSubjectsSelectList(String headOfDepartment, IEnumerable`1 actualSubjects) in d:\temp\gouer2zc.kjc\input\iBupro2Model\EnrollLectorToSubject.cs:25
ASP.views_lector_enrolltosubject_aspx.__RenderContent2(HtmlTextWriter __w, Control parameterContainer) in d:\websites\f2\797c3\0x000a\_publishedwebsites\ibupro2\Views\Lector\EnrollToSubject.aspx:37
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +109
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.UI.Control.Render(HtmlTextWriter writer) +10
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
ASP.views_shared_site_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in d:\websites\f2\797c3\0x000a\_publishedwebsites\ibupro2\Views\Shared\Site.Master:81
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +109
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.UI.Control.Render(HtmlTextWriter writer) +10
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +56
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3060

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