CA Service Management

Displaying user IP on CA SDM form 

Mar 01, 2018 10:06 AM

Prerequests

- IIS7+;

- Advanced text editor and Basic JavaScript skills.

 

How it looks

I'm using welcome_banner.htmpl form to display ip-address right after user's name:

 

How it works

I have created simple ASP.NET script to get user's ip address and wrap it into JSON. Then fetch it using jQuery ajax and display on a form. I think there is a simple way to implement same tool using Apache Tomact but that's make sense for UNIX servers mostly.

 

Installation

1. Create dir and copy followed files into it:

  • index.aspx
  • index.aspx.cs
  • web.config

2. Add Virtual Directory to IIS Sites tree (ex: IpAddress):

3. Try it! Navigate to <site>/<virtaul_folder_name>/index.aspx, you should get your ip address in JSON format;

4. Place z_ip.htmpl in $NX_ROOT/site/mods/www/htmpl/default and:

- replace URL on line 14 with your own URL;

- redefine inline class/style on line 39;

5. Include your z_ip.htmpl in decided place:

Statistics
0 Favorited
3 Views
4 Files
0 Shares
6 Downloads
Attachment(s)
zip file
index.aspx.zip   422 B   1 version
Uploaded - May 29, 2019
zip file
index.aspx.cs.zip   500 B   1 version
Uploaded - May 29, 2019
zip file
web.config.zip   839 B   1 version
Uploaded - May 29, 2019
zip file
z_ip.htmpl.zip   668 B   1 version
Uploaded - May 29, 2019

Related Entries and Links

No Related Resource entered.