How to re login after a failed login

Using .Net Connector 3.0\Compiled with .NET Framework 2.0 and MS Visual Studio 2008, C#
Hello All,
I created an application where the user can input SAP user name and password in a dialog. Then it connects to SAP and executing some RFC. Working fine.
When the user put in a wrong SAP username or password I get an exception. OK.
But what do I have to do, to let him login again with the correct username and password.
Here is my coding:
                IDestinationConfiguration config = new myBackendConfig(); // provides all connection parameters including user/pwd
                RfcDestination prd = RfcDestinationManager.GetDestination(config.GetParameters(connId));
                RfcRepository repo = prd.Repository;
When I call this second time with correct user/password, then the prd.Repository will run into an exception with message:
"Der Wert darf nicht NULL sein.\nParametername: key" (german)
My translation: "Value must not be NULL.\nParameter name: key".
Any help would be appreciated!
Regards,
Peter

Hello Peter,
I was struggling with the same issue.
NCo provides an delegate for handling change events: RfcDestinationManager.ConfigurationChangeHandler. But I found no documentation about this and could'n get it running.
Here is my workaround:
For destination configuration use the way as described in NCo_30_Overview.pdf (page 7 and 8).
If the compiler warns you, that the event is never used, just add the following line to MyBackendConfig:
private void ConfigurationChangedEventDummyCall() { ConfigurationChanged(null, null); }
Change your coding as follows:
IDestinationConfiguration config = new MyBackendConfig();
RfcDestinationManager.RegisterDestinationConfiguration(config);
RfcDestination prd = RfcDestinationManager.GetDestination("PRD_000");
before you try to get the Repository, execute a Ping and catch the Exception:
try...
prd.Ping();
This prevents you from getting the "Der Wert darf nicht NULL sein" error on the second call.
If Ping fails, unregister the configuration, change username and/or password, create a new config and register again.
catch...
RfcDestinationManager.UnregisterDestinationConfiguration(config);
// change config here... (prompt for username / password)
config = new MyBackendConfig();
RfcDestinationManager.RegisterDestinationConfiguration(config);
RfcDestination prd = RfcDestinationManager.GetDestination("PRD_000");
again
prd.Ping();
If the second ping is working, logon was ok and you can continue and get the Repository without an error.
Regards,
Ingo
Edited by: Ingo Frank on Sep 19, 2011 4:24 PM

Similar Messages

  • Locking users out after 5 Failed Logins

    How can you configure solaris to lockout users after 5 failed logins. I figured out how to do it on IRIX but I cannot find information on how to do it for solaris.

    Retries will reset the console and make the user try logging in again after 5 failed attempts. But it does not lock the user account, the user still has the ability to log in. I want to configure it so that the user's account is locked after 5 failed login attempts. For IRIX, there is a LOCKOUT option in the /etc/default/login file, however SUN does not offer the same option. I was wondering if SUN offers a similar option somewhere.

  • How to change an after login page?

    Does anyone knows how to change an after login page from a default page 1 to, let's say page 200?

    Jessica,
    The URL to run your application is http://apex.oracle.com/pls/otn/f?p=23533.
    If you use this, page 3 is the first page shown after login.
    Using the URL you gave runs the Application Builder, not your application. If you use the Builder's Run Application icon to run your application, the page in your application that you are requesting is page 1 (or whatever is in the application's Home URL attribute). But running your application this way is something you do in a development environment only
    Your basic question has to do with how end users would get to a particular after-login page. End users do not have access to the Application Builder.
    Scott

  • How to Auto Login after registeration

    I have the following requirement and I've spent some time trying to experiment and looking for solutions but have failed to come up with anything that works.
    Requirement:
    > Register the user in CQ
    > Automatically login the user once he registers
      > The user should stay logged in (remember me forever)
    I've am able to succesfully register the user using the OOTB examples. I created my own register form action based off the libs/foundation/components/actions/update/post.POST.jsp file.
    I've looked into several api's to figure out how to auto login once the 
    am.getOrCreateAccount() call finishes successfully
    I tried
    repos.login(creds);
    Even tried the httppost way described on this thread: http://forums.adobe.com/message/4896922
    If anyone can point me in the right direction would really appreciate it!
    thank you!!

    Hi,
    How did you create sign up page. I tried to create a user registration page using "Create and Update Account" form action, but its not create new user account.
    Can you please help me if there something which I am missing?
    -Navin

  • After my computer has been sent to Apple my password is not working, how can I login again?

    Hello, after my computer had been broken I sent it to apple, but somehow I can not login and I am using a guestuser right now. I am pretty sure that I am using writing in the right password but it does not let me in. How can I login again?

    change the password.  10.6, 10.7

  • Data lost after 10 failed login attempts...Can the data be restored?

    Hello...
    Has anybody a solution to recover the data after 10 failed login attempts?
    My son played with my Iphone...and the data is gone...
    Thanks

    Yes, I have already followed this article.
    After changes in AD account, we need to follow this article.
    But, here my concern is that after password change prompts, it keeps retrying again and again for new password. It will cross the threshold limit which is set as 10. But the account doesn't gets locked.
    Thanks for the suggestion.
    Regards

  • NEED INFO ON HOW TO REMOVE  ""LOGIN ASSISTANCE LINK'' ON THE MAIN PAGE r12

    Hello, we want to remove (or make it invisible) the "LOGIN ASSISTANCE' on the main page of the r12 instance before we go live. WE will not be given that option to our end-users. Can you please advise how to. THanks.

    Pl see MOS Doc 735964.1 (How to Disable Login Assistance link in R12?)
    HTH
    Srini

  • How can I login and retrieve my user file from the trash?

    I was trying to find out where all my HD had gone, which a did using ‘What Size’.
    I found what looked like an old backup file so I put the file in the trash.
    It turns out that the file was my user file. So now I can’t login to as the user.
    How can I login and retrieve my user file from the trash?

    The Digital Editions forum is here, in case this is what you are talking about:
    http://forums.adobe.com/community/adobe_digital_editions
    If you are not, I apologize for the misunderstanding.

  • HT2731 I dont have credit card so, how can i login to itunes?

         I dont have credit card so, how can i login to itunes?

    If you don't have a credit card then there are instructions on this page for creating a new account (the instructions won't work with existing accounts) without giving card details : http://support.apple.com/kb/HT2534
    e.g. if currently logged into an account then log out of it, find a free app in the store and click on its free 'price' and create an account during the 'buying' process.

  • HT5622 How can I Login to my iTunes stores

    How can I login to my iTunes stores

    Why didn't you say that from the start? 
    If you think you broke your arm, do you tell the doctor your car won't start?    No, you tell the doctor you can't drive because your arm won't work, you think it's broken.
    You have to enter a method of payment, even for free apps.  
    This link is to acceptable payment methods:
    http://support.apple.com/kb/HT5552
    If you have a card on file, it may have an expired date.   You must remove it by selecting None, then add a card with a valid date.

  • How can i login to client

    Hi friends,
    iam very new to sap,i installed sap recently,i created a client how can i login to that client(i given user id:sap*,pwd:pass)
    any parameter changes required

    You need to change the parameter on RZ10 select the Default profile add the parameter and change the value and save & activate the profile. Restart the SAP Server and you would be able to login.
    This process is widely available if you will search on google you will find out.
    Regards,
    Subhash

  • How to change login account in icloud

    How to change login account in iCloud on my iPad?
    Appreciate your help. Thanks

    To change the iCloud accoun go to Settings>iCloud, tap Delete Account, provide the password for the old ID when prompted to turn off Find My iPhone, then sign back in with the ID you wish to use.

  • Im having trouble getting my macbook pro to boot up after a fail safe boot, im getting as far as the grey screen with the apple loggo. so im trying to run a disk repair but is saying the disk is locked, how do i unlock disk??

    Im having trouble getting my macbook pro to boot up after a fail safe boot, im getting as far as the grey screen with the apple loggo. so im trying to run a disk repair but is saying the disk is locked, how do i unlock disk??

    Some clarification may help.
    You say you cannot boot normally.  It shows a gray screen with the Apple logo.
    Did you say it will boot successfully in Safe Mode (boot, then hold down the Shift key)?
    How did you boot the machine to run Disk Utility?  (Which keyboard combinations)?

  • I am using iphone 3gs and have accidentally clicked "update" to software version 5. However, after I failed and all my data was lost. I manage to restore back to my previous situation. But all my apps has been gone. How can I get back all my aps?

    I am using iphone 3gs and have accidentally clicked "update" to software version 5. However, after I failed and all my data was lost. I manage to restore back to my previous situation. But all my apps has been gone. How can I get back all my aps? I know I can get it by itunes but there are a few problems as below:
    1. I have jailed break my iphone and I never purchased any apps from itunes
    2. I have some important infomation saved in one of the apps called "awesome notes". How can I get it back? Is it store inside my computer? if so, how can i restore?
    3. I am using window 7
    I sincerely hope you guys can help me.
    Regards,
    Stephen Hong

    alrite. I have made my mistake. I should not jail break my iphone. So if I purchase my apps again from itunes is that mean mean my data will be back?
    I hope you guys can giv me some support here since I am Apple genuine buyer. I could be wrong last time and now I turn over a new leaf and learn a lesson.
    Please noted that I can always create new account to ask for the same questions without mention about "jailbreak" if I want to but obviously I won't do that. Please provide me your support! Thank you!

  • How is the Login-validation.xml file is called when we do the validation i

    Hi ^^,
    please forgive me if I am a big long while explaining.
    when you are using the struts 2.0 the web.xml has a welcome-file-list. I have put index.html in that list so it pulls up first.
    It has the following tag
    <ul>
              <li><a href="roseindia/showLoginClientSideValidation.action">Login Application (Client Side Validation)</a></li>
            </ul>so this maps to struts.xml which contains the showLoginClientSideValidation.action tag
    <action name="showLoginClientSideValidation">
                   <result>/pages/loginClientSideValidation.jsp</result>
            </action>
            <action name="doLoginClientSideValidation" class="net.roseindia.Login">
                <result  name="input">/pages/loginClientSideValidation.jsp</result>
                   <result  name="error">/pages/loginClientSideValidation.jsp</result>
                   <result>/pages/Loginsuccess.jsp</result>
            </action>
              this displays the jsp "loginClientSideValidation.jsp"
    once you enter the details in the jsp and click submit the control goes to Login.java file as per the mapping in struts.xml given above
    This is just a simple java file which contains the execute() method. This method returns success or error.
    If success is returned then the Loginsuccess.jsp is invoked
    If error is returned then the loginClientSideValidation.jsp is invoked
    Well so far so good
    I have also understood that to use client side validation you use validate = "true" in loginClientSideValidation.jsp
    However what I am not able to understand is how the Login-validation.xml file is being invoked
    Any help would be highly appreciated.
    thanks and regards,

    Hi ^^^,
    i found something interesting that I want to share
    Validation rules are handled by validators, which must be registered with the ValidatorFactory (using the registerValidator method). The simplest way to do so is to add a file name validators.xml in the root of the classpath (/WEB-INF/classes) that declares all the validators you intend to use.
    validators.xml if being defined should be available in the classpath. However this is not necessary, if no custom validator is needed. Webwork will automatically picked up a predefined sets of validators defined in com/opensymphony/xwork/validator/validators/default.xml packaged together in xwork jar file that comes with webwork distribution.
    So this is clear that the validators are defined in validators.xml or default.xml
    What is still not clear is how is the Login-validation.xml being called by jsp page to do verification and then linking to validators.xml to apply the rules.
    However people have been telling me that ----" Struts 2.0 have inbuilt functionalities to validate the Parameters" and that i need to
    "Define configuration file *-validation.xml or use annotations
    i) className-validation.xml
    ii) place this file in the directory where .class file is placed example.Login should have Login-validation.xml
    Do you all think is this sufficient for an answer or should my search go on?
    thanks and regards,
    Prashant
    Edited by: pksingh79 on Sep 13, 2008 10:08 AM

  • How do I login to my macbook pro if I forgot my password?

    How do I login to my macbook pro if I forgot my password?

    If the user account is associated with an Apple ID, and you know the Apple ID password, then maybe the Apple ID can be used to reset your user account password. In OS X 10.10 and later, this option also works with FileVault, but only if you enabled it when you activated FileVault. It's not retroactive.
    Otherwise*, start up in Recovery mode. When the OS X Utilities window appears, select
              Utilities ▹ Terminal
    from the menu bar at the top of the screen—not from any of the items in the OS X Utilities window.
    In the window that opens, type this:
    resetp
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window opens. Close the Terminal window to get it out of the way.
    Select the startup volume ("Macintosh HD," unless you gave it a different name) if not already selected. You won't be able to do this if FileVault is active.
    Select your username from the menu labeled Select the user account if not already selected.
    Follow the prompts to reset the password. It's safest to choose a password that includes only the characters a-z, A-Z, and 0-9.
    Select
               ▹ Restart
    from the menu bar.
    You should now be able to log in with the new password, but the Keychain will be reset (empty.) If you've forgotten the Keychain password (which is ordinarily the same as the login password), there's no way to recover it.
    *Note: If you've activated FileVault, this procedure doesn't apply. Follow instead these instructions.

Maybe you are looking for