Web Service Problem - ServiceMetadataBehavior

Follow

Date: September 1, 2015
Revision: 1.1

Problem:

When trying to launch the ERPM web service, the following error message is observed:

Code:
The HttpGetEnabled property of ServiceMetadataBehavior is set to true and the HttpGetUrl property is a relative address, but there is no http base address.  Either supply an http base address or set HttpGetUrl to an absolute address.

Cause:

The cause of the error is due to mismatched configuration information in the web service web.config file. In ERPM 4.83.9, the web.config file contains elements for https and http. In some cases, this can cause a conflict.

This is the offending section of the default web.config problem:

Code:
      <serviceBehaviors>
        <behavior name="JsonDefault">
         <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
        <behavior name="SOAPDefault">
         <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>

Resolution:

If your installation is affected by this error, determine if the web service server is configured to use SSL or not. If the web.config file is configured to use SSL, it will may be necessary to remove the httpGetEnabled="true" element from the web.config file.

The updated web.config file will now resemble the following:

Code:
      <serviceBehaviors>
        <behavior name="JsonDefault">
         <serviceMetadata httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
        <behavior name="SOAPDefault">
         <serviceMetadata httpsGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>

Save the file. There is no need to restart IIS.

Applies To:

Enterprise Random Password Manager (ERPM) 4.83.9

Was this article helpful?
0 out of 0 found this helpful

Comments

Powered by Zendesk