Problem on receiving event notification

Discussions related to SoftPro Select Server development.

Moderator: Phil Barton

Post Reply
kqian
Posts: 68
Joined: Wed Feb 23, 2011 4:01 pm

Problem on receiving event notification

Post by kqian »

I am trying to subscribe to SoftPro Events using the subscription form as below.
<Subscriptions xmlns="http://schemas.softprocorp.com/select/i ... on/2008/04">
<Subscription eventid="C4EDBD4F-F11D-4C48-BE08-8C105181F5C9">
<Filter></Filter>
<Transform />
<DeliveryKind>soap12</DeliveryKind>
<DeliveryAddress>http://MyServer/TestSoftProEventListene ... eryAddress>
</Subscription>
</Subscriptions>
But I am not able to receive notifications on my WCF listener service. The event log on SoftPro server side has the following errors:

"General notification failure on '1'. The caller was not authenticated by the service.
Failed to send SOAP notification '1'. The caller was not authenticated by the service."

Can anyone help to solve this problem? Thanks.

Kevin
Mark McKenna

Re: Problem on receiving event notification

Post by Mark McKenna »

The SOAP 1.2 delivery kind (per your subscription) uses WSHttpBinding so the problem is likely in the service endpoint configuration. It may just be a simple binding type mismatch, or perhaps something specific to the security configuration itself if the service endpoint is already configured for WSHttpBinding. WSHttpBinding authenticates against a Windows domain (Kerberos) by default. Look closely at your endpoint's binding configuration, in particular the security settings. If that doesn't provide your answer, please post your entire service configuration block here and we can go from there.
kqian
Posts: 68
Joined: Wed Feb 23, 2011 4:01 pm

Re: Problem on receiving event notification

Post by kqian »

Yes, It looks like something related to the security setting in the binding. I attached the full configuration file below. I tried to turn off the security by setting Mode to None, but still not work, showing error "Failed to send SOAP notification '113'. Secure channel cannot be opened because security negotiation with the remote endpoint has failed. This may be due to absent or incorrectly specified EndpointIdentity in the EndpointAddress used to create the channel. Please verify the EndpointIdentity specified or implied by the EndpointAddress correctly identifies the remote endpoint. "

So what are the security settings that SoftPro server is expecting from my event listener service? How is the binding defined on your client side?
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="wsHttpBindingConfig">
<security mode="None">
<transport clientCredentialType="None"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="WCFHostService.MyServiceBehavior"
name="SoftProEventListenerService.EventListenerService">
<endpoint address="" binding="wsHttpBinding" contract="SoftProEventListenerService.IEventListenerService" bindingConfiguration="wsHttpBindingConfig">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" name="mex" />
<host>
<baseAddresses>
<add baseAddress="http://Myserver/SoftProEventListenerService" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WCFHostService.MyServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
Mark McKenna

Re: Problem on receiving event notification

Post by Mark McKenna »

Double check your endpoint specification. The base address for HTTP appears to be in conflict with your subscription's delivery address.
kqian
Posts: 68
Joined: Wed Feb 23, 2011 4:01 pm

Re: Problem on receiving event notification

Post by kqian »

The baseaddress setting does not seem to be the cause. This is hosted in IIS. I verified the exact delivery address that I registered with SoftPro, it works fine (to identity the service), and I also have a test client that can call the service using that delivery address with no problem. When called from SoftPro, it shows authentication problem. So I don't what seeting I need to use in my endpoint configuration.
Mark McKenna

Re: Problem on receiving event notification

Post by Mark McKenna »

To answer your earlier question, for soap12 delivery type subscriptions, we use a WSHttpBinding type instance with all default settings. For soap11, we use a BasicHttpBinding type instance with, again, all default settings.

To that end, you should be able to use the default WSHttpBinding settings yourself, which means message level security and authentication using Windows client credentials. Since the Select Server service account will be the one to provide credentials, can you verify that it is a member of the same domain as your subscription service account?
kqian
Posts: 68
Joined: Wed Feb 23, 2011 4:01 pm

Re: Problem on receiving event notification

Post by kqian »

We have changed our SoftPro server to run with a domain account with the help from SoftPro customer support. Config file uses just default settings (attached below). But I am still not able to get any notifications by either email or WCF service.

With email subscription, I think we've put the right information in the properties setting (From, Smtp etc), but it shows "General notification failure on '12'. Failure sending mail".
With WCF service, I got "An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail".

Did I miss anything? Being struggling for quite a while on this. Can anyone help out?
<configuration>
<system.web>
<compilation debug="true" />
<identity impersonate="false" />
</system.web>
<system.serviceModel>
<services>
<service behaviorConfiguration="WCFHostService.MyServiceBehavior" name="SoftProEventListenerService.EventListenerService">
<endpoint address="" binding="wsHttpBinding" contract="SoftProEventListenerService.IEventListenerService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" name="mex" />
<host>
<baseAddresses>
<add baseAddress="http://wa-wcf/TestSoftProEventListener/ ... ervice.svc" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WCFHostService.MyServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
Mark McKenna

Re: Problem on receiving event notification

Post by Mark McKenna »

Kevin, with this latest service configuration, can you provide the event viewer error log entries that are created? Note that there may be a few in succession, so provide them all.

As for the email delivery problem, if you have already verified the host address and port setting of your SMTP Server, then I suspect this, too, is authentication related. Our SMTP client that is created by the Select Server authenticates using default credentials (SPSServer), if so challenged by your SMTP Server. Again, look at (or provide) the event viewer error log entries, which should bear this out.
kqian
Posts: 68
Joined: Wed Feb 23, 2011 4:01 pm

Re: Problem on receiving event notification

Post by kqian »

Hi Mark,

Thanks for your help. For email setting, we have changed the SoftPro server to run with a domain account. In the property page where we set the 'From" and "Smtp" settings, now it shows our domain account as the account for credentials (not the local .\spserver). So I assume your smtp cleint will use the new domain account to send email. But it still fails. I checked with our IT prople that the Smtp server log contains nothing from the SoftPro server.
The errors I posteded previously was from the event log, which does not contain enough info to understand the cause.
Is there other logging info for the server itslef available to help figure out the exact cause?
Our SoftPro server setup was done by Bill from your customer support. You may get detailed setup info from him.

Thanks.

Kevin
Mark McKenna

Re: Problem on receiving event notification

Post by Mark McKenna »

The Select Server notification settings do not provide authentication credentials. Rather, they designate the "From email address" for outgoing mail and the "SMTP Server host address".

For example: The credentials come from the logged on user, which is SPSServer for the mid-tier Select Server that is trying to send the email.

Also verify that your SMTP Server is listening to port 25, which we use by default, although we can manually assign this if need be (by way of a configuration file).

As for error log entries, these would be on the machine that is hosting the mid-tier Select Server. The "source" of any entry created by our mid-tier Server is shown as "SoftPro Select Server".
Post Reply