John,

In case someone doesn't give you a better answer...I'm working in .ASP
talking to the iSeries.  I think .NET is close to what I'm doing.   In
this case, the user runs under a server side userid that has the
authority to the objects.  The users authority to use the app comes from
his entering parameters on web screens I've built and I authenticate
what the user enters via my application.   Obviously, you can do
authentication a bunch of ways.

This, with some modification, may help:

First, I create a GLOBAL.ASA file which has the following in it:

<!--

                       LICENSE AND DISCLAIMER

 This material contains IBM copyrighted sample programming source
 code for your consideration.  This sample code has not been
 thoroughly tested under all conditions.  IBM, therefore, cannot
 guarantee or imply reliability, serviceability, or function.
 IBM provides no program services for this material. This material
 is provided "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
 IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.  SOME
 JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO
 THE ABOVE EXCLUSIONS MAY NOT APPLY TO YOU.  IN NO EVENT WILL IBM
 BE LIABLE TO ANY PARTY FOR ANY DIRECT, INDIRECT, SPECIAL OR OTHER
 CONSEQUENTIAL DAMAGES FOR ANY USE OF THIS MATERIAL INCLUDING,
 WITHOUT LIMITATION, ANY LOST PROFITS, BUSINESS INTERRUPTION, LOSS
 OF PROGRAMS OR OTHER DATA ON YOUR INFORMATION HANDLING SYSTEM OR
 OTHERWISE, EVEN IF EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH
 DAMAGES.


                          COPYRIGHT
                          ---------
               (C) Copyright IBM CORP. 1999
               All rights reserved.
               US Government Users Restricted Rights -
               Use, duplication or disclosure restricted
               by GSA ADP Schedule Contract with IBM Corp.
               Licensed Material - Property of IBM





 Session level variables
 -->

<SCRIPT LANGUAGE="VBScript" RUNAT="Server">

Sub Session_OnStart
    Session("AS400_Userid") = "a valid userid that runs the
application"
    Session("AS400_Password") = "valid password"
    Session("C2GLibrary") = "A library name; name to the left is up to
you"
        Session("TWPinLibrary") = "Another library name if you wish"
        Session("TWCustLibrary") = "Another library involved if you
wish"
    Session("FileName") = "A file name if you wish"
    Session("AS400_SystemName") = "An AS400 system name"
    End Sub
</SCRIPT>

Then I use a file I call CONNECT.ASP that contains the following and
gets its values from the GLOBAL.ASA file:

<!-- METADATA TYPE="typelib"
              FILE="C:\Program Files\Common
Files\System\ado\msado15.dll" -->

<%
  Dim objConn
  Set objConn = Server.CreateObject("ADODB.Connection")
  objConn.Open "Provider=IBMDA400; Data Source=" &
Session("AS400_SystemName") & ";", Session("AS400_UserID"),
Session("AS400_Password")
%>

HTH,

Dave Odom
Arizona

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.