What am I doing wrong?

Apr 11, 2012 at 5:01 PM

When I try to make a call to my service, nothing happens.  If I go to http://lyncservice.domain.net/service.svc/getpresences?sipuris=test@domain.net, I get nothing, just a blank page.  When I make a specific call to get the presence, it shows up as unknown

Clearly, I have a setting wrong somewhere that I can't communicate to Lync... can anyone help me?

My entire Lync topology is located on: LyncServer
My trusted app pool is located on: AppServer
My website is located on: WebServer

When I run Get-CsTrustedApplication on my LyncServer, it yields this info:

Identity                   : appserver.domain.net/urn:application:lynctest
ApplicationId              : urn:application:lynctest
TrustedApplicationPoolFqdn : appserver.domain.net
Port                       : 10607
LegacyApplicationName      : lynctest

When I run Get-CsTrustedApplicationEndPoint on my LyncServer, it yelds this info:

RegistrarPool          : lyncserver.domain.net
OwnerUrn               : urn:application:lynctest
SipAddress             : sip:lyncservice@domain.com
DisplayName            : Lync Presence Service

My web.config settings in the service are as follows:

  <appSettings>
    <add key="LyncServer" value="LyncServer.domain.net"/>
    <add key="LyncServerPort" value="10607"/>
    <!-- presence -->
    <add key="ApplicationId" value="urn:application:lynctest"/>
    <add key="ApplicationName" value="lynctest"/>
    <add key="TrustedContactURI" value="sip:lyncservice@domain.com"/>
    <!-- chat -->
    <add key="ChatUserSip" value="sip:lyncservice@domain.com"/>
    <add key="ChatUserName" value="LyncUser"/>
    <add key="ChatUserPass" value="password"/>
    <add key="ChatUserDomain" value="domain.net"/>
    <add key="ChatTimeoutSeconds" value="60"/>
  </appSettings>

Does anyone see anything wrong?
Apr 13, 2012 at 4:55 AM

Hi Stsauber,

I literally got mine working today.

Your web.config look fine, below its just confirmation.

<add key="LyncServer" value="LyncServer.domain.net"/> --> Lync Pool Server (Front End)
<add key="LyncServerPort" value="10607"/> --> Correct Port.
Your issue is with the iis setup specifically your index.html and the address for the https://server.domain.com/service.svc/ and StatusPictures/
Make sure the paths are correct paths... It will not display anything if the paths are not correct.
Make sure you follow the setups as per the documentation. 
Let me know if there is anything specific you need help with.

MP

 

 

Apr 13, 2012 at 4:06 PM
Edited Apr 16, 2012 at 5:24 PM

MP,

Thank you for your response!  I do have ssl enabled for the site, and the path is correct.  I can navigate to the status pictures just fine, it's just when I make a call to the service, it's blank (such as https://lyncservice.domain.net/service.svc/getpresences?sipuris=user@domain.net)

When I try to go to my lyncpresnece.domain.net test site, I see my contacts, but when I click on the "chat" window, nothing happens, no popup or anything.  If I click on "e-mail" it opens a new e-mail in Outlook, but nothing in the "To" so it's not passing any of my properties from AD or anything.

I installed UCMA 3.0 on AppServer, installed OCSCore on AppServer, Bootstrapped AppServer
Ran New App Pool command on AppServer, Installed Lync Components on AppServer.  Requested Cert and Installed Cert on AppServer
Replica service started, Replication Status says it's up to date
Ran New App command on AppServer, Ran New App Endpoint command on AppServer.
Did all the IIS settings
Changed values in index.htm

 $.presence({
                'serviceUrl''https://lyncservice.domain.net/service.svc/',
                'refreshRate': 8000,
                'statusImageBaseUrl''https://lyncpresence.domain.net/StatusPictures/',


What did I do wrong?

Apr 16, 2012 at 5:16 AM

stsauber,

What happens if you navigate to just https://lyncservice.domain.net/service.svc/ ??

Do you receive an IIS configuration error--> What does your event viewer say under Applications?

Have you added the Service user account to Local Groups and to the path of the Widget and Net Framework 3.5/Temp windows dir?

Check the bindings on IIS, make sure nothing else is using 80 or 443.

On my SSL Cert  i added the App Server and Front End Server names just for fun.

This issue is all around you IIS if your webconfig is correct and both Index/Chat.html.

Let me know.

 

MP

Apr 17, 2012 at 9:25 PM

MP,

Thanks again for your response.  When I go to service.svc I get an "Endpoint not Found."  In Event Viewer on the Web server I get a "Login failed for user 'DOMAIN\LyncService'.  Reason: Failed to open the explicity specified database. [CLIENT: <local machine>].

I have this Lync Service user under the RTC Local Read-Only Admins and SQLServerMSSQLUSER$Server$RTCLOCAL groups.  Not sure what else I need...

Thanks,

Apr 20, 2012 at 4:53 PM

I got it almost all the way working.  It pulls my presence info and everything fine.  When I go to chat and the chat.html page comes up, and I type in something and hit "Send" nothing happens.

Any advice?

Thanks,

Apr 26, 2012 at 8:35 AM

Well Done, That is more than likely a Chat.html-ServiceUrl Issue or its your IE Browsers security settings.

Check both of these.

 

MP

Apr 26, 2012 at 8:39 AM

Also,

Has your web config got correct user info, is that user SIP enabled?

 

Apr 26, 2012 at 2:07 PM

MP,

My Web.config is the same as shown above. The user is SIP enabled.

<add key="TrustedContactURI" value="sip:lyncservice@domain.com"/>
    <!-- chat -->
    <add key="ChatUserSip" value="sip:lyncservice@domain.com"/>
    <add key="ChatUserName" value="LyncUser"/>
    <add key="ChatUserPass" value="password"/>
    <add key="ChatUserDomain" value="domain.net"/>
    <add key="ChatTimeoutSeconds" value="60"/>

Should the "trustedcontacturi" be different than the chatuser?  This account is also my AppPoolIdentity.

May 21, 2012 at 3:06 PM

Is the "TrustedContactURI" a existing Lync account in the lync server?

 

How can i create this account?

May 21, 2012 at 4:05 PM

Yes my lyncservice@domain.com is an existing Lync Account.

 

You can enable SIP on that account in the Lync Control Panel

May 21, 2012 at 6:14 PM

Thanks stsauber.

 

I have another question. On step "Request Certificate", what is the value I must place on xxxx?

"Request-CsCertificate -NEW -Type default -CA "xxxxxx.com\xxxxx" –Verbose"

May 21, 2012 at 8:16 PM

Hi stsauber,

     I'm having the same problem you were where you can see all the contacts but can't get a chat window to pop up.  It looks like you fixed that particular problem and I was just wondering what you did?

Thanks!

May 21, 2012 at 9:39 PM
nykolaslima wrote:

Thanks stsauber.

 

I have another question. On step "Request Certificate", what is the value I must place on xxxx?

"Request-CsCertificate -NEW -Type default -CA "xxxxxx.com\xxxxx" –Verbose"

If your CA server is caserver.com, you put caserver.com\caserver.

May 21, 2012 at 9:42 PM
mbernard wrote:

Hi stsauber,

     I'm having the same problem you were where you can see all the contacts but can't get a chat window to pop up.  It looks like you fixed that particular problem and I was just wondering what you did?

Thanks!


MBernard,

Unfortunately, I actually haven't solved this problem.  We no longer have the need for external chat, so this project is halted at that point, although I'd still like to solve the issue for curiosity's sake.  :)

Sorry I can't be much help.  If you ever figure it out, let me know, please.  Thanks.

May 21, 2012 at 9:49 PM

I did all the configuration and now when I tryied to access the URL "https://vmslw01.lw.local:442/Lync.Widget.Service/Service.svc/GetPresences?sipUris=sip:Nykolas.Lima@logicway.local&r=0.7185178105719388&callback=jQuery16102987667385023087_1337633089900&_=1337633097927" it gave the Javascript message: "Resource interpreted as Script but transferred with MIME type text/plain:".

 

How can I solve this?

(I just want to display the contact status)

May 21, 2012 at 9:52 PM

Did you add the MIME type of .less to be text/css?  It's in the documentation somewhere.

May 21, 2012 at 9:59 PM

Yes I did. I can run the sample application within orbitone Lync Server. When I change the serviceUrl to my Lync Server I have this Javascript message.

Has another way to test if my configurations are allright?

May 21, 2012 at 10:13 PM

Did you guys deploy the Lync Widget Presence with Visual Studio or manually through IIS?

I saw this stackoverflow post(http://stackoverflow.com/questions/4953232/resource-interpreted-as-script-but-transferred-with-mime-type-application-json). May be this the cause of my Javascript message?

May 21, 2012 at 11:35 PM

Guys I got it working.

The site of the service must hava only one autentication method. Then I restart my domain controller machine and Lync Server.

 

Thanks for the help.

May 22, 2012 at 1:35 PM

Nyko,

Nice work!  Did you use the same account for the trustedcontacturi and chatusersip?  I think that's where I got stuck.  I could see presence info and everything, but when I tried to hit "send" on the chat, nothing happened.

Thanks,

May 22, 2012 at 2:45 PM

I used the same account for chat just to not leave it empty.

I dont need to use the chat functionallity, only presence info.

 

Today Iam having the same problem of "Domain controller not found in the domain" without change anything in my configurations. Do you know what may cause this problem?

May 22, 2012 at 3:09 PM

I restarted the IIS site of presence service and it worked.

Do you guys know what happened?

May 23, 2012 at 2:24 PM

nykolaslima,

Sorry I've been away for a few days.  I deployed mine through VS but I still haven't gotten it working.  I'm having trouble getting it to show the presence info so we'll see.

As for your domain controller issue, I'm not really sure why that happened but I'm glad you were able to fix it.  Sorry I can't be more help.

May 23, 2012 at 5:20 PM
Edited May 23, 2012 at 5:27 PM

I still cannot get my presence info to show and was wondering if anyone could help.  I think my problem is just in the presence part.  My Web config is configured as below (I've included where I got the information from in case I'm looking in the wrong place).  My Service.svc starts fine but when I navigate to https://lyncservice.domain.net/service.svc/getpresences?sipuris=user@domain.net I get a request error. 

<add key="LyncServer" value="localhost"/>
    <add key="LyncServerPort" value="10607"/> 						                      
    <!-- presence -->
    <add key="ApplicationId" value="urn:application:lyncwidgetpresence"/> <!-- Get-CsTrustedApplicationEndpoint (ownerUrn)-->
    <add key="ApplicationName" value="lyncwidgetpresence"/>    <!-- Get-CsTrustedApplicationEndpoint -->
    <add key="TrustedContactURI" value="sip:..."/> <!-- Get-CsTrustedApplicationEndpoint (SipAddress)-->
    <!-- chat -->
    <add key="ChatUserSip" value="sip:..."/>
    <add key="ChatUserName" value="lyncpresence"/> 				
    <add key="ChatUserPass" value="password" />
    <add key="ChatUserDomain" value="DGLYNC"/>
    <add key="ChatTimeoutSeconds" value="60"/>
Jul 3, 2012 at 4:26 PM

hi,

I've got what can pobably be considered the same issues. The log file is all empty, the error file only shows success, yet none of the presences are there. Leaving the service to keep with the developers service, it shows my windows365 presence perfectly. However swapping back onto my internal one, it just shows nothing.

I'm completly baffled what is up, as nothing is showing any errors.

 

Any help would be much appreciated.

 

Al

Feb 21, 2014 at 8:30 AM
Hi,
when I try to build solution with visual studio I get error:
"CustomExtensions.cs(3,27,3,38): error CS0234: The type or namespace name 'UserService' does not exist in the namespace 'Lync.Widget.Library' (are you missing an assembly reference?)"
What am I doing wrong?