Filename character limit for upload effectively 50

Apr 4, 2008 at 2:09 AM
This is just meant to serve as an FYI. Using ImmediateVideoProcessing="true" there is no warning nor notice of failure when uploading files with more than 50 characters in the filename including file extension. The uploaded file appears to be processed on the status bar, but ultimately the video is not uploaded to silverlight streaming servers nor added to the site. On a positive note, the failure doesn't affect future upload/processing.

Using the included VideoProcessingService.exe console tool with the site set ImmediateVideoProcessing="false", the executable crashed and dumped the following text into the console:

System.Data.SqlClient.SqlException: String or binary data would be truncated.

VS 2008 opened to debug VideoProcessingService.exe and highlighted the "dc.SubmitChanges();" line in the following portion of code:

/// <summary>
/// Updates the specified video.
/// </summary>
/// <param name="video">The video.</param>
public static void Update(mdl.Video video)
{
using (VideoShowDataContext dc = new VideoShowDataContext(ConnectionString))
{
var videoResult =
(from videos in dc.Videos
where videos.VideoId == video.VideoId
select videos).SingleOrDefault();

videoResult.VideoUrl = video.VideoUrl;
videoResult.PreviewUrl = video.PreviewUrl;
videoResult.ThumbnailUrl = video.ThumbnailUrl;
videoResult.StatusId = (int)video.Status;
videoResult.StatusMessage = video.StatusMessage;
dc.SubmitChanges();
}
}


Ful console output:

Watching for new videos...
Begin Processing Video 82...
System.Data.SqlClient.SqlException: String or binary data would be truncated.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolea
n breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception
, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj
ect stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cm
dHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, Tds
ParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, Run
Behavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBe
havior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehav
ior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult
result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult res
ult, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo
queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs
, ICompiledSubQuery[] subQueries, Object lastResult)
at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryI
nfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompile
dSubQuery[] subQueries)
at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider
.Execute(Expression query)
at System.Data.Linq.ChangeDirector.StandardChangeDirector.DynamicUpdate(Track
edObject item)
at System.Data.Linq.ChangeDirector.StandardChangeDirector.Update(TrackedObjec
t item)
at System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode)
at System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode)
at System.Data.Linq.DataContext.SubmitChanges()
at VideoShow.Data.VideoDO.Update(Video video) in C:\inetpub\wwwroot\VideoShow
\Data\VideoDO.cs:line 63
at VideoShow.Bll.VideoBO.Update(Video video) in C:\inetpub\wwwroot\VideoShow\
BLL\VideoBO.cs:line 38
at VideoShow.Bll.Media.Processing.BasicVideoProcessor.UpdateVideo(HostResult
hostResult) in C:\inetpub\wwwroot\VideoShow\BLL\Media\Processing\BasicVideoProce
ssor.cs:line 58
at VideoShow.Bll.Media.Processing.BasicVideoProcessor.Process(Video video) in
C:\inetpub\wwwroot\VideoShow\BLL\Media\Processing\BasicVideoProcessor.cs:line 4
3
at VideoProcessingService.Program.Start() in C:\inetpub\wwwroot\VideoShow\Vid
eoProcessingService\Program.cs:line 52