"Unable to connect to backend".

Feb 20, 2015 at 12:40 PM
Edited Feb 20, 2015 at 12:55 PM
Elfinder is working perfectly in visual studio. I can access all directories and download the files when on running from visual studio. But when published to local IIS or on the server I get error "Unable to connect to backend. Backend not found" as soon as I try to open the elfinder view.

Can anybody point me how to fix this error? Do I need to set any permissions in IIS for Elfinder to work?

Edit: Even the elfinder sample does not work in local IIS or on server. Getting same error.

Feb 22, 2015 at 5:33 AM
Found the solution. Route was not configured correctly. Surprising that (url: "~/connector",) worked on local IIS, but not on server.

url: '@Url.Content("~/connector")', Hope this helps others.
Marked as answer by gandhiarpit on 2/21/2015 at 9:33 PM
Jun 17, 2015 at 6:40 PM
Edited Jun 17, 2015 at 10:51 PM
This helped me, but it took a while before I circled back to this answer as I misunderstood the solution to be referring to routing paths (MapRoute, etc.).

Now I understand better. The index.cshtml starting file webpage that hosts ElFinder.Net had the url set to '/connector' which worked well for me during development testing through IIS Express/Cassini. When I published to my internet website and ran under IIS, the Finder screen would draw the outline, then give the "Invalid backend response. Data is not JSON." error message.

The reason that localhost worked, but the internet hosted website did not, was because the internet hosted website was in a subfolder of my main website, whereas local was at the root. Example: localhost:44300/ vs https://mydomain.com/myProject/
(this plug-in is in the Folder action method, so really: localhost:44300/Folder vs https://mydomain.com/myProject/Folder)

Here is the portion of the Index.cshtml as corrected

<script type="text/javascript">
    $(function () {
        var myCommands = elFinder.prototype._options.commands;
        var disabled = ['extract', 'archive', 'help', 'select'];
        $.each(disabled, function (i, cmd) {
            (idx = $.inArray(cmd, myCommands)) !== -1 && myCommands.splice(idx, 1);
        var selectedFile = null;
        var options = {

where url was formerly
url: '/connector',

So now I have Elfinder.Net mostly working on my website! I still have some research and cleanup to go, as I don't like the file links showing 'connector?' (and early attempt at a nicer name via 2nd parameter of AddRoot is failing like above) nor do I like that the download files having + instead of space in their names....


(edited to change http to https in example)