Demo

Top  Previous  Next

This C# asp.net demo is intended to help you learn how to authenticate securely against z/Scope Anywhere Server from an external application.

 

The demo Logon.aspx page is an authentication form that performs a Windows Logon. This page was designed to show how to authenticate to z/Scope Anywhere externally using username/password or apikey and having the authentication data encrypted through the Diffie Hellman Key Exchange method.

 

After authentication against z/Scope Anywhere, the application redirects to the Default.aspx page that has an IFrame pointing to z/Scope Anywhere URL.

 

 

 

The website demo is accessible from the Users documents folder, under the directory \zScope Anywhere Demos\IISAuth

In order to compile this application, you can use the Microsoft Visual C# Studio 2010 Express. Download it from here.

Open the application from the menu File-Open Web Site.

 

 

The web.config parameters:

 

username/apikey:

 

The external authentication is set to use username/password by default, but you can also change the web.config file to start using the username/apikey.

Once you set a proper "APIKEY" value, the application will start doing the external authentication with username/apikey.

 

   <add key="APIKEY" value="3884F316-3429-49A0-9282-AF0C52B62107"/>

 

HTTP Protocol:

 

The demo application should be completely functional for environments where the z/Scope Anywhere is deployed on the same machine and running under the HTTP protocol. If your environment does not attend these conditions you can also personalize those values on the web.config file:

 

   <add key="PROTOCOL" value="http:"/>

   <add key="SERVER" value="127.0.0.1:8443"/>

 

HTTPS Protocol:

 

If the you want to use the HTTPS protocol, then a valid certificate will be required. Set up the application to use your personal Certificate: Managing the SSL Certificate section.

 

   <add key="PROTOCOL" value="https:"/>

 

Read more:

Apikey
Diffie Hellman Key Exchange
Building the Query String
Using z/Scope Anywhere In-Memory Dictionary
Integrating a Login Macro
Web Authentication Provider