Hi, I've downloaded some source code and I'm getting some major problems coming out of the box directly. I have not found any answers from the developer and I have not asked this question to anyone else, but I saw and saw and saw and I do not know what is going wrong.
I get this error:
Server error in '/' application
Object references are not set to an object instance.Description: ..
During the execution of the current web request, there was an exception without verb - for more information about the error, please review the stack trace and where it originated in the code
Exception description:
System.NullReferenceException:. Object references are not set for an instance of an object
Source error:
Line 157: // Expected ID is the standard Raven ID: "Songs / 4321 "Line 158: Const String Expected IDPix =" songs / "; Line 159: If (song.Id.StartsWith (expectedIdPrefix, StringComparison.OrdinalIgnoreCase)) line 160: {Line 161: New ArgumentException (".ID was not in the expected format");
Visual Studio highlights this bit of code (by ** ** marked)
using(on session = Get.A & LT; IDocumentStore & gt ;. () OpenSession ()) {var songFiles = Directories .EnumerateFiles (Server.MapPath ("~ / content / sample / music"), "* .mp3") .Select (f = & gt; New {songs = new songs (Path.GetFileName (f)), FilePath = f}). ToArray (); SongFiles.ForEach (async f = & gt; ** wait f.Song.UploadMp3ToCdn (f.FilePath)); ** If (! Session QQ; song & gt; (). Any ()) {songFiles.ForEach (s => Session Store (s)); Session.SaveChanges (); }}
You can monitor
songFiles inside the debugger Have tried? The error is to suggest that either
f.Song or
f.FilePath seems null / uninitialised.
No comments:
Post a Comment