RaoulRSV 31 Reputation points

My application contains one office-js addin (typescript) project + one Webapi core (c#) project, both communicating through a fetch function when cors is enabled.It works together properly on my local computer.

I published :

However when used, fetch function raises errors (message = "failed to fetch").The issue may be about proper ssl certificates as described in :

Is it a possible solution ?

I tried with self signed certificate with no success so far. Is there any tutorial explaining how to implement it ?

Any help would be appreciated

A set of technologies in the .NET Framework for building web applications and XML web services.
4,360 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,694 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Bruce ( 60,866 Reputation points

    The certificate is for loading the add in, not the fetch. You fetch code should display some debug info. What was the response code, status text, any payload, response content-type etc.

  2. Bruce ( 60,866 Reputation points

    As the error is 404 (not found), either the url, method or payload is invalid. You should be able to see all this in fiddler.

  3. RaoulRSV 31 Reputation points

    Closed. Finally it was about :

    • debugging in localhost is not enough. You have to test with Swagger. In my case I had a wrong return with a String[] and the decoration of the controller was not ok
    • having a plain Web api application (ie : with a wwwroot)
    0 comments No comments