Apr 22, 2011 at 1:56 PM
Edited Apr 22, 2011 at 1:57 PM
I managed to get a Stack Overflow exception when I enabled both Media Folder and also a module I'm working on!
I *suspect* it's because I'm injecting an IStorageProvider dependency, and in your RemoteStorageProvider implementation you suppress the default FileSystemStorageProvider.
So I don't know if this is a fault in the suppression mechanism, or if it's in the way I'm using dependencies. Literally all I did was enable the features. The stack trace seemed to show that the system was circling around ContentHandlers and some of the
Media Folder settings classes. I couldn't see any of my classes in the stack trace, but I do have a ContentHandler into which I'm injecting a service dependency, and one of that service's dependencies ultimately pulls in IStorageProvider; so I think that's
where it might begin from.
Let me just explain about what I'm working on;
I don't know if you saw a discussion about a media system that myself and gkumik were proposing. I've been working on this for a couple of weeks; it's called Media Garden and I'm almost ready to launch the codeplex site. What it does is basically create
some additional levels of abstraction for media content. So it treats media as actual content items, and hides away the storage mechanism. This means that (for instance) a "Video" content type could be playing video from a local file, or an external URL, or
even an embedded Youtube video. Media sources can be defined to pull in media content from anything; file systems, feeds, URLs, or any implementations that people create; database storage would be a good example. For the default "file system media source"
implementation I'm using IStorageProvider to read files from the disk. So your media folder module is really useful in this scenario if users want to mess with the file storage, without implementing an entirely new media source. Because of this I was interested
in your module and wanted to check compatibility. Unfortunately it crashed IIS :(
Now I realise you might say I should be using IMediaService instead of IStorageProvider. But there are problems with this; IMediaService lacks any method to read a file's data, or even to get information about a specific file (it only has a GetMediaFiles
method, not a GetMediaFile one). Finally IMediaService places restrictions on file extensions as configured in settings; whereas in my system each component declares its supported file extensions and I wanted to avoid an extra setup task of the user having
to declare which types of files were ok.
If you want a copy of the code to find out where this stack overflow is coming from, or if you're just interested in the project anyway ;) - I could add you as a developer on the codeplex project so you can get at the repository in the meantime before it's