This is a migrated thread and some comments may be shown as answers.

[Solved] Telerik file upload error in ASP.Net MVC

1 Answer 115 Views
Upload
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nagavardhana Reddy
Top achievements
Rank 1
Nagavardhana Reddy asked on 21 Jan 2012, 09:27 AM
Hi,

We have an ASP.Net MVC application implemented with Telerik file upload. And in my company for all the sites developed are enabled with Siteminder. 

Siteminder functions like on browse of any site the page will be redirected to login page and once the authentication happened it will come back to the site which was browsed.

Siteminder enable or disable will be done in web.config file by adding and removing the Siteminder entries.

Issue: Telerik file upload works fine Siteminder disabled but if site minder enabled Telerik file upload gives the error popup as "Error! Upload failed. Unexpected server response - see console" and the response text in "OnError" event is as follows "Error trying to get server response: Error: Permission denied."

Please find the error message attachments.

Could you please help us in resolving this issue and getting the file upload success.

Thank you.

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 23 Jan 2012, 10:32 AM
Hello,

The Upload won't be able to display the login page, as it uses an AJAX request. What you can do is to handle the onError event and navigate to the login page:
<%= Html.Telerik().Upload()
            .Name("attachments")
            .Async(async => async
                .Save("Save", "Upload")
                .Remove("Remove", "Upload")
            )
            .ClientEvents(events => events.OnError("onError"))
%>

function onError(e) {
    window.location.href = "...";
    e.preventDefault(); // Suppress error message
}


I hope this helps.

Regards,
Tsvetomir Tsonev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Upload
Asked by
Nagavardhana Reddy
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or