I asked this on Overflow, but they thought I might get a better response here, so I'm repeating.

'm trying to get a webpart deployed and using a Silverlight webpart with an upload control inside. I am however, receiving the following error in the application log when I access my ashx.

Exception information: Exception type: HttpParseException Exception message: Could not create type 'FileUploadSP.UploadHandler'.

I've got an UploadHandler.cs file with the following code:

namespace FileUploadSP
public class UploadHandler : RadUploadHandler 
public override void ProcessStream()

    if (this.IsFinalFileRequest())
        string filename = this.Request.Form["RadUAG_fileName"];
        string fullPath = @"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\FileUploadSP\FileTemp\";
        SPContext.Current.Web.AllowUnsafeUpdates = true;
        FileStream fs = new FileStream(fullPath + filename, FileMode.Open);
        SPContext.Current.Web.Files.Add("/UploadLibrary/" + filename, fs, true);
        File.Delete(fullPath + filename);


And I have the following in my .ashx file:

<%@ Assembly Name="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Assembly Name="FileUploadSP, Version=, Culture=neutral, PublicKeyToken=7c8e2c3ef53023ee" %> 
<%@ WebHandler Language="C#" Class="FileUploadSP.UploadHandler" %>

I cannot get the .ashx to work as I expected to. What am I missing?


  • what is RadUploadHandler, and is it also deployed ? – Steve B Sep 22 '11 at 5:30

a bet : the ashx requires the FQDN of the assembly. Try this :

<%@ WebHandler Language="C#" Class="FileUploadSP.UploadHandler, FileUploadSP, Version=, Culture=neutral, PublicKeyToken=7c8e2c3ef53023ee" %>
  • Nope, that last one didn't make a difference. The RadUpload thing is a silverlight control from Telerik. I'm wondering if I need to include the IHttpHandler there instead, but then the RadUpload wouldn't work. I will try that and remove the Telerik stuff just to see if that fixes it. – PixelMuse Sep 22 '11 at 17:22
  • Ok, I was wrong, that seems to have taken care of the original error, but now I'm getting a new one. Exception information: Exception type: HttpParseException Exception message: Exception of type 'System.Web.HttpParseException' was thrown. – PixelMuse Sep 22 '11 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.