Asp. NET collaborative application development process for integration into the Trsids authentication server

Source: Internet
Author: User
Tags log4net

    1. Develop actor Collaboration Module (refer to TRSIDS4.0 Collaboration Application Integration Manual "ASP.")
    • Asp. NET collaborative applications before integration into IDs, the actor class needs to be developed to implement the callback interface methods defined in the callback interface of the collaboration application, such as local login, exit, user information synchronization, etc. The completion of the Sso.actor class with IDS requires inheriting and overriding the various methods of implementing the abstract TRS.IDS.DotNetAgent.Actor.AbstractApplicationActor, and the Actor development project must refer to TRSIDSASPDOTNETAGENT.D ll.

Overwrite the above method according to the actual situation, after determining the error, generate a CoApplication.dll, and put it into the Trsidsagent folder,

    • Configuring the Trsidsagent.ini File

What to modify: There are 2 parts of the file that need to be handled and configured according to the actual situation

1) configuration of the IDs part of this property

# #TRSIDS身份服务器后台SSLServer的主机名 (the IP of the machine where you installed the IDS system)

trsidshost=172.18.84.119

# #TRSIDS身份服务器后台通信的端口, Default is 2005 (corresponding to the port of the IDS system at the time of installation)

trsidsport=2005

2) Collaborative application (number graph) attribute "Coapplication"

# #协作应用名. Required and must be consistent with the name of the collaboration application registered on the identity server (IDs background app names are the same).               

Coapplicationname=apabi

# #是否允许匿名访问, y is allowed, n is not allowed

Isallowanonymity=n

# #协作应用用户注销后调转的页面链接,

such as coappdefaulturl=http://192.9.200.134/aspnetdemo/index.aspx//

Coappdefaulturl =http://172.18.84.61:8011/usp

# #协作应用的根URL, including context,

such as Coapprooturl=http://127.0.0.1/aspnetdemo

Coapprooturl = Http://172.18.84.61:8011/usp

Loginaction.uri=http://172.18.84.61:8011/usp/trsidsagent/urlvalidation.aspx

    • Deploy the agent that installs TRS IDs

(1) Copy the Trsidsagent folder from the TRS IDS ASP. NET Agent installation media to the root directory of the collaboration application.

(2) Copy the Log4net.dll and TRSIDSAspDotNetAgent.dll from the Trsidsagent subdirectory in the TRS IDS ASP. NET Agent installation media to the bin directory of the collaboration application.

(3) If your project references Log4net and the version is higher than the log4net.dll in the Trsidsagent subdirectory, you need to replace the Log4net.dll in the Trsidsagent subdirectory with the original, adding references to your project

(4) Place the previously generated CoApplication.dll file in the Trsidsagent folder.

  • Configuring the Web. config file

    Because IIS supports two pipe modes from the 7.0 version: One is the latest integrated pipeline mode provided by IIS 7.0 , and the other is classic pipe mode, Classic pipeline mode is provided by previous versions of IIS .

    Therefore, the trsids asp . NET Agent starts with the 4.0 version and not only supports The classic managed pipeline pattern of the previous version of the 4.0 version. It also supports integrated managed pipeline mode.

    (1)Classic managed pipeline mode

    Under the <system.web></system.web> node, add the following

    <system.web>

    <add type= "TRS. Ids. Dotnetagent.trsidshttpmodule,trsidsaspdotnetagent "name=" Trsidshttpmodule "/>

    </system.web>

    If the

    <add type= "TRS. Ids. Dotnetagent.trsidshttpmodule,trsidsaspdotnetagent "name=" Trsidshttpmodule "/>

    (2)Integrated managed pipeline mode

    Under the <system.web></system.web> node, set the impersonate parameter to false. as follows:

    <system.web>

    <identity impersonate= "false"/>

    </system.web>

    Under the <system.webServer> </system.webServer> node, add the following <modules> </modules> child nodes. As follows:

    <system.webServer>

    <modules>

    <add type= "TRS. Ids. Dotnetagent.trsidshttpmodule,trsidsaspdotnetagent "name=" Trsidshttpmodule "/>

    </modules>

    </system.webServer>

    Note: If you change from Classic mode to Integrated mode, you will need to delete the

    • Configuration Log Output file

Log4net.config control TRS IDS ASP. NET Agent log output format. You only need to configure the <file value= "log output full path, including the log file name"/> node value, which is used to indicate the path to run the log output. Such as:

<file value= "D:\asp.netdemo\TRSIDSAgent\log4net.log"/>

If configured as <file value= "Log4net.log"/> is the default in the Collaboration app root directory. ( note the path of the file here according to the actual situation to do the corresponding processing, otherwise, the generated log will appear in your unexpected place PS jokes )

2.IDS System Background Collaboration application configuration

Sign up for collaborative apps

For security reasons, only collaboration applications registered on TRS IDs will be able to use the services of TRS IDs.

The registration process is described in the TRSIDS4.0 Administrator's Manual for adding collaborative apps.

Attention:

1, ASP. NET Collaboration App session name is generally set to: Asp.net_sessionid.

2, ASP. NET Collaboration app, theIDS request URL must be specified as

Apply the root directory/trsidsagent/urlvalidation.aspx

such as: Http://192.9.200.249/demo/TRSIDSAgent/URLValidation.aspx.

In addition: the correct integration to achieve single sign-on, you need to correctly configure the SSO URL in the IDs management console.

The SSO URL must be configured as a URL that matches the actual TRS IDs access address, otherwise all applications will not be able to implement SSO. Configuration method is: Click on the IDS system menu, then click Settings, refer to the page SSO URL configuration instructions, the system will be added by default after the configuration/loginservlet.

Asp. NET collaborative application development process for integration into the Trsids authentication server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.