cancel
Showing results for 
Search instead for 
Did you mean: 

Enable SSO for ASP.net in Portal 6.0

Former Member
0 Kudos

Hello, I follow the instructions for this article:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/enabling single sign-on for asp.net applications in enterprise portal 6.article

but when I test the application I get the message "user not authenticated", the cookie is valid, but I can't obtain the user id with the User.Identity object.

Any idea about this I only need to obtain the logon user id. (I'm not using the PDK for .net)

Regards

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Finally I can get the user logon ID with this code

string cookieString = Request.Cookies["MYSAPSSO2"].Value;

cookieString = HttpUtility.UrlDecode(cookieString);

MySapSso2Ticket ticket = new MySapSso2Ticket("verify.pse", cookieString);

MySAPSso2Identity objUsr = new MySAPSso2Identity(ticket, cookieString);

Response.Write objUser.Name;

I'll appreciate your comments if exists another way to do this.

Regards

reiner_hille-doering
Active Contributor
0 Kudos

The authentication module does a very similar job internally. Could it be the case the the ticket could not be validated? Check what ticket.Verify returns. If this fails, either the cookie, the Verify.pse or your installation (SAPSECU.DLL, or similar) are wrong.

Former Member
0 Kudos

The Verify method returns false, In the marketplace I only find sapcrypto.dll, using the path described in the document, I download it and put in the windows\system32 path.

reiner_hille-doering
Active Contributor
0 Kudos

You definitely need sapsecu.dll with the mentioned size. Depending on the country you live in it might be difficult to get it.

Former Member
0 Kudos

Why depends of the country? Is not possible to obtain by email or download it?

By the way, i live in Mexico.

Regards

reiner_hille-doering
Active Contributor
0 Kudos

SAPSECU.DLL contains strong cryptographic algorithms. Some countries don't allow to import/export/use these technologies.