LotusScript GetDocumentByURL not authenticating in scheduled agent
I have a LotusScript agent that works manually when run from the Notes client menu but fails when run as a scheduled agent on the server. The agent gets a web page using the GetDocumentByURL
method.
url$="http://example.com/notesdb.nsf/XAgent.xsp?documentId="+ Quotesdoc.Universalid +"&action=openDocument&login"
Print("url "+ url$)
Set doc = db.GetDocumentByURL(url$, 1, , , "username", "password")
Set rtitem = doc.GetFirstItem( "Body" )
body$ = rtitem.text
Print("status "+body$)
From the Notes client, the agent will authenticate and return a JSON object. But from a scheduled agent on the server, the authentication appears to fail as the response is 200, login failed.
The Web Retriever service is running, and the web.nsf db has a Cookies view, but the server log shows:
11/13/2018 07:07:36 PM AMgr: Agent ('Scheduled Agent' in 'mailmailer.nsf') printing: url http://example.com/notesdb.nsf/XAgent.xsp?documentId=61D46EE586868DBA85256C84005414B9&action=openDocument&login
11/13/2018 07:07:36 PM WEB(3): Unable to find design note for view 'Cookies': Entry not found in index
11/13/2018 07:07:36 PM AMgr: Agent ('Scheduled Agent' in 'mailmailer.nsf') printing: status Forgot password?
My guess is that the SessionID is not being passed via a cookie and the authentication is failing. Ideas?
http lotus-notes lotus-domino lotusscript
add a comment |
I have a LotusScript agent that works manually when run from the Notes client menu but fails when run as a scheduled agent on the server. The agent gets a web page using the GetDocumentByURL
method.
url$="http://example.com/notesdb.nsf/XAgent.xsp?documentId="+ Quotesdoc.Universalid +"&action=openDocument&login"
Print("url "+ url$)
Set doc = db.GetDocumentByURL(url$, 1, , , "username", "password")
Set rtitem = doc.GetFirstItem( "Body" )
body$ = rtitem.text
Print("status "+body$)
From the Notes client, the agent will authenticate and return a JSON object. But from a scheduled agent on the server, the authentication appears to fail as the response is 200, login failed.
The Web Retriever service is running, and the web.nsf db has a Cookies view, but the server log shows:
11/13/2018 07:07:36 PM AMgr: Agent ('Scheduled Agent' in 'mailmailer.nsf') printing: url http://example.com/notesdb.nsf/XAgent.xsp?documentId=61D46EE586868DBA85256C84005414B9&action=openDocument&login
11/13/2018 07:07:36 PM WEB(3): Unable to find design note for view 'Cookies': Entry not found in index
11/13/2018 07:07:36 PM AMgr: Agent ('Scheduled Agent' in 'mailmailer.nsf') printing: status Forgot password?
My guess is that the SessionID is not being passed via a cookie and the authentication is failing. Ideas?
http lotus-notes lotus-domino lotusscript
Do you have a view "Cookies" in your DB object ?
– umeli
Nov 14 '18 at 8:01
1
this method imho is built to be used in context with the Server Web Navigator database. Is the Web Navigator retrieval process running on your machine? - also I find it curious that your URL ends with "&login"; this usually pops up a login dialog or login page depending on the way you set up your Domino server
– Lothar Mueller
Nov 14 '18 at 12:42
I don't think I've seen getDocumentByURL used in 15 years. If you're running on Windows, is there a reason you're going that way rather than using XmlHttpRequest instead?
– Richard Schwartz
Nov 14 '18 at 19:33
Or for that matter, why not access the database using the regular Notes classes? That way signatures and authentication and such are already handled.
– Duston
Nov 14 '18 at 20:29
I'm calling an XPage to run a java program that will not work with LS2J in LotusScript. I've decided to go with stackoverflow.com/questions/12719192/… using MSXML2.ServerXMLHTTP
– teleman
Nov 14 '18 at 21:11
add a comment |
I have a LotusScript agent that works manually when run from the Notes client menu but fails when run as a scheduled agent on the server. The agent gets a web page using the GetDocumentByURL
method.
url$="http://example.com/notesdb.nsf/XAgent.xsp?documentId="+ Quotesdoc.Universalid +"&action=openDocument&login"
Print("url "+ url$)
Set doc = db.GetDocumentByURL(url$, 1, , , "username", "password")
Set rtitem = doc.GetFirstItem( "Body" )
body$ = rtitem.text
Print("status "+body$)
From the Notes client, the agent will authenticate and return a JSON object. But from a scheduled agent on the server, the authentication appears to fail as the response is 200, login failed.
The Web Retriever service is running, and the web.nsf db has a Cookies view, but the server log shows:
11/13/2018 07:07:36 PM AMgr: Agent ('Scheduled Agent' in 'mailmailer.nsf') printing: url http://example.com/notesdb.nsf/XAgent.xsp?documentId=61D46EE586868DBA85256C84005414B9&action=openDocument&login
11/13/2018 07:07:36 PM WEB(3): Unable to find design note for view 'Cookies': Entry not found in index
11/13/2018 07:07:36 PM AMgr: Agent ('Scheduled Agent' in 'mailmailer.nsf') printing: status Forgot password?
My guess is that the SessionID is not being passed via a cookie and the authentication is failing. Ideas?
http lotus-notes lotus-domino lotusscript
I have a LotusScript agent that works manually when run from the Notes client menu but fails when run as a scheduled agent on the server. The agent gets a web page using the GetDocumentByURL
method.
url$="http://example.com/notesdb.nsf/XAgent.xsp?documentId="+ Quotesdoc.Universalid +"&action=openDocument&login"
Print("url "+ url$)
Set doc = db.GetDocumentByURL(url$, 1, , , "username", "password")
Set rtitem = doc.GetFirstItem( "Body" )
body$ = rtitem.text
Print("status "+body$)
From the Notes client, the agent will authenticate and return a JSON object. But from a scheduled agent on the server, the authentication appears to fail as the response is 200, login failed.
The Web Retriever service is running, and the web.nsf db has a Cookies view, but the server log shows:
11/13/2018 07:07:36 PM AMgr: Agent ('Scheduled Agent' in 'mailmailer.nsf') printing: url http://example.com/notesdb.nsf/XAgent.xsp?documentId=61D46EE586868DBA85256C84005414B9&action=openDocument&login
11/13/2018 07:07:36 PM WEB(3): Unable to find design note for view 'Cookies': Entry not found in index
11/13/2018 07:07:36 PM AMgr: Agent ('Scheduled Agent' in 'mailmailer.nsf') printing: status Forgot password?
My guess is that the SessionID is not being passed via a cookie and the authentication is failing. Ideas?
http lotus-notes lotus-domino lotusscript
http lotus-notes lotus-domino lotusscript
asked Nov 14 '18 at 0:33
telemanteleman
530312
530312
Do you have a view "Cookies" in your DB object ?
– umeli
Nov 14 '18 at 8:01
1
this method imho is built to be used in context with the Server Web Navigator database. Is the Web Navigator retrieval process running on your machine? - also I find it curious that your URL ends with "&login"; this usually pops up a login dialog or login page depending on the way you set up your Domino server
– Lothar Mueller
Nov 14 '18 at 12:42
I don't think I've seen getDocumentByURL used in 15 years. If you're running on Windows, is there a reason you're going that way rather than using XmlHttpRequest instead?
– Richard Schwartz
Nov 14 '18 at 19:33
Or for that matter, why not access the database using the regular Notes classes? That way signatures and authentication and such are already handled.
– Duston
Nov 14 '18 at 20:29
I'm calling an XPage to run a java program that will not work with LS2J in LotusScript. I've decided to go with stackoverflow.com/questions/12719192/… using MSXML2.ServerXMLHTTP
– teleman
Nov 14 '18 at 21:11
add a comment |
Do you have a view "Cookies" in your DB object ?
– umeli
Nov 14 '18 at 8:01
1
this method imho is built to be used in context with the Server Web Navigator database. Is the Web Navigator retrieval process running on your machine? - also I find it curious that your URL ends with "&login"; this usually pops up a login dialog or login page depending on the way you set up your Domino server
– Lothar Mueller
Nov 14 '18 at 12:42
I don't think I've seen getDocumentByURL used in 15 years. If you're running on Windows, is there a reason you're going that way rather than using XmlHttpRequest instead?
– Richard Schwartz
Nov 14 '18 at 19:33
Or for that matter, why not access the database using the regular Notes classes? That way signatures and authentication and such are already handled.
– Duston
Nov 14 '18 at 20:29
I'm calling an XPage to run a java program that will not work with LS2J in LotusScript. I've decided to go with stackoverflow.com/questions/12719192/… using MSXML2.ServerXMLHTTP
– teleman
Nov 14 '18 at 21:11
Do you have a view "Cookies" in your DB object ?
– umeli
Nov 14 '18 at 8:01
Do you have a view "Cookies" in your DB object ?
– umeli
Nov 14 '18 at 8:01
1
1
this method imho is built to be used in context with the Server Web Navigator database. Is the Web Navigator retrieval process running on your machine? - also I find it curious that your URL ends with "&login"; this usually pops up a login dialog or login page depending on the way you set up your Domino server
– Lothar Mueller
Nov 14 '18 at 12:42
this method imho is built to be used in context with the Server Web Navigator database. Is the Web Navigator retrieval process running on your machine? - also I find it curious that your URL ends with "&login"; this usually pops up a login dialog or login page depending on the way you set up your Domino server
– Lothar Mueller
Nov 14 '18 at 12:42
I don't think I've seen getDocumentByURL used in 15 years. If you're running on Windows, is there a reason you're going that way rather than using XmlHttpRequest instead?
– Richard Schwartz
Nov 14 '18 at 19:33
I don't think I've seen getDocumentByURL used in 15 years. If you're running on Windows, is there a reason you're going that way rather than using XmlHttpRequest instead?
– Richard Schwartz
Nov 14 '18 at 19:33
Or for that matter, why not access the database using the regular Notes classes? That way signatures and authentication and such are already handled.
– Duston
Nov 14 '18 at 20:29
Or for that matter, why not access the database using the regular Notes classes? That way signatures and authentication and such are already handled.
– Duston
Nov 14 '18 at 20:29
I'm calling an XPage to run a java program that will not work with LS2J in LotusScript. I've decided to go with stackoverflow.com/questions/12719192/… using MSXML2.ServerXMLHTTP
– teleman
Nov 14 '18 at 21:11
I'm calling an XPage to run a java program that will not work with LS2J in LotusScript. I've decided to go with stackoverflow.com/questions/12719192/… using MSXML2.ServerXMLHTTP
– teleman
Nov 14 '18 at 21:11
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53291482%2flotusscript-getdocumentbyurl-not-authenticating-in-scheduled-agent%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53291482%2flotusscript-getdocumentbyurl-not-authenticating-in-scheduled-agent%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Do you have a view "Cookies" in your DB object ?
– umeli
Nov 14 '18 at 8:01
1
this method imho is built to be used in context with the Server Web Navigator database. Is the Web Navigator retrieval process running on your machine? - also I find it curious that your URL ends with "&login"; this usually pops up a login dialog or login page depending on the way you set up your Domino server
– Lothar Mueller
Nov 14 '18 at 12:42
I don't think I've seen getDocumentByURL used in 15 years. If you're running on Windows, is there a reason you're going that way rather than using XmlHttpRequest instead?
– Richard Schwartz
Nov 14 '18 at 19:33
Or for that matter, why not access the database using the regular Notes classes? That way signatures and authentication and such are already handled.
– Duston
Nov 14 '18 at 20:29
I'm calling an XPage to run a java program that will not work with LS2J in LotusScript. I've decided to go with stackoverflow.com/questions/12719192/… using MSXML2.ServerXMLHTTP
– teleman
Nov 14 '18 at 21:11