London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

VirtualPathVersioningProvider not working

Vote:
 

Hi,

I'm currently setting up a new episerver 7.5 site, and configured a VPP with following configurations. However, when I try to upload a file, "I got an error upload failed".

1. I looked into episerver log, and I could see only the below error message:

ERROR EPiServer.Web.Hosting.VirtualPathHandler: VirtualPathProvider of type 'EPiServer.Web.Hosting.VirtualPathVersioningProvider' is registered for virtualPath '~/Upload/'. 

2. File upload/Media dialog shows "Failed" as status. But I couldnt debug further.

    
      
      
      
      
    

Can you please let me know if I need to add additional code or is it expected to work out-of-the box.

Kindly let me know if I'm missing any steps.

Thanks,

senthil.

#117849
Feb 23, 2015 11:59
Vote:
 

Hi,

I also noticed below line of error in the log fine.

VirtualPathProviders should be converted to IContent based files.

#117855
Feb 23, 2015 12:29
Vote:
 

This does not exists in version 7.5

You have to convert it to Content

Read more here:

http://world.episerver.com/documentation/Items/Installation-Instructions/Installing-EPiServer-updates/Upgrading-to-EPiServer-75-CMS/

#117858
Feb 23, 2015 12:33
Vote:
 

Henrik is right.

Here is another tip though: Hover the "Failed" message when uploading files, and you'll see a more detailed error message. My guess is that you have not created a matching media content type yet.

#117860
Feb 23, 2015 13:11
Vote:
 

Hi Henrik, Per Magne Skueseth,

Thanks a lot for your replies and yes, I'm able to resolve this by adding the below class. I hovered over the message and found the error stating I dont have no matching support for jpg...(Apologies, it dint strike me to check the error message :-) )

I then added the below class (referred to AlloyTech) and it is working fine now. In my episerver 6 project, this was not there, hence i got confused.

 [ContentType(GUID = "0A89E464-56D4-449F-AEA8-2BF774AB8730")]
[MediaDescriptor(ExtensionString = "jpg,jpeg,jpe,ico,gif,bmp,png")]
public class ImageFile : ImageData 
{
/// <summary>
/// Gets or sets the copyright.
/// </summary>
/// <value>
/// The copyright.
/// </value>
public virtual string Copyright { get; set; }
}


One other doubt : Is it possible to pickup the extension string from config file? so i can modify anytime in future..

regards,

senthil

#117867
Feb 23, 2015 13:34
Vote:
 

You could/should create a generic class like this:

[ContentType(GUID = "EE3BD195-7CB0-4756-AB5F-E5E223CD9820")]
    public class GenericMedia : MediaData
    {
        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        public virtual String Description { get; set; }
    }

This will take all files where there are no match on other mediadata that has extensionstring on it.

#117871
Feb 23, 2015 13:41
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.