Alexander Koblov · Oct 25, 2024 go to post

Usually the Management Portal looks like this, when the browser cannot load static files. Open Web Developer tools, Network tab, refresh the page and see what resource the browser fails to load.

Check apache's error.log

Alexander Koblov · Oct 24, 2024 go to post

See though "Event Class" in the web-application definition. That's subclass of %CSP.SessionEvents. You can create such class, override OnStartRequest. And put some logic there

Alexander Koblov · Oct 24, 2024 go to post

"Should the developer of the REST.API service call this method everytime" Yes!

"there is a way to understand whether the Audit is on for the particular REST.API service? " See if there are User audit events defined in the system that look like the ones that responsible for this REST service. If no -- then likely there are no audit events

Alexander Koblov · Oct 24, 2024 go to post

Audit does not happen automatically. For some record to appear in the Audit log you need to call the following method:

Do $SYSTEM.Security.Audit(EventSource,EventType,Event,EventData,Description)

So in order for the REST-calls of the REST API to be audited you need to add the call above in the REST API

EventSource in this case is anything you specify when calling the Audit() method. Later, in the Audit Database UI you can filter by this EventSource

https://docs.intersystems.com/iris20242/csp/docbook/DocBook.UI.Page.cls?KEY=AAUDIT#AAUDIT_usr_createev

Alexander Koblov · Aug 27, 2024 go to post

IRISReference works fine when a method returns one scalar value in the output variable. %SYS.Namespace:ListAll however populates a multidimensional array in the output. And they are not supported on the .NET side.

You need to write some wrapper in the ObjectScript to conver this output array into something that .NET client side understands.

Alexander Koblov · Aug 20, 2024 go to post

Hi David

Not really! I want to prove that ^$Global is faster from the database directly, so I would benefit from the buffers ;-)

Seriously though -- yes, good point. Even on the second and consequent runs ^$Global from the namespace is noticeably slower, so it uses the same buffers as the ^$Global from the database directly

Alexander Koblov · Aug 19, 2024 go to post

Depends on which globals are in the database. If you have separate code / data databases for the namespace, then yes -- you'll see only data or only code related globals

Alexander Koblov · Aug 15, 2024 go to post

^$GLOBAL likely does not cache the list of the globals in the current namespace

So each time you do $Order(^$GLOBAL(name)) it gets the list and looks which global is next after the one in the name. That's fine because globals might appear and disappear between the calls.

If you'd like to loop through the globals -- use merge, and then loop through the temp variable a

merge a = ^$GLOBAL("")

Note, that your loop is much faster if you run it in the database, not namespace, as here ther are no possible mappings to account for

USER>s z1=$zh,n="" f  { s n = $O(^$Global(n))  q:n="" } w $zh-z1
3.302887
USER>zn "^^..\user"

...iris\mgr\user\>s z1=$zh,n="" f  { s n = $O(^$Global(n))  q:n="" } w $zh-z1
.098734
Alexander Koblov · Aug 2, 2024 go to post

VS Code also does it automatically. You need to have some breakpoint in the flow for execution to stop there

Alexander Koblov · Jul 31, 2024 go to post

Jeffrey, please try :/csp/documatic/%25CSP.Documatic.cls It should be available Check if the /csp/documatic/ is enabled on your instance

Alexander Koblov · Jul 24, 2024 go to post

This line is suspicious:

Set request.HTTPVersion = "HTTP/2.0"

%Net.HttpRequest works only with HTTP 1.0, 1.1, and the server replies with HTTP/1.1.

So, try not to set HTTPVersion

Alexander Koblov · Jul 24, 2024 go to post

I'm glad that helped!

Olivier -- for sure -- please use the Feedback button in the documentation. The documentation team is very good in making the documentation better

Alexander Koblov · Jul 23, 2024 go to post

Please double check the version. 2023.1.3 should have the fix for this case https://docs.intersystems.com/iris20231/csp/docbook/changes/index.html#CSP/ZEN_DP-423647

DP-423647: Process CORS request when handling requests with JWT Tokens

Category: CSP / ZEN
Platforms: All
Version: 2023.1.3

This change ensures that any request that handles JWT tokens also correctly process CORS requests, when applicable.

Though status 500 is strange by itself. Try enabling ISCLOG and see if any error is logged there

Alexander Koblov · Jul 19, 2024 go to post

/api is active in the Web Gateway Does Apache forward /api to the Web Gateway? Do you have something like the following in httpd.conf

<Location /api/>
CSP On
</Location>
Alexander Koblov · Jul 17, 2024 go to post

There is a $System.Encryption.MD5HashStream() that does not read whole stream into the memory