Skip to content

No action was found on the controller 'FileStorageService' vs javascript #541

@konstatntine

Description

@konstatntine

Hello, 'devs'

Version 12.7.0
I`m just build community project from src and try to config it. But I get issue while open 'document' product.
There is no error in Logs folder, but are errors in web console, like:

request for root dir:
http://192.168.11.234:92/Products/Files/Services/WCFService/service.svc/folders?parentId=1&from=0&count=30&filter=0&subjectGroup=false&subjectID=&withSubfolders=false&searchInContent=false&search=&_=1744677834742

response:
No HTTP resource was found that matches the request URI 'http://192.168.11.234:92/Products/Files/Services/WCFService/service.svc/folders?parentId=1&from=0&count=30&filter=0&subjectGroup=false&subjectID=&withSubfolders=false&searchInContent=false&search=&_=1744677834742'.No action was found on the controller 'FileStorageService' that matches the request.

also. It`s blanked create button:

Image

Web.config.txt

Its seemed like WCFService doesnt linked or something else.
In what direction I need to looking for?

UPD:

... Also find that action for example (in POST)
http://192.168.11.234:92/Products/Files/Services/WCFService/service.svc/folders?parentId=1&from=0&count=30&filter=0&subjectGroup=false&subjectID=&withSubfolders=false&searchInContent=false&search=&_=1744671337066
fails with written above error,

but (in GET)
http://192.168.11.234:92/Products/Files/Services/WCFService/service.svc/folders-files-history?fileId=1
in the same controller do work and send in Get json data. That`s point that Controller have a correct routes in WCF. But there is an error in controller action code for validate and point it for 'folders'?

UPD:
And it`s seemed that parameter extension in request absent:

just action from controller

 [ActionName("folders"), HttpPost, AllowAnonymous]
 public object GetFolderItemsXml(String parentId, int from, int count, FilterType filter, bool subjectGroup, String subjectID, String search, bool searchInContent, string extension, bool withSubfolders, [FromBody] OrderBy orderBy)
 {
     var folderItems = GetFolderItems(parentId, from, count, filter, subjectGroup, subjectID, search, searchInContent, extension, withSubfolders, orderBy);
     var response = new HttpResponseMessage(HttpStatusCode.OK)
     {
         Content = new StreamContent(serializer.ToXml(folderItems))
     };
     response.Content.Headers.ContentType = new MediaTypeHeaderValue("application/xml");
     return response;
 }

and request from community server
http://192.168.11.234:92/Products/Files/Services/WCFService/service.svc/folders?parentId=1&from=0&count=30&filter=0&subjectGroup=false&subjectID=&withSubfolders=false&searchInContent=false&search=&_=1744671337066

if I enter empty extension in RestApi tool - it`s work well and send result.
http://192.168.11.234:92/Products/Files/Services/WCFService/service.svc/folders?parentId=1&from=0&count=30&filter=0&subjectGroup=false&subjectID=&withSubfolders=false&searchInContent=false&search=&**extension**=&_=1744671337066
Why is different from js and Controller method ?

foldermanager.js

/* Methods*/

var getFolderItems = function (isAppend, countAppend) {
      var filterSettings = ASC.Files.Filter.getFilterSettings();
      ASC.Files.ServiceManager.getFolderItems(ASC.Files.ServiceManager.events.GetFolderItems,
          {
              folderId: ASC.Files.Folders.currentFolder.id,
              from: (isAppend ? jq("#filesMainContent .file-row[name!=\"addRow\"]").length : 0),
              count: countAppend || ASC.Files.Constants.COUNT_ON_PAGE,
              append: isAppend === true,
              filter: filterSettings.filter,
              subjectGroup: filterSettings.subjectGroup,
              subjectId: filterSettings.subject,
              search: filterSettings.text,
              orderBy: filterSettings.sorter,
              withSubfolders: filterSettings.withSubfolders,
              searchInContent: filterSettings.searchInContent
          }, { orderBy: filterSettings.sorter });
  };

there is no extension parameter

UPD:
Is it needed to correct code in cs (make param extension as predefined) or in js (add extension param as blanc) ?

UPD:
new func in servicemanager.js

 var getFolderItems = function (eventType, params, data) {
     params.showLoading = params.append != true;
     request("post", "xml", eventType, params, data, "folders?parentId=" + encodeURIComponent(params.folderId) + "&from=" + params.from + "&count=" + params.count + "&filter=" + params.filter + "&subjectGroup=" + !!params.subjectGroup + "&subjectID=" + params.subjectId + "&withSubfolders=" + !!params.withSubfolders + "&searchInContent=" + !!params.searchInContent + "&search=" + encodeURIComponent(params.search) + (params.extension ? "&extension=" + encodeURIComponent(params.extension) : ""));
 };

is it needed for &extension param must be in any case, like this ?

 var getFolderItems = function (eventType, params, data) {
     params.showLoading = params.append != true;
     request("post", "xml", eventType, params, data, "folders?parentId=" + encodeURIComponent(params.folderId) + "&from=" + params.from + "&count=" + params.count + "&filter=" + params.filter + "&subjectGroup=" + !!params.subjectGroup + "&subjectID=" + params.subjectId + "&withSubfolders=" + !!params.withSubfolders + "&searchInContent=" + !!params.searchInContent + "&search=" + encodeURIComponent(params.search) + (params.extension ? "&extension=" + encodeURIComponent(params.extension) : **"&extension="**));
 };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions