0
網站在Visual Studio中工作,但在服務器上斷開。獲取錯誤:「System.NullReferenceException:未將對象引用設置爲對象的實例。」 我已經重新發布了該項目,並且仍然出錯。我從服務器上拉下文件,它仍然在我的機器上,但不在服務器上。會發生什麼?網站在Visual Studio中工作,但不在服務器上
<div class="main">
<h2 class="queue_title">Queue</h2>
@if (Model.Count > 0)
{
<table class="inputTableLeft">
<tr><th>Company</th><th>Category</th><th>Assigned Resource</th></tr>
<tr>
<td>
<select id="CompanySelect">
<option value="0">All</option>
@foreach (var company in Model.GroupBy(r => r.Company))
{
<option value="@company.First().Company">@company.First().Company</option>
}
</select>
</td>
<td>
<select id="CategorySelect">
<option value="0">All</option>
@foreach (var category in Model.GroupBy(r => r.Category))
{
<option value="@category.Key.Id">@category.Key.Name</option>
}
</select>
</td>
<td>
<select id="AssignedResource">
<option value="0">All</option>
@foreach (var resource in Model.GroupBy(r => r.AssignedUserName))
<!--Breaking here:-->{
<option value="@resource.First().AssignedADUser.FullName">@resource.First().AssignedADUser.FullName</option>
}
</select>
</td>
</tr>
</table>
<table class="inputTableRight">
<tr>
<th>Incident/Ticket Number</th><th>RCA Number</th>
</tr>
<tr>
<td>
<input type="text" id="IncidentNumFilter" />
</td>
<td>
<input type="text" id="RCANumFilter" />
</td>
</tr>
</table>
<table id="QueueTable">
<tr>
@foreach (var grp in Model.GroupBy(r => r.StatusId))
{
<th>
@grp.First().Status.Name
</th>
}
</tr>
<tr>
@foreach (var grp in Model.GroupBy(r => r.StatusId))
{
<td data-status="@grp.First().StatusId">
@foreach (RCAModel rca in grp.OrderBy(r => r.CreateTime).OrderByDescending(r => r.Critical))
{
<div data-rca="@rca.Id" data-company="@rca.Company" data-assigned="@rca.AssignedADUser.FullName" data-category="@rca.Category.Id" data-incident="@rca.TicketNumber" class="line @(rca.Critical ? "highlight_red" : "")">
<a href="@Url.Action("EditRCA", new { id = rca.Id })" >
@rca.Id : Created - @rca.CreateTime @(rca.Critical ? Html.Label("expression", " - CRITICAL") : Html.Label("", ""))
</a>
</div>
}
</td>
}
</tr>
</table>
}
else
{
@: No RCAs in queue
}
</div>
更多信息。你需要輸入一些日誌或類似的東西來找出是什麼導致了錯誤或它發生了什麼。 –