Solved

Sequence Contains no Elements Exception

Posted on 2013-05-14
2
745 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 500 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Any Third party toll for Integrating chat system on ASP.NET ? 2 42
Output Caching in IIS 2 29
encoding an href string 2 20
C# LINQ ForEach() question 6 28
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

773 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