Hi, Community!
Suppose If you develop a client js application which works with Caché server via REST API (CSP Gateway).
What are the options for Authentication and working with Caché session then?
Caché Server Pages (CSP) is both an architecture and toolset used to build an interactive web applications with the InterSystems Data Platform.
Hi, Community!
Suppose If you develop a client js application which works with Caché server via REST API (CSP Gateway).
What are the options for Authentication and working with Caché session then?
Sometimes you can face the situation when you did update the web app on Caché server but you cannot get the newest version of the app in a browser.
Here are couple recipes which help me to solve it. From simplest to more sophisticated and not obvious.
1. Refresh page in a browser
In Chrome it is Ctrl+R or 'Refresh' button. Obvious, but helpful.
2. Hard reset in a browser
If you are in Chrome, open Developer tools

and then right click on Refresh button. Less obvious and very helpful sometimes.

3. Clear cache in CSP Gateway
If 1 and 2 don't work for you, try to flush the CSP Gateway cache.
There seems to be a problem with the sync/save. If I open a CSP file, add a CRLF to end of it and save the file I get a sync conflict. This can't be right.
To make matters worse I can then select to the local version and will then end up in an infinite loop where the CSP import/compiler keeps adding more and more CRLFs to the file.
You can see an example here: https://youtu.be/EY-_FA-kOpI
If the session is in inactive state for some time. It should be logging out automatically. Is there any settings for that??
I am sending a file in Postman and receiving a status 200OK. but i need to get the response in the body too. I have Implemented the class %CSP.REST to get the %request and %response. There is no default method to invoke and post the content via %Response class. Can any one suggest me the sample code for that.
Hi everyone! My company has a Zen ERP application with CSP delegated authentication. Now, we're developing a separated BI application, using Angular, which consumes DeepSee REST API services. Both applications access the same Caché database.
How to implement single sign-on strategy in order to allow an already authenticated ERP user to access DeepSee REST services? Has anyone already implemented something like that?
Thanks in advanced.
I have an application that as part of the registration process is using reCaptcha to provide a captcha. The issue is that service is served from Google and is unavailable in certain countries, namely China. I've been researching this some and believe it's possible to proxy the requests to the Google CDN to avoid the Chinese firewall ban on Google URLs, however I'm not quite sure how to do this in CSP.
Does anyone have suggestions on how to solve this, either with a technical solution or an alternative service I can fall back to?
An example would be greatly appreciated.
Thanks
Hi All,
I need some clarification on web service (Soap Service). For each Soap request, system consuming 1 license and it is not releasing until CSP session timeout and extra grace period 5.10 minutes(310 seconds).
Due to this, at some time license consumption is full.
If i use with Login credential (i.e password authenticated web service), it consumes one license for 25 connections(request).
But i need to use it as anonymous user(Unauthenticated).
Please advice.
Thanks,
Sabarinathan M
Hi,
We are having a problem where sometimes a websocket connection started from a CSP page does not share the same SessionId as the CSP page itself. We are also using ECP and can see that both sessions are often even on different application servers.
Hi all-
We used to have this Java applet in our CSP page to "print all" and "download all" PDF medical reports. We want this applet so that the user won't have to open each PDF in the browser just to print it.
But now most browsers do not support Java applets anymore due to security concerns, so that Java application is down. We tried to migrate to Java Web Start but don't know how to invoke the JNLP file from the CSP page. I am new to Cache so any help would be greatly appreciated.
Also, is there an easier solution to this print all problem?
Hello,
I am working in a csp application where the user can configure a TCPS Service in a guide like manor.
So I want to be able to present a html <select> element, the values / text I want to present in this control should be the ID field from Security.SSLConfigs in the %SYS namespace.
How would I go about doing this? Can this be done?
Best regards,
Magnus
I'm looking at adding multilingual support to a couple of open source projects I'm working on. The solutions are already developed in CSP so I am not looking for alternative approaches.
I'm wondering what would be the best approach for CSP and separate JavaScript files.
Initially I was wondering if I should bake the default system language text at compile time, or provide the end user with a language selection option at run time.
I came across $$$TEXT reading the docs...
https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.
Hi!
I am not system admin. But it used to be very simple to install CSP Gateway on an apache system on Linux with Apache installed. I used to run the CSP Gateway installation program and after it was done, all I had to do was fine tune some configurations on CSP Gateway portal on http://<ip>/csp/bin/Systems/Module.cxw and I was up and running.
I worked through the Community for proposals to provide end users
in an easy way with data formatted as EXCEL sheet.
There is a great article Tips & Tricks - SQL to Excel
there's an important message embedded: "EXCEL can interpret HTML tables and display them as usual"
Where's the light weight export to EXCEL ?
Good old CSP is well equipped to produce HTML tables accepted from EXCEL as input.
With modern Browsers you don't even need <head>and <body> tags.
So the required code around your SQL result set is really slim.
And you are free to add any formatting you need either by HTML or in SQL.
Hello,
I have a DB server (ser-app-db) where cache is installed as server.
I have a Web server (ser-app-w) where cache is installed as web server and configured as CSP gateway.
I followed the configuration guide (https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KE…) and ser-app-w perfectly display the CSP and CLS pages.
But that's not working for my REST service, for exemple with the REST sample:
http://ser-app-db/csp/samples/docserver/request(GET): work and show the request
http://ser-app-w/csp/samples/docserver/request(GET): return a 404.
Hello All,
While extracting the huge amount of data in the cache through the Zen page, file extraction timing is greater than session time out. How to increase the session timing in Zen/CSP gateway or If any other solution would be appreciated. Please advise.
Hi,
I'm trying to use WebSocket for my application. I am trying to get the example in this link (http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…) to work. However, I keep getting the error "CSP application closed the connection before sending a complete response". Does anyone know why?
Hi, folks!
Suppose I have a CSP app, which provides some service.
And the code of my App knows the name of the CSP App in form: /myappname
How can I programmatically obtain the URL for CSP apps to send the full qualified link to the users(e.g. via email) of my app?
Hi,
I only use Caché and CSP, I am making a simple request in CSP page with #call method, and I have to define a callback of this #call method, can I do this?
This is my simple request in CSP page (javascript):
PainelBordoResource.prototype.obterIndicador = function(requisicaoParametros) {
let retorno = #call(painelbordo.PainelBordoResource.obterIndicador(angular.toJson(requisicaoParametros)))#;
return retorno;
};
Hi!
In the below code for cls with csp i have passed the output to a global but after i give the content in the text box it is getting stored, but when i check the global it is empty.
{
ClassMethod OnPage() As %Status
{
&html<<html>
<head>
</head>
<script type="text/javascript">
function EmpTable(){
var EmployeeName=document.getElementById("ename").value;
var EmployeeNumber=document.getElementById("enumber").value;
var EmployeeDOB=document.getElementById("edob").value;
var EmployeeDOJ=document.getElementById("edoj").
In our last lesson, we implemented a linkage to our WidgetAccessory class, and debugged some errors we encountered along the way. We now have our data being returned by REST, but what if we want to update or add new data to our application?
So far we have only used HTTP GET commands with our REST Services, we now have to implement PUT (which roughly corresponds to an Update) and a POST (which roughly corresponds to a Create. Author's note: there is a lot of writing online about why this statement isn't entirely correct, I'm not going to go into the detail here).
or "Things are going to break"
We left our application over the weekend, secure in the knowledge that it was returning data from our primary persistent class, User.Widget. However, Widgets Direct are the premier supplier of both Widgets AND Widget Accessories, so we should really start working on adding these Accessories to our application.
We should do some housekeeping first though. Our Page Controlller code is currently sitting in the widgetmaster.js file.
I'd like to include a .inc file in a tag-based CSP page. The include file defines a bunch of macros that I want to use in CSP runtime expressions. Is there any way to do this?
From a browser, an XMLHttpRequest to a CSP page on a different server will obviously hit the CORS security check.
To get around this I can set the Access-Control-Allow-Origin header on that particular CSP class.
However, setting any request headers on the XMLHttpRequest object will trigger a pre-flight OPTIONS request.
This OPTIONS request is not handled by the target CSP page and the Access-Control-Allow-Origin header is never set, triggering a CORS error.
I can see in the new REST class that it can get a handle on the OPTIONS request but standard CSP pages don't seem to get them.
Hi everyone,
This is:
Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2016.2 (Build 736U) Fri Sep 30 2016 12:25:56 EDT
The server is on RedHat Linux while the browser is running on Windows (Firefox).
I am helping a partner build a complex modern HTML5 web application that talks with Caché using REST calls. They have been using %CSP.REST very successfully. Security works great as well.
Some time ago, I had defined the parameter CONVERTINPUTSTREAM = 1 on their %CSP.REST classes and that seemed to work.
Using the CSP Gateway is there a way for an web application to mimics MLLP sockets connection? I have a requirement for no PHI in the DMZ and I wanted to see if there is a way to install the CSP Gateway in the DMZ to received inbound/outbound messages where the DB is in the protected zone.
Hi All,
We are using the InterSystems cache 5.02
We having 80 license unit but don't the reason 50 unit have been consumed (CSP unit)
This happen because of this page ran frequently "/apps/docmatic/%CSP.SysConnection.cls"
Can anyone explain why this page ran frequently and consume license?
Thanks,
Sansa.
We finished our last lesson with our Widgets Direct page iterating over a list of widgets, displaying an ID and a Name value. While we have been able to achieve this with only a small amount of coding, the page itself is not the most visually appealing place to be. The AngularJS framework is providing a powerful Model-View-Controller framework for our structure and logic, but it does not implement anything that will provide a nice UI experience. For that we need to implement a UI toolkit.
WebSockets look to be supported reasonably well in Cache. I have yet to use them in production so I am wondering how well it has worked for other developers.
In particular what happens when the browser does not support WebSockets, or when a firewall blocks the connection.
Have you had to write your own long polling fall-back?
I've read the documentation and found this interesting article...
https://community.intersystems.com/post/asynchronous-websockets-quick-tutorial
but no mention of long polling fall-backs that I can see.
Having tinkered around with sockjs and
At the end of our last lesson, we ended with our page displaying a nice (but garish) Angular Material Toolbar, and our Widget data displaying in a list of Material cards. Our page feels a bit static, and we already know that the large number of Widgets that we will be dealing with will not be especially usable on a static list. What can we do to help?
A filtering function would be very helpful, so let's add a text input to the top of the page. We will bind this to a variable in the $scope - widgetFilterText so that Angular has access to the value we type in.