It seems every time I try to use the RadUpload controls I spend a long time getting it to run correctly, so this time I thought I would go by the book. (as in 'Getting Started' section of RadUpload online help) but on the live server (windows 2008 server / iis with asp.net 4.0 on this website) the progress area does not fire, even with files that take several seconds to upload. It works on the localhost but I had to use 24 Meg file to see it.
I used the smart tag in the RadProgress manager to register the RadUploadProgressArea and RadUploadModule.
Where to check now?
I have this code:
ASPX PAGE
<
telerik:RadProgressManager
ID
=
"RadProgressManager1"
Runat
=
"server"
/>
<
telerik:RadUpload
ID
=
"RadUpload1"
runat
=
"server"
AllowedFileExtensions
=
".doc,.docx,.pdf"
ControlObjectsVisibility
=
"RemoveButtons, ClearButtons, AddButton"
MaxFileInputsCount
=
"3"
MaxFileSize
=
"1100000"
OverwriteExistingFiles
=
"True"
Skin
=
"WebBlue"
TargetFolder
=
"~/members/docs"
InputSize
=
"35"
></
telerik:RadUpload
>
<
asp:CustomValidator
runat
=
"server"
ID
=
"CustomValidator1"
Display
=
"Dynamic"
ClientValidationFunction
=
"validateRadUpload1"
OnServerValidate
=
"CustomValidator1_ServerValidate"
>
<
span
style
=
"color:red; font-weight:bold;"
><
br
/>Invalid file: too large or not of type .doc , .docx or .pdf</
span
>.
</
asp:CustomValidator
>
<
asp:Button
ID
=
"Button1"
runat
=
"server"
Text
=
"SUBMIT"
/>
<
script
type
=
"text/javascript"
>
function validateRadUpload1(source, arguments) {
arguments.IsValid = $find("<%= RadUpload1.ClientID %>").validateExtensions();
}
</
script
>
<
telerik:RadProgressArea
ID
=
"RadProgressArea1"
Runat
=
"server"
DisplayCancelButton
=
"True"
ProgressIndicators
=
"TotalProgressBar, TotalProgress, RequestSize, FilesCountBar, FilesCount, SelectedFilesCount, CurrentFileName, TimeElapsed, TimeEstimated, TransferSpeed"
Skin
=
"WebBlue"
Culture
=
"en-GB"
>
</
telerik:RadProgressArea
>
CODE BEHIND
Protected Sub CustomValidator1_ServerValidate(source As Object, e As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate
e.IsValid = (RadUpload1.InvalidFiles.Count = 0)
End Sub
WEB.CONFIG
.....
<
system.web
>
<
httpHandlers
>
<
add
path
=
"Telerik.Web.UI.WebResource.axd"
type
=
"Telerik.Web.UI.WebResource"
verb
=
"*"
validate
=
"false"
/>
<
add
path
=
"Telerik.Web.UI.DialogHandler.aspx"
type
=
"Telerik.Web.UI.DialogHandler"
verb
=
"*"
validate
=
"false"
/>
<
add
path
=
"Telerik.Web.UI.SpellCheckHandler.axd"
type
=
"Telerik.Web.UI.SpellCheckHandler"
verb
=
"*"
validate
=
"false"
/>
<
add
path
=
"Telerik.RadUploadProgressHandler.ashx"
type
=
"Telerik.Web.UI.RadUploadProgressHandler"
verb
=
"*"
validate
=
"false"
/>
</
httpHandlers
>
<
httpModules
>
<
add
name
=
"RadUploadModule"
type
=
"Telerik.Web.UI.RadUploadHttpModule"
/>
</
httpModules
>
</
system.web
>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<add name="RadUploadModule" preCondition="integratedMode" type="Telerik.Web.UI.RadUploadHttpModule" />
</modules>
<handlers>
<add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
<add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" />
<add name="Telerik_Web_UI_SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" />
<add name="Telerik_RadUploadProgressHandler_ashx" verb="*" preCondition="integratedMode" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" />
</handlers>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/error404.aspx" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
....