cancel
Showing results for 
Search instead for 
Did you mean: 

SAP logon ticket and .NET connector

Former Member
0 Kudos

Experts,

I have a windows application using .NET connector to call some RFCs. Now, I have to extend it so that it can use SAP Logon Ticket for SSO.

I have written code for logging on successfully once I have the SAP logon ticket string, using:

dest.MySAP_SSO2 = HttpUtility.UrlDecode(txtSAPLogonTicket);

My problem remains that I have to somehow get the SAP logon ticket string. Currently, I have used an IE control in my application where I let the user logon into EP. This generates the cookie MYSAPSSO2, which I use to logon.

Of course, I don't like this too much! What do you think is the best way for me to get this cookie string? Can I use an existing browser session to query this cookie OR should I use some part of PDK for it OR something else? (In case of PDK, can I use it in a winform?)

Please help..

Thanks a lot.

Accepted Solutions (0)

Answers (1)

Answers (1)

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Chalana,

you can retrieve the string for the SAP Logon Ticket from the Cookie Container of an http request.

I have described this in my white paper

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9bdcb279-0e01-0010-b5ac-ef7f99e4...

where I also refrence to a programming example

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5bc7e899-0e01-0010-cca9-84f45118...

If the portal is configured to use Windows Integrated Authentication you could leverage SSO for the application that uses the NCo.

Best regards,

Andre

Former Member
0 Kudos

Andre,

Thanks for the links. I had gone through these documents earlier and got some really useful tips from them. In fact, I tried the coding example of "Sample Application: SSO with a .NET-based Web Service Client using SAP Logon

Tickets" but could not make it work. Here's why:

1. SPNegoLoginModule is not configured on my system.

2. Your suggested workaround

request.Credentials = new NetworkCredential("username", "pw");

did not work for me. I am not exactly sure why but my TicketIssuer URL (also EP 6.0 welcome page) gives me a User ID and Password page. I don't think this page can accept credentials through the above statement.

3. If I do try the above workaround, I get an OK response but it contains only 2 cookies (I am expecting 4) and MYSAPSSO2 cookie is missing from it.

Please let me know if there is any other way.

Thanks again for all the help.