Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Sequence Contains no Elements Exception

Posted on 2013-05-14
2
Medium Priority
?
794 Views
Last Modified: 2013-05-26
Hi,
The application works and renders fine on the local host, however when I deploy on the server throws the following exception.

Interestingly, this happens on any page (even on the index file which has no database code).

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:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[InvalidOperationException: Sequence contains no elements]
   System.Linq.Enumerable.Last(IEnumerable`1 source) +4075158
   RouteDebug.RouteDebuggerHttpModule.OnBeginRequest(Object sender, EventArgs e) +72
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
0
Comment
Question by:TrialUser
2 Comments
 
LVL 10

Accepted Solution

by:
eguilherme earned 1500 total points
ID: 39171093
Sounds like you have no routes registered, did you install RouteDebugger (http://nuget.org/packages/routedebugger) or something? The stack trace is kind of suspecious
0
 

Author Comment

by:TrialUser
ID: 39198190
First of all sorry about the delay in answering. I am usually good at replying, but had left town for a couple of things.
The problem turned out to be that the publish did not complete fully. The cheaper the domain hosting service, the poorer the quality, duh. Sorry guys, once I manually unzipped the build things are fine and dandy.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question