Server Error in '/corpweb' Application.

The parameterized query '(@LanguageId nvarchar(4000))SELECT TOP 1 [LanguageCode]
      ' expects the parameter '@LanguageId', which was not supplied.

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: The parameterized query '(@LanguageId nvarchar(4000))SELECT TOP 1 [LanguageCode]
      ' expects the parameter '@LanguageId', which was not supplied.

Source Error:


Line 2041:                sqlCmd.Parameters.AddWithValue("@LanguageId", langeageId);
Line 2042:
Line 2043:                using (var reader = sqlCmd.ExecuteReader())
Line 2044:                {
Line 2045:                    if (reader.HasRows)

Source File: d:\Website\DownloadACTi\App_Code\DownloadCenter\SqlProvider.cs    Line: 2043

Stack Trace:


[SqlException (0x80131904): The parameterized query '(@LanguageId nvarchar(4000))SELECT TOP 1 [LanguageCode]
       ' expects the parameter '@LanguageId', which was not supplied.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +392
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +815
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4515
   System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +61
   System.Data.SqlClient.SqlDataReader.get_MetaData() +138
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6738869
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) +6741487
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) +586
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +107
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +288
   System.Data.SqlClient.SqlCommand.ExecuteReader() +302
   DownloadCenter.SqlProvider.GetLanguageCode(String langeageId) in d:\Website\DownloadACTi\App_Code\DownloadCenter\SqlProvider.cs:2043
   DownloadCenter.SqlProvider.GetFileWithMappingTags(String fileId, String langId) in d:\Website\DownloadACTi\App_Code\DownloadCenter\SqlProvider.cs:568
   DownloadFile.CheckPermission(HttpContext context, String account, Int32 userPermissionLevel, DownloadCenterFile file, Boolean isAutoRedirect) in d:\Website\DownloadACTi\DownloadCenter\Ajax\DownloadFile.ashx:692
   DownloadFile.Page_Load(Object sender, EventArgs e) in d:\Website\DownloadACTi\DownloadCenter\Ajax\DownloadFile.ashx:433
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178


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