none
OCSPowershell application in IIS RRS feed

  • Question

  • Hi,

    I try to impersonate my code with my credentials, but when using the connection string:

    WSManConnectionInfo remoteConnectionInfo = new WSManConnectionInfo(new Uri("https://lyncserver.company.com/ocspowershell"));

    I get the exception "Element not found". Has anybody tried and got the remote management to work in the code using the impersonate users?

    Of course I can use "new WSManConnectionInfo(Uri, shellUri, credentials)", but then that is not impersonate accessing. And if I try to impersonate user with this code, I hit into "access denied" error. I believe that is coming from the module attached to this "web service", it is called: "Microsoft.Rtc.Internal.WebServicesKerberosAuth.OCSAdditionalCredentialsModule". But how to debug that... :-/


    Petri

    Tuesday, March 13, 2012 5:14 PM

Answers

  • Hi,Petri,

    Please check the Basic Authentication is enabled in IIS,to do this you need to go to the IIS Manager, Sites, Default Website, PowerShell, select the Authentication Feature, and enable Basic Authentication.If Basic Authentication is not an option on the Authentication feature page, you need to install it by going to the Server Manager, select the Web Server role, say "Add Role Services", under the Security node in the treeview, select Basic Authentication.

    If still no luck I am afraid you'd better post your question on Powershell forum or Lync dev forum on MSDN and there will be more powershell or Lync developing experts help you on this issue.

    Windows powershell http://social.technet.microsoft.com/Forums/en/winserverpowershell/threads

    UC develop http://social.msdn.microsoft.com/Forums/en-US/category/uc 

    B/R

    Sharon


    Sharon Shen

    TechNet Community Support

    ********************************************************************************************************************************************************************* Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.

    Thursday, March 15, 2012 10:23 AM
    Moderator

All replies

  • Hi,Petri,

    Please check the Basic Authentication is enabled in IIS,to do this you need to go to the IIS Manager, Sites, Default Website, PowerShell, select the Authentication Feature, and enable Basic Authentication.If Basic Authentication is not an option on the Authentication feature page, you need to install it by going to the Server Manager, select the Web Server role, say "Add Role Services", under the Security node in the treeview, select Basic Authentication.

    If still no luck I am afraid you'd better post your question on Powershell forum or Lync dev forum on MSDN and there will be more powershell or Lync developing experts help you on this issue.

    Windows powershell http://social.technet.microsoft.com/Forums/en/winserverpowershell/threads

    UC develop http://social.msdn.microsoft.com/Forums/en-US/category/uc 

    B/R

    Sharon


    Sharon Shen

    TechNet Community Support

    ********************************************************************************************************************************************************************* Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.

    Thursday, March 15, 2012 10:23 AM
    Moderator
  • Do you know, is it supported to modify the authentication methods on the IIS when the Lync server is installed? And more likely, when I look the web.config of this application it looks like Lync team has made some specific stuff on there which is not known by the pure PowerShell teams.

    Petri


    ps. That actually did not change anything. Only differences is that this "element not found" seems to be W2003 related. When I run the code locally, I get the access denied. Unless I'm using the "localhost".
    • Edited by Petri X Friday, March 16, 2012 11:18 AM Added more details
    Friday, March 16, 2012 10:48 AM
  • Hi,Petri,

    Sorry for taking so long to response.

    Per my knowledge you can modify the authentication methods on the IIS when the Lync server is installed,but should make sure there are some special requirements for special Lync web components or services.Also be sure you have backed up the IIS setting before you  modify it,if any problems you can revert them.

    B/R

    Sharon


    Sharon Shen

    TechNet Community Support

    ************************************************************************************************************************

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.

    Monday, April 2, 2012 7:13 AM
    Moderator