BookmarkSubscribeRSS Feed
AMK
Fluorite | Level 6 AMK
Fluorite | Level 6

Hi,

 

I have a webpage that contains a html form. Previously (in SAS 9.1) when a user opened the webpage, a drop-down menu was populated with live data from SAS. This was done by calling a stored process inline via a XmlHttpRequest and then populating the drop-down with the response from the stored process.

 

This worked fine for many years, however since migrating from SAS 9.1 to SAS 9.4, the drop-down menu gets populated, but it seems to get populated with the html from the SAS Logon Manager page, so I think the stored process server is looking for credentials.

 

I am passing default credentials (&_username=xxxxxxx&_password=yyyyyyyyy) that work fine if I just paste the URL into a web browser, but don't seem to work when I do the xmlhttprequest.

 

Here's a snippet of the javascript I'm using:

 

xmlhttp = new XMLHttpRequest();

stringToSend = new String();
stringToSend = "http://myserver.example.com:7980/SASStoredProcess/do?_program=/STP/get_data&_username=xxxxxxx&_password=yyyyyy";

xmlhttp.open("GET", stringToSend, true);
xmlhttp.send();

 

 

Has anyone seen this before? Can you suggest a way around it?

 

Thanks,

Adrian.

2 REPLIES 2
alexal
SAS Employee

@AMK,

 

Basic HTTP authentication for a SAS® Stored Process might not work after you migrate to SAS® 9.4. You can avoid this problem by using the following workaround:


On the Plug-ins tab in SAS® Management Console, select Application Management ► Configuration Manager ► SAS Application Infrastructure ► Stored Process Web App 9.4 ► Properties. On the Advanced tab in the properties dialog box, add the property name and value:

 

  • For Property Name, enter App.AcceptDirectCredentials.
  • For Property Value, enter true.

 

Save the changes.
Restart your application web server to activate the change.

 

http://support.sas.com/kb/52/961.html

boemskats
Lapis Lazuli | Level 10

@alexal I did not know about this! Thanks, would have come in useful a couple of times this year.

 

@AMK if you're looking to build any more AJAX-based apps, we manage a library for this that handles SASLogon redirection & data transmission. You might find it interesting.

 

Nik

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1047 views
  • 3 likes
  • 3 in conversation