PureConnect

 View Only
Discussion Thread View
Expand all | Collapse all

Your user name and/or password is invalid when connecting using WindowsAuthSettings()

  • 1.  Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 10-31-2017 16:25
    I am trying to use IceLib to interact with the phone system. I have a user that is receiving "Your user name and/or password is invalid" error when trying to login. To log her we are using WindowsAuthSettings(), so the credential should not be the problem. What could be the problem here?


  • 2.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 10-31-2017 18:43
    Originally posted by malhayek;36176
    I am trying to use IceLib to interact with the phone system. I have a user that is receiving "Your user name and/or password is invalid" error when trying to login. To log her we are using WindowsAuthSettings(), so the credential should not be the problem. What could be the problem here?
    How is the user accessing your application i.e. is this an installed application or MVC/ASP.net WebApp?


  • 3.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 10-31-2017 20:11
    This is an ASP.NET MVC app. I basically have a configuration table in my app that allows me to set how to connect the user. For that user with the error, I have it configured so it connects using Windows Authentication. To establish a connection, I start a session, then I attempt to connect to the server using the user setting in my app. When the user is connected, I store the session in the cache so I won't have to create a new session each time a user interact with the dealer. So the next time around, when the user want to place a call, if a session is available is the cache and its state is Up, I use it otherwise I create a new one and add it to my cache. I have not yet setup queue watches, I delayed that for a while as priorities have changed.


  • 4.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 10-31-2017 20:57
    I think the issue here, and I could be very wrong, is the user that is being supplied to IC. Because the Session.Connect() method is run server side, it may be attempting to establish a connection with the IIS user that is running the ApplicationPool. Have you successfully logged in via any other users using WindowsAuthentication and IceLib from the web server?


  • 5.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 10-31-2017 21:30
    Indeed that is the problem. When I dump `new WindowsAuthSettings()` on my screen while running the app on the server I get the poolApp username not the connected user. Trying to find a way to change the behavior. I am guessing that is an IIS setting.


  • 6.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 10-31-2017 22:43
    Does any one knows how `new WindowsAuthSettings()` works? I created a Dumy Asp.NET MVC 5 project using Windows Authentication (standard Microsoft project) I added the following method to my HomeController just to see what WindowsUser It is using public JsonResult Test() { return Json( new { All = new WindowsAuthSettings(), Kerberos = new WindowsAuthSettings(WindowsAuthProtocols.Kerberos), Ntlm = new WindowsAuthSettings(WindowsAuthProtocols.Ntlm), }, JsonRequestBehavior.AllowGet); } However, this is showing the `IIS APPPOOL\\MvcApp` which is what the name of the pool that is running my app. I also enabled "Windows Authentication" in the Authentication settion of IIS and disabled the "Anonymous Authentication" When I open the app, the I get prompted to entered my credential and when I do it lets me is. I just don't know what does new WindowsAuthSettings() use to figure out the credentials. Screenshots below shows my output [ATTACH]897[/ATTACH] [ATTACH]898[/ATTACH]


  • 7.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 11-01-2017 13:47
    It automatically uses the Windows credentials of the current Windows session. Which in an IIS setting will be the user that is running the ApplicationPool. There are some tools to enable even further Controller actions in an MVC application, but in this scenario you are attempting to use Windows credentials for two different services, IIS and IceLib, and each are reading different users for their access. I offer two suggestions, but brighter minds may have others. Manual Windows Authentication IceLib allows users to manually enter their Windows credentials to generate a session with IC. To do this the "Allow Manual Windows Authentication Credentials" setting must be enabled in Admin, and the users will need to be mapped to their domain (which it sounds like is already done). You would have to display a login page for them to enter their domain credentials, but you could at least get the user and populate that for them so they only need to enter their password and station information. With this type of authentication, you will use the AlternateWindowsAuthSettings. Proxy Authentication There are also methods that allow proxy sessions to be created on behalf of users. You will need a user created with the "Allow Proxy Login" security setting. In your app, after you retrieve the user accessing the MVC, you would create a session using this Proxy user, and then use the ProxyAuthentication class to act on behalf of the user. With respect to interactions, I do not know if this would either require the user making calls to be setup with default stations, if it would require an already existing Desktop/Connect session, or if you could have the user enter a station and log them in. I have used ProxyAuth previously, but not with interactions.


  • 8.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 11-02-2017 02:57
    Thank you for that great info your sharing with me. That defiantly helps! I finally got IIS to work. To do that I had to do the following steps. 1) my AppPool for some reason needed to have a Classic pipeline settings not the new Integrated 2) I had to enable "Windows Authentication" along with "ASP.Net Impersonation" and disabled "Anonymous Authentication" Now my MVC app is able to pass my Windows Authentication session to the SDK. Question, by default how long does the session live before it is disposed? Also, is there a way to control that value?


  • 9.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 11-03-2017 16:10
    I got IIS to show the correct Username. However, the server is still telling me "Your user name and/or password is invalid." I am not sure what else need to happen here to use Windows Authentication for a web environment.


  • 10.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 11-03-2017 18:11
    Is it sending the correct user now to IceLib? If it is, make sure you have an account on IC that matches that domain user.


  • 11.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 11-03-2017 18:15
    Originally posted by Seanatron;36212
    Is it sending the correct user now to IceLib? If it is, make sure you have an account on IC that matches that domain user.
    Yes the correct user is being sent to the server. But I am still getting invalid username/password error still. The user has the correct/same account setup because I am able to log into scripter with the same user with no problems. Also, the code works when running it on my local machine but not when it is on IIS on my production machine. How does the WindowsAuthSettings() getting the password? May be there is something that is preventing sharing the password with IceLib.


  • 12.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 11-08-2017 20:06
    Unfortunately I have been messing with this for way too long. I don't think using WindowsAuthSettings() is possible in ASP.NET application since IIS won't delegate the authenticated user credentials for security. As a work around I used AlternateWindowsAuthSettings() buy manually providing windows username and password. However, I am running into another problem now. When a user starts a new session using IceLib, their "Interaction Desktop" is disconnected. Is there a way to keep both connections open? For now, the only function that I have enabled on my app is "Click to call" so I just want to make the call but the user will still resume/conference or do any other interaction with using "Interaction Desktop". Thank you


  • 13.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 11-08-2017 20:15
    If you are allowing the user to connect with a station, I believe just as ICWS does, this requires a CLIENT_ACCESS license, and will kick the other login out. Try connecting stationless and placing the call. It should use the already established connection from Desktop.


  • 14.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 11-08-2017 20:27
    Stationless setting worked! Thank you so much for your help with this.


  • 15.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 11-09-2017 20:29
    I put together a quick console test on my station, and I am curious... Are you hearing audio from your call when connecting stationless?


  • 16.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 11-09-2017 21:37
    Oh boy! No sound and the phone is not aware that a call is being placed from IceLib. So we had Interaction Desktop running, then made a call from the API, the call was made but the phone never made noise and we can't hear the person on the other line. Also, when the call was made, Interaction Desktop did now the interaction on the list, but the physical phone was unaware of the call. What do you suggest?


  • 17.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 11-13-2017 17:11
    I put together a few tests from a Console application and below are my results. I am going to work towards migrating this to MVC to see if I get the same issue. StationLessSettings: call is made, visible on the queue from Desktop, but call is in System. StationSettings: I created a session using my station of my already connected Desktop session. Unlike you, my session did not disconnect from desktop or the console application, and I was able to place the call fine. I connected with the following as my StationSettings new WorkstationSettings(STATION,SupportedMedia.Call) ProxyAuthUser: I used similar code as what is available in the sample code of the ProxyAuthSettings class. Using a proxy user and watching for the current Desktop session settings, creating a ProxySession using the Desktop StationSettings, and I was able to place a call using the Proxy user.


  • 18.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 11-13-2017 17:20
    [QUOTE=Seanatron;36266]StationSettings: I created a session using my station of my already connected Desktop session. new WorkstationSettings(STATION,SupportedMedia.Call) How did you create a session using your already connected Desktop? Is there a way to search for existing session and user it or when using the .Connect() method it does that for you behind the seance? This is how I called my connect method var stationSettings = new WorkstationSettings(setting.GetWorkStationName(), supportedMedia); DialerSession.Connect(sessionSettings, hostSettings, auth, stationSettings);


  • 19.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 11-13-2017 17:55
    What I mean is that I used the same Workstation that I used in Desktop. I have never used the Dialer IceLib, so not sure if that is doing something else.


  • 20.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 11-13-2017 18:01
    I am not using the Dialer IceLib. I am using IceLib. I think we both are doing the same thing the only different is the authentication method. I am using AlternateWindowsAuthSettings() class and you're are using ProxyLogin.


  • 21.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 11-13-2017 19:42
    I quickly created an MVC application. In my default controller, I added the following code, and the call was made fine, and I am still logged into my Desktop application. public ActionResult Index() { Session _session = new Session(); SessionSettings sessionSettings = new SessionSettings(); sessionSettings.ApplicationName = "MVC Call"; _session.Connect(sessionSettings, new HostSettings(new HostEndpoint(HOST)), new AlternateWindowsAuthSettings(UN, PW), new WorkstationSettings(STATION, SupportedMedia.Call)); InteractionsManager im = InteractionsManager.GetInstance(_session); CallInteractionParameters cip = new CallInteractionParameters("4072269502"); Interaction i = im.MakeCall(cip); _session.Disconnect(); return View(); }


  • 22.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 11-15-2017 21:19
    Not sure why it is not working for me. Could it be a server configuration on your end that is allowing your user to login with the same station from two different places?


  • 23.  RE: Your user name and/or password is invalid when connecting using WindowsAuthSettings()

    Posted 11-28-2017 22:15
    I am getting close to fully using Interaction in Asp.Net MVC 5 app. I am running into an issue while watching queues. I create a new thread with the issue description http://community.inin.com/forums/showthread.php?11541-Why-the-QueueInteractionAdded-event-handles-waits-until-the-recipient-picks-up&p=36334#post36334.


Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources