RadZen Infer Not Taking Custom Methods Into Account

Recently we began working on the API side of our server, also RadZen based. On this server we also created a custom server method for requesting the direct download link from MSGraph (an option which we did not see in the MSGraph service).

Upon pushing our RadZen instance to Azure and reinferring on the client side, we noticed the custom server method was not inferred with it. Is this a bug or is this intentional? For our specific purpose, we did need to have the request sent from the server due to CORS. Please advise.

Hi @Damian,

Is the method part of ServerMethodsController? Can you post the method signature?

It is indeed in the ServerMethodsController class, also this is the method signature:

Note that this server is separate from our client application (we split the client and server apart), upon inferring the server is when we had issues with the custom methods not being detected on the client application.

I tried to reinfer the db separately as well as completely rebuild the server, neither are allowing me to use the custom server method declared above.

Radzen will read the controllers that are part of server folder of the application. Is your controller there?

Yes sir.

The server and client in our case are split across 2 separate servers. The server application sees the GetReceiptLink function just fine while the client application (after inferring the server application) is not able to see the same function.

Please zip your app (without client/node_modules, server/bin and server/obj) and send it to info@radzen.com

Just to mention something important. The custom server methods functionality reads the controllers only from the \server\ directory.

Gotcha, so in our case with the two being split the GetReceiptLink would not be read. Is there a way for us to access the custom method from the server?

There is no built-in way (via Invoke custom method). You could use the HttpClient available in the page though and invoke your method via HTTP call. Something like this.

return this.httpClient.post("http://localhost:5000/api/method", { param: 1}).toPromise()
1 Like