GetUploaderProvider() cannot cast to custom Provider

Last post 06-21-2009, 10:44 PM by cutechat. 1 replies.
Sort Posts: Previous Next
  •  06-19-2009, 11:10 AM 53298

    GetUploaderProvider() cannot cast to custom Provider

    I have created a custom uploader provider to upload files to our database, which works well. The problem is, our services need an additional property that I cannot get to from my custom provider class. So, in the Page_Load event of my .aspx I tried to cast the object returned from the GetUploaderProvider() method on the Uploader control, such as:
    CustomFileUploaderProvider provider = (CustomFileUploaderProvider )this.Uploader1.GetUploaderProvider();
     
    The problem is, it gives me this error:
    Unable to cast object of type 'CuteWebUI.l' to type 'CustomFileUploaderProvider'.
     
    I am able to cast it to a CuteWebUI.UploaderProvider type, but even though my custom provider inherits from that class, I cannot cast it to my custom type. Any ideas? Thanks...
     
     
    scott.bradley
  •  06-21-2009, 10:44 PM 53332 in reply to 53298

    Re: GetUploaderProvider() cannot cast to custom Provider

    Hi,
     
    Have you registered it into web.config appSettings ?
     
    <add key="CuteWebUI.AjaxUploader.Provider" value="YourNamespace.YourClassName,YourProjectName" />
View as RSS news feed in XML