5

We have developed a provider hosted app by pointing to SharePoint online which holds a simple logic in the app installed event.

The remote web component of the app is deployed to an on-permises server's IIS. (With SSL offloading enabled. SSL is offloaded from the load balancer and http requests are recived by the IIS)

When the app is installed in the sites, we are getting an exception with the below message.

"The remote event receiver callout failed. Details: There was no endpoint listening at https://spapps.contoso.com/Services/AppEventReceiver.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details."

From the browser we are able to access the service directly in the browser, its accessible at this url https://spapps.contoso.com/Services/AppEventReceiver.svc. But on accessing the wsdl url "https://spapps.contoso.com/Services/AppEventReceiver.svc?wsdl" we see that the address location of the service is in http mode.

  <wsdl:service name="AppEventReceiver">
  <wsdl:port name="BasicHttpBinding_IRemoteEventService" binding="tns:BasicHttpBinding_IRemoteEventService">
    <soap:address location="http://spapps.contoso.com/services/AppEventReceiver.svc"/>
    </wsdl:port>
   </wsdl:service>

We do not have any dns entry registered for the http url and its not recommended as per the company policies. Is there any solution to access the remote component of the app event reciever with SSL offloading setup..???

2 Answers 2

1

If your problem really is with DNS, you might try adding an entry to the hosts file (c:\windows\system32\drivers\etc\hosts) on your SharePoint machine, and add an entry like this:

192.168.101.4 spapps.contoso.com

Where you replace 192.168.101.4 with the actual IP of your remote web.

If by "We do not have any dns entry registered for the http url", you are really saying that the web server on your remote web does not have a binding for port 80, then I would suggest you try temporarily adding that binding, and see if the problem goes away.

If you still have problems, here are some things you might try:

1.) Make sure that there is a web.config file in your /Services directory that allows anonymous access like this:

<?xml version="1.0" encoding="utf-8"?>

<configuration>
    <system.web>
        <authorization>
            <allow users="?" />
        </authorization>
    </system.web>
</configuration>

2.) When you get the error message, do you get a CorrelationID? If so, use one of the ULS Viewers to filter by the correlation ID, and find all of the actual error messages inside the SharePoint log.

3.) Setup Fiddler on your SharePoint server, and temporarily add the following to SharePoint's web.config (make sure to remove this when you are done). File is usually in c:\inetpub\wwwroot\wss\VirtualDirectories\80)

  <system.net>
    <defaultProxy>
      <proxy usesystemdefault="False" bypassonlocal="False" proxyaddress="http://127.0.0.1:8888" />
    </defaultProxy>
     <settings>
       <httpWebRequest useUnsafeHeaderParsing="true" />
     </settings>

   </system.net>

Then, re-deploy the app so that SharePoint will call your remove event receiver, and look in the Fiddler "Inspectors" window to see what errors occurred in the response.

1

I know this is a very late answer, but I came here with the same issue. Hoping to help somebody who stumbles across this post in the future.

Enabled browsing to wsdl service from this answer https://stackoverflow.com/questions/2100426/wcf-hosting-can-access-svc-file-but-cannot-go-to-wsdl-link#answer-2100661

In the below portion, for first <endpoint binding> element, used basicHttpsBinding instead of basicHttpBinding

<service behaviorConfiguration="MetadataBehavior" name="YourService">
    <endpoint address="" 
              binding="basicHttpBinding" 
              contract="IYourService" />
    <endpoint address="mex" 
              binding="mexHttpBinding" 
              contract="IMetadataExchange" />
</service>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.