Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8456711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:37:01+00:00 2026-06-10T12:37:01+00:00

Reading through an old blog post on SAP’s community network, I found some instructions

  • 0

Reading through an old blog post on SAP’s community network, I found some instructions for parsing out a username and System ID for a MYSAPSSO2 logon token.

I’m curious if anyone has stumbled across a .NET library for getting this information without the need to write my own.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T12:37:02+00:00Added an answer on June 10, 2026 at 12:37 pm

    Note: this method fails some times depending upon the format of ticket string.

    void SetUserNameFromTicket1(string Ticket)
    {
        this.UserName = string.Empty;
        try
        {
            // Decoded Ticket "1100 \0portal:USERNAME1(char65533)\0basicauthentication\0\nUSERNAME2\0000\..."
            string TicketData = this.base64Decode(ticket);
            MessageBox.Show(strTicketData);
        }
        catch (Exception ex)
        {
            mobjLog.Debug("Exception in GetUserNameFromTicket: " + ex.Message);
        }
    }
    private string base64Decode(string data)
    {
        string result = string.Empty;
        try
        {
            data = System.Web.HttpUtility.UrlDecode(data); 
            System.Text.UTF8Encoding encoder = new System.Text.UTF8Encoding();
            System.Text.Decoder utf8Decode = encoder.GetDecoder();
            // if base64 were to be embedded in a URL, the use of the forward slash would be interpreted as a URL divider rather than
            // part of the base64. As a result, other characters such as dash (-), underscore (_), period
            // (.), colon (:) and exclamation point (!) are used in some implementations.
            // http://www.sans.org/reading_room/whitepapers/auditing/base64-pwned_33759
            // base64-pwned_33759.pdf
            data = data.Replace('-', '/');
            data = data.Replace('_', '/');
            data = data.Replace('.', '/');
            data = data.Replace(':', '/');
            data = data.Replace('!', '/');
            byte[] todecode_byte = Convert.FromBase64String(data);
            int charCount = utf8Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length);
            char[] decoded_char = new char[charCount];
            utf8Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0);
            result = new String(decoded_char);
        }
        catch (Exception ex)
        {
            mobjLog.Debug("Error in base64Decode" + ex.Message);
        }
        return result;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm reading through some old code at work, and have noticed that there are
I am assigned some old code and when I was reading through it, I
Reading through some of the questions here, the general concensus seems to be that
Reading through documentation, I found following: 1.9.1 1.8.4 1.8.2 A version of 1.8.2 select
Was reading through some text and playing around with attempting to write past the
i've been reading through the linq to xml documentation in msdn and some other
I reading some old ScottGu's blogs on Linq2SQL. Now I'm doing the SPROC part.
I'm reading through some MSDN example code on Composite controls and finding that there
I was reading through some of effective c++ and I realized I may be
Reading through an old C++ Journal I had, I noticed something. One of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.