Sample login PEI code

are there any sample login pei code available for download?

strLocale can be edited via PEI, but if you're expecting that the user's session will be refreshed to the locale, unfortunately, that is not possible.
To change the locale of the user, you can do it via PEI, but that change will not reflect for the user until the portal is restarted... you need to initiate a refresh somehow... I think you will need to take a look at what the editor code does when you change your locale in the My Accounts settings and try and duplicate that.

Similar Messages

  • Multiple Login PEI's

    I am going crazy trying to migrate some custom pei's and activity spaces from 5.04 to 6.0.1. We currently have 5 or 6 login PEI's. Depending on what happens in the OnAfterLogin method, we may need to redirect the user to a custom activity space. Lets say the user is redirected on step 3, goes out and completes what ever action is required in the AS. After the as is complete, I want to get back into my login flow and complete steps 4-6, but I am not sure how to do this. On step three, I had to return a redirect to a custom space. When I complete my AS I can return null, but that dosen't seem to put me back in the flow. It actually seems to get me stuck in the same AS. So if the custom AS was for changing a password, the user is stuck changing their password forever because I didn't return a valid redirect.
    I have the code for how this was worked around in 5.04, but it breaks in 6.0 and I am not sure it was the right way to do it anyway. Can anybody provide some good ideas on how to do this in 6.0 sp1?
    Thanks,
    Berney

    I'm making some custom login PEIs right now but from scratch in a new 6.1 installation. Do you mind if I ask if you were able to get your custom activity spaces (AS)(most notably your change password AS) to show custom branding according to experience definition? We have 5 uniquely branded portals and each must use the same change password AS but right now I only have it showing the ugly blue out of the box branding - I can't get it branded w/ our custom header and footer. It's going to take some more homework on my part. If I could just find out the exp.def./subportal-id from my PEI to begin w/ that'd be great (right now, using
    IPTSubPortalInfo subPortal = (IPTSubPortalInfo) ptSession.GetSessionInfo().GetCurrentUserCachedSubPortalInfo();
    int id = subPortal.GetObjectID()
    doesn't work.

  • Location for login.aspx code behind?

    I added a Login.aspx.cs file in the Server Project with some code in
    Page_Load() I need to implement, and edited the first line of login.aspx this way:
    <%@ Page Language="C#" CodeBehind="Login.aspx.cs" Inherits="Microsoft.LightSwitch.Security.ServerGenerated.Implementation.LogInPageBase" %>
    What I added, exactly, are the Language and CodeBehind
    properties.
    But when I deploy and run the application, I get this error:
    The type 'Microsoft.LightSwitch.Security.ServerGenerated.Implementation.LogInPageBase' is ambiguous: it could come from assembly 'C:\testing\Sandbox\bin\Microsoft.LightSwitch.Server.DLL' or from assembly 'C:\testing\Sandbox\bin\Application.Server.DLL'.
    Please specify the assembly explicitly in the type name.
    I understand this is because Login.aspx.cs already exists in some assembly.
    Is there any way to Access Login.aspx code behind?
    If not, how can I add my own login page to an HTML Client App without losing the already configured Forms security, roles, permissions, etc.?
    thanks.
    Nicolás.
    Nicolás Lope de Barrios
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to
    "Mark as Answer". This will help other people find answers to their problems more quickly.

    Josh:I tried your suggestion, edited Login.aspx like you said, and the code for Login.aspx.cs converted from vb is this:
    using System;
    using System.Collections.Generic;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.Security;
    using Microsoft.LightSwitch;
    using LightSwitchApplication;
    using LightSwitchApplication.Helpers;
    namespace LightSwitchApplication
    public partial class Login : Microsoft.LightSwitch.Security.ServerGenerated.Implementation.LogInPageBase
    protected void Page_Load(object sender, EventArgs e)
    AuditHelper.CreateAuditTrailForLogin();
    public Login()
    Load += Page_Load;
    As you can see, all I want to do is call AuditHelper.CreateAuditTrailForLogin()
    on Page_Load()
    But I'm getting this exception, wich is obvious what it means, but I don't know how to fix. Does it mean we're overriding Server generated Page_Load() so I have to write all the code that handles authentication?:
    The method or operation is not implemented.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.             
    Exception Details: System.NotImplementedException: The method or operation is not implemented.
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.                  
    Stack Trace:
    [NotImplementedException: The method or operation is not implemented.]
    LightSwitchApplication.Login.Page_Load(Object sender, EventArgs e) +36
    Microsoft.LightSwitch.Security.ServerGenerated.Implementation.LogInPageBase.OnLoad(EventArgs e) +90
    System.Web.UI.Control.LoadRecursive() +71
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178
    Any help appreciated.
    Nicolás Lope de Barrios
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to
    "Mark as Answer". This will help other people find answers to their problems more quickly.

  • Sample Login Module Not working

    I have configured the sample login module shipped with identity server 6.0 for understanding the configuration of a custome login module.
    As per the instruction when i try to run the example i get an Authentication faliure i have given the following url "http://<domain-name>:58080/amserver/UI/Login?module=LoginModuleSample&org=<my org name>"
    Could anyone plz tell me y this error has occurred and if not then suggest me a way to return back to a state where i was before working with this example as now i cannot open the amconsole as well.
    plz help as fast as possible
    kirtan

    use commandline to remove and then add (again) amauth service. you should be able to log into the console again.... with your amadmin id and password
    for getting the sample auth module to work.. please read the docs carefully, it has a very clear step by step explanation on how to do it...

  • PL/SQL website with sample PL/SQL codes from real life examples

    Hi All,
    Can any one guide me and suggest me on the website where they post sample PL/SQL code. Thanks much in advance.
    AL

    Something like this ->
    UPDATE PRODUCT e
    set e.new_id = (
                      SELECT distinct i.id||i.code
                      FROM item i, product pi
                      WHERE i.ccode = '12'
                      AND i.scode = 'ACTIVE'
                      AND i.id IS NOT NULL
                      AND pi.id = i.id
                      AND i.id IN (
                                      SELECT DISTINCT ri.item_id
                                      FROM category ri
                                      WHERE ri.category_code = 'RRR'
                      AND pi.id = e.id
    WHERE e.new_id IS NULL;N.B.: Not tested...
    Please post your table structure. Otherwise it is very difficult to find out the exact reason.
    Regards.
    Satyaki De.

  • Free sample Forms 9i code

    Hi,
    some one plz, tell me the address of website from where I download free sample forms 9i code to make my application better, thanks for all of you help.
    Khawar

    Hello,
    <p>This is an article that contents 15 sample dialogs that explains some of the extended functionalities of Forms 10gR2.<br>Note that you can download Forms 10.1.2 for free on the OTN site.<br>Maybe if you google on the "Oracle Forms" keyword, you could find some more material</p>
    Francois

  • Sample Login page

    anyone can show me sample login page, when button is click on the login, it will bring you to another sample.
    i have tried many different ways like swapping panel...but cant work.

    DomMense_Is_SlimMense wrote:
    DrLaszloJamf wrote:
    Okay. Who mentioned tabbed panes?I think it was gtRpr.
    Please explain why not use Tabbed panes?
    I mean from personal experiance,
    when I create a swing app it usually has more than 1 page
    now If I am already using tabbed panes what is the harm in
    adding a login page?
    I can understand otherwise.As you like.

  • Sample WMI Java code

    Hi,
    Can someone please post a working java code that is able to access WMI and run queries on it using odbc jdbc or any other means. The sample code need not be complex maybe just to get the user on a machine for example.
    Before someone starts telling me that google is my friend. I have done this to no avail.
    Thanks

    Have you been to Customer Care - Web Services Library - Connection Management? I see that they have a Single Sign-On Login written in Java. Sounds like you have gotten at least that far but it might give you some more clues.
    I was in the same position as you, except with C#. Their documentation isn't super but their resource library has helped quite a bit. Unfortunately, they don't have a whole lot written in Java. If you contact Customer Care directly they may have more examples written in Java.

  • How to integrate RFSG driver with sampling theorem labview code

    hi all, 
    I got the labview code of sampling theorem from labview-> find examples. How can I integrate this code with PXI system? How can I integrate the RFSG driver with labview code?

    Hi Nieman,
    LabVIEW 2014 should be compatible with the 9068 and the cRIO 2.1 drivers.  I verified it should work as expected earlier today.  Please make sure you are using the example cRIO PN-IO Device when you are moving the module over to the new target.  If you are already accessing that, please navigate to this folder:
    <Program Files>\National Instruments\LabVIEW 2014\Targets\NI\FPGA\cRIO\other
    Please let me know if you see a CS_cRIO-PNAD folder. This folder provides all the files necessary to discover and use the module in the project.  If we do not have that folder there, we will be unable to locate the module.  If that is indeed the case, then it may be the driver did not install correctly.  
    If after finding this folder and it is still not working, please send me screenshots of the error that you are seeing and a MAX Technical Report.  Thanks!
    Matt S.
    Industrial Communications Product Support Engineer
    National Instruments

  • Sample ABAP routine code to load only previous month data in INFOPACKAGE

    Hi all,
    I want to create one ABAP routine in InfoPackage (Variables change to selection values with background processing) for 0CALMONTH ( Calender year month) so that whenever this infopackage is executed it should fetch only previous month data.
    Can anyone please provide any sample code for that.
    Thanks in advance.
    Uday shankar.

    Hi
    Please check with below code, hope this will resolve your issue
    WHEN: 'ZLASTP'.
         CLEAR: h_period, h_gjahr.
         CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
           EXPORTING
             i_date               = sy-datum
       I_MONMIT             = 00
             i_periv              = 'AF'
          IMPORTING
            e_buper              = h_period
            e_gjahr              = h_gjahr
    EXCEPTIONS
       INPUT_FALSE          = 1
       T009_NOTFOUND        = 2
       T009B_NOTFOUND       = 3
       OTHERS               = 4
         IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
         IF h_period = '001'.
           h_gjahr = h_gjahr - 1.
           h_period = '012'.
         ELSE.
           h_period = h_period - 1.
         ENDIF.
         CLEAR l_s_range.
         CONCATENATE h_gjahr h_period INTO l_s_range-low.
         l_s_range-sign = 'I'.
         l_s_range-opt  = 'EQ'.
         APPEND l_s_range TO e_t_range.

  • Cannot create client error with sample SAP JCO code

    Hi,
    I am encountering the following error when trying to connect to a R/3 system using the WAS 6.40 on my laptop. I have cut and pasted the Example1 code from the SAPJCO into my NetWeaver developer studio IDE.
    java.lang.UnsatisfiedLinkError: no CpicNative in java.library.path
         at java.lang.ClassLoader.loadLibrary(Unknown Source)
         at java.lang.Runtime.loadLibrary0(Unknown Source)
         at java.lang.System.loadLibrary(Unknown Source)
         at com.sap.mw.rfc.api.RfcApi.initializeDLL(RfcApi.java:1285)
         at com.sap.mw.rfc.api.RfcApi.<clinit>(RfcApi.java:1299)
         at com.sap.mw.jco.MiddlewareJRfc.<clinit>(MiddlewareJRfc.java:228)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at com.sap.mw.jco.JCO.<clinit>(JCO.java:630)
         at com.sap.mw.jco.support.JRfcTest.correctProperties(JRfcTest.java:1043)
         at com.sap.mw.jco.support.JRfcTest.initCall(JRfcTest.java:1072)
         at com.sap.mw.jco.support.JRfcTest.runConnectionTest(JRfcTest.java:735)
         at com.sap.mw.jco.support.JRfcTest.main(JRfcTest.java:202)
    Cannot create client, error message:
    java.lang.NoClassDefFoundError occured:
       Message:null
    I have a system user defined in R/3 but still this isn't working. I am new to Java so any light you could shed would be greatly appreciated.
    Cheers and TIA,
    Rich

    The unsatisfied link error should be because sapjco.jar cannot link to the sapjco.dll.
    I tried to simulate the problem by
    1) Opening a java perspective.
    2) Create a new 'java' project.
    3) Add libraries sapjco.jar from the path <Drive>:\Program Files\SAP\JDT\eclipse\plugins\com.sap.mw.jco\lib
    You will see sapjcorfc.dll in this path
    4)Add a new class file ,Wrote a sample jco code and executed and it worked..
    The key is to have the sapjcorfc.dll in the same directory as sapjco.jar
    I hope this helps

  • Need Sample Java Embedding code

    Hello gurus,
    I need sample code to access DBAdapter select query output within Java activity. besically I want to loop through the records and call a custom Java API.
    thanks

    Please help

  • EHSM Login / T.codes for Incident Management

    Hi All,
    I am a BW Consultant & got the requirement to develop the Incident Management Reports.
    we have SAP standard Extractors for Incident Management to load the Data.
    I want to know
    1. I need to reconcile my bw report, what are the T.codes for Incident Management,
    2. is EHSM is web based / SAP GUI based, if web based...how to login.
    3. I have access to ECC where the EHSM is instaled, but I am very new & dont have Idea to login.
    Please help me in this...since I dont have any functional consultant here.
    THx,

    Dear Shaik ,
    First you will have to ensure you have EHSM roles asssigned to you(i.e SAP_EHSM_MASTER or customized role of it)
    Second :once you login select Health and Safety->Overview where you would be able to see incident and incident reports ; also you can select analytical reports to viewing BI data
    Third:
    Please find the list of data sources in RSA5
    0EHSM_HSS_INC_REC              Incident Management
    0EHSM_HSS_INC_REC_01              Incidents
    0EHSM_HSS_INC_REC_02              Injuries
    0EHSM_HSS_INC_REC_03              Assets
    0EHSM_HSS_INC_REC_04              Financial Transactions
    0EHSM_HSS_INC_REC_05              Releases
    0EHSM_HSS_INC_REC_06              Actions
    0EHSM_HSS_INC_REC_07              Investigations
    0EHSM_HSS_INC_REC_08              Risk Matrix
    0EHSM_HSS_INC_REC_09              Notices of Violation
    0EHSM_HSS_INC_REC_10              HCM Data
    0EHSM_HSS_INC_REC-IO           Incident Management Master Data
    Thanks
    GJ

  • Any sample video webinar code?

    Hi, I'm trying an experienced java developer but very new to flash. I'm trying to develop a php webapp that live streams a users webcam to hunderds of views, with chat and the ability to kick viewers out of the meeting. I downloaded flash builder 4 and lccs sdk and have gotten a simple webcam app working (not even using publisher/subscriber model yet), but haven't tackled permissions/roles, managing and cleaning up sessions and that sort of thing. Any sample code out there that you could share with me would be greatly appreciated.
    ps. I would consider other technologies if you think this one is not right for what I'm trying to do.
    Thank you,
    Kevin

    Hi ,
    Download the file at:
    http://download.oracle.com/otn/other/general/forms10gdemos9_0_4_2.zip
    Regards,
    Simon

  • Jsp login form code

    hi all
    i am a student and new to jsp
    imy problem is that i want to create a login form and have a page that validates the username and password ... i have tried this but i am gettin errors with my sql line . can any1 help me out
    i have pasted the sql line below
    ResultSet rs = stmt.executeQuery("SELECT username,password FROM myusers WHERE username='"+request.getParameter("username_signin") + "' AND password=PASSWORD('"+request.getParameter("password_signin")+"')");
    thanks

    hi i also have similar problem to avoid the ' or1=1 that simple hacking code.
    i try to use ur method but i nt too sure abt the prepare statement , pls help thanks.
    <%@page contentType="text/html"%>
    <%@page import="java.sql.*"%>
    <html>
    <head>
    <title>Check Login</title>
    </head>
    <body>
    <%
    //String varName=request.getParameter("userName");
    //String varPass=request.getParameter("userPass");
    String DRIVER = "sun.jdbc.odbc.JdbcOdbcDriver";
    Connection con = null;
    String nextPage = null;
    try {
         // set up the DSNless connection to the EJewel.mdb database
         String source = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\\Program Files\\Apache Software Foundation\\Tomcat 5.5\\webapps\\ROOT\\assess20\\assess.mdb";
         // Open a Database connection with the Driver
         Class.forName(DRIVER);
         con = DriverManager.getConnection(source);
    // Create sql string to check whether userName is found in database
         //String sql = "Select * from Customers where userName='" + varName + "' and userPass='" + varPass + "'";
         PreparedStatement stmt = con.prepareStatement("SELECT * from Customers WHERE username= 1 AND password='2");
    stmt.setString(1, request.getParameter("userName"));
    stmt.setString(2, request.getParameter("userPass"));
         // Create statement to connect to Connection
         Statement stmt=con.createStatement();
         // Execute result set on sql string
         ResultSet rs=stmt.executeQuery(PreparedStatement);
         String userPass = "foobar";
    MessageDigest mdAlgorithm = MessageDigest.getInstance("MD5");
    mdAlgorithm.update(userPass.getBytes());
    byte[] digest = mdAlgorithm.digest();
    StringBuffer hexString = new StringBuffer();
    for (int i = 0; i < digest.length; i++) {
    userPass = Integer.toHexString(0xFF & digest);
    if (userPass.length() < 2) {
    userPass = "0" + userPass;
    hexString.append(userPass);
    // We now have a unique MD5 Hash of original input
    out.print(hexString.toString());
              if (rs.next())
              out.print("Exist");
              session.setAttribute("loginStatus", "login");
              session.setAttribute("userName", varName);
    session.setAttribute("userPass", varPass);
    nextPage="ShowMain.jsp";     
              else
              //out.print("Does not exist");
              nextPage="Showlogin.htm";
         // close the resultset and statement     
    rs.close();
    rs = null;
    stmt.close();
    stmt = null;
         } // end try
         // catch for 3 exceptions
         catch (ClassNotFoundException cnfe) {
    out.println ("Could not create driver " + cnfe.getMessage ()) ;
         catch (SQLException sqle) {
    out.println ("Could not connect to database " + sqle.getMessage ()) ;
         catch (Exception excpt) {
    out.println ("Could not connect to database, general error " + excpt.getMessage ()) ;
    } // end all catch
         // finally to close connection
    finally {
    if (con != null) {
    con.close();
    } // end finally
    %>
    <jsp:forward page="<%=nextPage%>"/>
    </body>
    </html>

Maybe you are looking for