Skip to Content
author's profile photo Former Member
Former Member

.Net on terminal server - saplogon.ini

If you run SAP through a windows Terminal Server, the SAP GUI uses the SAPLogon.Ini file in the terminal server windows directory but the .NET Connector reads the INI file from the users windows directory (under documents and settings).

This is a known issue with terminal server, which was designed to allow legacy applications to run (using the now obsolete mechanism of using an INI file in a Windows application).

Quite frankly I am surprised that SAP still use this antiquated feature and I am hoping for two possible workarounds

(a) Override the SAPDestination object so that it can be configured in a different way than reading the SAPLogon.INI

(b) Tell the SAPDestination to read the correct INI file

I have tried constructing the SAPConnection connect string directly, but it appears that the .NET Connector fundamentally requires a SAPDestination to be created.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Dec 17, 2004 at 12:54 PM

    I don't know how SAPGUI uses SAPLOGON.INI, but NCo calls standard Windows API GetPrivateProfileString and so on. I don't know details on how you could configure the beviour of the function in WTS, I at least remember that there are lot's of features how to control this function to support Registry-Mapping.

    You are right that INI-files are not the most up-to-date technolgy, but they are used by SAPLOGON for long time and we support it as conveniance.

    Of cause you can also use standard Destination (which doesn't do anything about SAPLOGON.INI) or use normal connections strings.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 17, 2004 at 03:05 PM

    Many thanks for your information. We will try to bypass the use of SAPLogon.INI by replicating the necessary information in our own application database. We may even try to query the SAPLogon.INI file directly ourselves. My only worry in the latter case is that SAP GUI seems to have gone through several versions recently and I wonder if it has consistently used the same method to read SAPLogon.INI

    As an aside, GetPrivateProfileString with no explicit path will look in the users Windows directory. I suspect that SAP GUI deliberately uses the windows terminal server windows directory. My only comment is that this should really be consistent in the .NET Connector implementation.

    Many regards

    Chris Brookes

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 17, 2004 at 04:39 PM

    Thanks. The issue is that once the SAPLogon.INI has been created the first time for a particular user, then it will never be over-ridden again.

    This means that as soon as another entry is added to the SAP GUI it will not cause all SAPLogon.INI files to be updated with the same information.

    Do not worry. This is a standard Windows Terminal Server issue and we can work around it. In terms of correcting the behaviour, I would say that the .NET Connector is at fault as this was supposed to be mimicking the behaviour of the SAP GUI.

    Many regards

    Chris Brookes.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.