Anfang des Inhaltsbereichs

Vorgehensweisen SAP Login Form Dokument im Navigationsbaum lokalisieren

This ASP .NET web form can be added to your project with Project Ū Add New Item. Look for the Web Project Items and select SAP Login Form.

For technical reasons it is better to leave the name of this form as SAPLogin1.aspx. The design of this form can be changed in the designer to suit your requirements. The purpose of this form is to provide SAP user name and password authentication for ASP .NET applications built with the connector.

[C#]

Public class SAPLogin1.aspx : System.Web.UI.Page

 

Remarks

When you select Save, a cookie is written to the hard disk with a name like user@server.txt

The login information is stored in an encrypted format in the ASP .NET cookie. When the user logs on the next time, the ASP .NET application will look in this cookie to retrieve the logon information for the SAP system.

The SAPLogin form has a built-in destination component to store connection information and when the login information is entered it will be stored here as well. Default connection settings are stored here based on what values were used in the proxy generation wizard.

The destination component uses the web config file to store connection information as dynamic properties. A blue icon next to the property in the Destination control object shows that the property is synchronized with the web config file.

We recommend that the main page of your application be called default.aspx as this is the default redirect for the SAP Login page. For technical reasons, the SAP Login page should always be called SAPLogin1.aspx. It is possible to change this but you must then also update the web.config file Authentication mode section which by default points to a loginUrl of SAPLogin1.aspx.

After successfully logging in for the first time on this page, the login form does a redirect back to the original page (for example, default.aspx). If the login page is called directly instead of as a redirect

If reached without original form then it navigates to default.aspx. Therefore, you should have a default.aspx page in your application.

When the SAPLogin1.aspx form is called, it executes the following logic:

First, it looks in the session state and cookies to find out if this session connection information is already known. If so, it tries to open SAP connection using the static openConnection method. If this is not successful it tells the ASP .NET provider itīs not working by raising an exception.

After successful login it stores the active connection object in session state with special name. What is stored in the session state is the actual connection.

If you selected the Save option, a cookie is stored to your hard disk that has encrypted complete connection string.

In this way, the SAP Login form provides an alternative connection pooling and single sign-on where many distinct SAP accounts are hitting the site.

When multiple sessions use the same user ID, the connector provides a dedicated connection pool object.

 

Ende des Inhaltsbereichs