Server Error in '/' Application.

Incorrect syntax near '-'.
Incorrect syntax near the keyword 'ORDER'.

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.Data.SqlClient.SqlException: Incorrect syntax near '-'.
Incorrect syntax near the keyword 'ORDER'.

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:


[SqlException (0x80131904): Incorrect syntax near '-'.
Incorrect syntax near the keyword 'ORDER'.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +212
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +245
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2843
   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +127
   System.Data.SqlClient.SqlDataReader.get_MetaData() +112
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6359556
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +6360625
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +424
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +28
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +211
   System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +19
   System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() +21
   Q.Object.Storage.Persistent.DB.Support.Q.Object.Storage.Persistent.IPersistantSupport.GetLookupIdentifications(Lookup lookup) in D:\Development\Projects\Releases\www.ecas.ro\Qs\Q-DAL\Persistance\Db\MS Sql\Support.cs:406

[Exception: Fail to execute query :  SELECT TBTW2.MGWNI_ID, NEUTRAL0 FROM (SELECT TOP -7 TBTW1.MGWNI_ID, NEUTRAL0 FROM (SELECT TOP 53 MAIN.MGWNI_ID, MAIN.MGWNI_ID  AS NEUTRAL0 FROM  [dbo].MG_WebNavItems AS MAIN WITH(NOLOCK)  WHERE (0 = 0   AND MAIN.MGWNI_MGWN_ID=@PARAM_0)  ORDER BY MAIN.MGWNI_ID ASC) AS TBTW1  ORDER BY NEUTRAL0 DESC  ) AS TBTW2  ORDER BY NEUTRAL0 ASC  ]
   Q.Object.Storage.Persistent.DB.Support.Q.Object.Storage.Persistent.IPersistantSupport.GetLookupIdentifications(Lookup lookup) in D:\Development\Projects\Releases\www.ecas.ro\Qs\Q-DAL\Persistance\Db\MS Sql\Support.cs:514
   Q.Object.Activator.Activator.Lookup(Lookup lookup) in D:\Development\Projects\Releases\www.ecas.ro\Qs\Q-DAL\Activator\Activator.cs:748
   WebSite.Products.BindProducts() in D:\Development\Projects\Releases\www.ecas.ro\Projects\www.ecas.ro\ro\Products.aspx.cs:123
   WebSite.Products.OnLoad(EventArgs e) in D:\Development\Projects\Releases\www.ecas.ro\Projects\www.ecas.ro\ro\Products.aspx.cs:94
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


Version Information: Microsoft .NET Framework Version:2.0.50727.8964; ASP.NET Version:2.0.50727.8962