on 2020 Jan 09 11:21 PM
Please tell me the HTTP folder under Sybase installation directory, which is the function demonstration file of opening CORS,
The help document only describes the support, but there is no explanation on how to open it http://dcx.sap.com/index.html#sqla170/en/html/b28cc1d4c5df4eb6a2d2fe4aa269955d.html
I run dbsrv17.exe - n testweb - XS HTTP (Port = 8098) demo.db (17.0.10.5963)
Create a web service create service "test" type 'JSON' authorization off user "DBA" URL on as call "get_no" (: no);
Visit the local webpage http://127.0.0.1:8098/test? No = 201140017
The web page shows the JSON page
ALTER PROCEDURE "DBA"."get_no"(IN no varchar(20) )
BEGIN
CALL dbo.sa_set_http_header('access-control-allow-headers','Authorization, Content-Type, Depth, User-Agent, X-File-Size, X-Requested-With, X-Requested-By, If-Modified-Since, X-File-Name, X-File-Type, Cache-Control, Origin');
CALL dbo.sa_set_http_header('access-control-allow-methods','GET, POST, OPTIONS, PUT, DELETE');
CALL dbo.sa_set_http_header( 'Access-Control-Allow-Origin',' *' );
CALL dbo.sa_set_http_header('access-control-expose-headers','Authorization');
call sa_set_http_header( 'Content-Type', 'text/html' );
select * from trans where trans_num=no
end
————
The help document only describes the support, but there is no explanation on how to open it:
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:50680' is therefore not allowed access. The response had HTTP status code 404.
2.Is this related to the options option?
3 . Request URL:http://127.0.0.1:8098/test?get_no=9140017
Request Method:OPTIONS
Status Code:404 Not Found
Remote Address:127.0.0.1:8098
Referrer Policy:no-referrer-when-downgra
How should I deploy it! There are problems on the forum. Are there no successful deployment cases?
end at 2020-01-15
I finally found the problem It turns out it's in Ajax contentType: "multipart/form-data", It's OK to set it as this. Thank all the help people and the posts in the forum, ASA is a powerful database.
Request clarification before answering.
I finally found the problem
It turns out it's in Ajax
contentType: "multipart/form-data",
It's OK to set it as this. Thank all the help people and the posts in the forum,
ASA is a powerful database.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, if you have fully answerred your question, then please "accept" your answer (i.e. click on the check mark) to mark it as solved...
User | Count |
---|---|
54 | |
6 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.