locked
Error in /Service/Service.svc/bhb when open MDS Explorer RRS feed

  • Question

  • Hi! I get stuck when opening the MDS Explorer on MDS Server and already tried all suggestions from forums but have no progress.
    I append my Environment, Log(IIS, MDS, Fiddler, UI) , and related config.
    Hope you could give me some advice. Thank you! 

    Environment

    OS : Windows Server 2008 R2SQL : Microsoft SQL Server 2012 - 11.0.2100.60 (X64)
             Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)
    IIS7
    Silverlight (64 bit) 5.1.20513
    Browser : IE9 , FF22, Chrome 28
    MDS Server is installed on VM, in Windows Domain 
    Login user has system administration permission.

    Application Pools Setting
    MDS Application
    (a) Managed Pipeline Mode = Integrated
    (b) Identity = ApplicationPoolIdentity, 



    UI Error Message

    When opening MDS Explorer,  the UI popup error messages like this.

    First error message window
    
    WebException: [HttpWebRequest_WebException_RemoteServer] 
    Arguments:  NotFound Debugging resource strings are unavailable
    -----------------------------------------------------
    Second error message window (only show up in Firefox)
    
    System.Reflection.TargetInvocationException: [Arg_TargetInvocationException]
    
    

    Fiddler Log
    seems I don't have permission to access the request URL : mdsdev:88/Service/Service.svc/bhb

    HTTP Error 401.2 - Unauthorized
    You are not authorized to view this page due to invalid authentication headers.
    Detailed Error Information
    Module IIS Web Core
    Notification AuthenticateRequest
    Handler svc-Integrated-4.0
    Error Code 0x80070005
    Requested URL http:  //   mdsdev:88/Service/Service.svc/bhb
    Physical Path C:\Program Files\Microsoft SQL Server\110\Master Data Services\WebApplication\Service\Service.svc\bhb
    Logon Method Not yet determined
    Logon User Not yet determined
    Failed Request Tracing Log Directory C:\inetpub\log

    IIS Log

    bhb again, not sure how to access it.

    /Explorer/AttributeSL.aspx MID=1&VID=1&EID=3
    /Service/Service.svc/bhb 

    2013-07-21 13:14:24 W3SVC2 fe80::208e:fa0c:31e5:901%10 GET /ScriptResource.axd d=jzBYvlgjGckxbHmd645HrUCsak8pPcTsujxzxXp5gfykwH0og-wOaIEfQRCkVtHUZaU9O-WZs75NSCtNmb4qyzx09zzgZlqq_Hxfv_GJZEA_V7wJtJkFpfiSaTBMqU17icKQwTLbTKf4fmtiRlbLYQ2&t=ffffffffb9f9f042 88 domain\nick fe80::208e:fa0c:31e5:901%10 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:22.0)+Gecko/20100101+Firefox/22.0 mdsdev:88 200 0 0 1
    2013-07-21 13:14:26 W3SVC2 fe80::208e:fa0c:31e5:901%10 GET /Explorer/AttributeSL.aspx MID=1&VID=1&EID=3 88 domain\nick fe80::208e:fa0c:31e5:901%10 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:22.0)+Gecko/20100101+Firefox/22.0 mdsdev:88 200 0 0 326
    2013-07-21 13:14:27 W3SVC2 fe80::208e:fa0c:31e5:901%10 POST /Service/Service.svc/bhb - 88 domain\nick fe80::208e:fa0c:31e5:901%10 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:22.0)+Gecko/20100101+Firefox/22.0 mdsdev:88 500 0 0 157


    MDS Log

    Only first two rows mention error, cannot figure out what they mean.

    MDS Error: 0 : Service started successfully,  Assembly version: 11.0.0.0, file version: 11.0.2100.60 ((SQL11_RTM).120210-1917 )
        DateTime=2013-07-21T13:26:55.2677163Z
    MDS Error: 0 : ApiContractVersion: 5102
        DateTime=2013-07-21T13:26:55.2686929Z
    MDS Start: 1 : Service.InitializeExpirationStatus


    My Settings

    Authentication :
    (a) MDS Website : Enable Windows Authentication. Disable Anonymous Authentication.

    Under Windows Authentication > Advanced Settings > set Extended Protection = Accept or Required
    (b) Service Folder :  Enable Windows Authentication. Enable Anonymous Authentication.


    Web.config

    In MDS Web.config, add policyEnforcement = WhenSupported

    My Web.config

    <system.serviceModel>
        <behaviors>
          <serviceBehaviors>
            <behavior name="mdsWsHttpBehavior">
              <serviceMetadata httpGetEnabled="true" httpsGetEnabled="false" />
              <serviceDebug includeExceptionDetailInFaults="false" />
              <serviceThrottling maxConcurrentSessions="400" />
              <dataContractSerializer maxItemsInObjectGraph="999999999" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <bindings>
          <wsHttpBinding>
            <binding name="mdsWsHttpBinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
              <readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647" />
              <security mode="Message">
                <message clientCredentialType="Windows" />
    <transport clientCredentialType="Windows">
     <extendedProtectionPolicy policyEnforcement="WhenSupported" />
    </transport>
              </security>
            </binding>
          </wsHttpBinding>
          <basicHttpBinding>
            <binding name="mdsBasicHttpBinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
              <readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647" />
              <security mode="TransportCredentialOnly">
                <transport clientCredentialType="Windows" />
    <extendedProtectionPolicy policyEnforcement="WhenSupported" />
              </security>
            </binding>
          </basicHttpBinding>
        </bindings>
        <services>
          <service behaviorConfiguration="mdsWsHttpBehavior" name="Microsoft.MasterDataServices.Services.Service">
            <endpoint binding="wsHttpBinding" bindingConfiguration="mdsWsHttpBinding" bindingNamespace="http://schemas.microsoft.com/sqlserver/masterdataservices/2009/09" contract="Microsoft.MasterDataServices.Services.ServiceContracts.IService" />
            <endpoint address="bhb" binding="basicHttpBinding" bindingConfiguration="mdsBasicHttpBinding" bindingNamespace="http://schemas.microsoft.com/sqlserver/masterdataservices/2009/09" contract="Microsoft.MasterDataServices.Services.ServiceContracts.IService" />
          </service>
        </services>
      </system.serviceModel>


    My applicationHost.config

     <location path="MDS">
            <system.webServer>
                <security>
                    <authentication>
    <basicAuthentication enabled="false" />
                        <windowsAuthentication enabled="true" useKernelMode="true">
                            <extendedProtection tokenChecking="Allow" />
                        </windowsAuthentication>
                        <anonymousAuthentication enabled="false" />
                    </authentication>
                </security>
            </system.webServer>
        </location>
        <location path="MDS/Service">
            <system.webServer>
                <security>
                    <authentication>
    <basicAuthentication enabled="false" />
                        <anonymousAuthentication enabled="true" />
    <!--anonymousAuthentication enabled="true" userName="" /-->
                        <windowsAuthentication enabled="true" />
                    </authentication>
                </security>
            </system.webServer>
        </location>


       
    Sunday, July 21, 2013 3:41 PM

Answers

  • Nick,

    Not sure if you have solved the issue, but I had similar issues when playing around with MDS in my lab.

    I had it installed on Windows Server 2012 R2. The application pool my application was running was .Net 4, so I also had to install the HTTP Activation and TCP Activation features under 4.5 Framework Features -> WCF Features (not sure if you need the TCP Activation, but I installed it just in case).

    After doing so, MDS Explorer works without errors.

    Thursday, November 28, 2013 1:23 PM
  • Hi Nick,

    Please refer to the following article to see if this help to solve this issue:
    Error message when you try to visit a Web page that is hosted on IIS 7.0: "HTTP Error 401.2 - Unauthorized": http://support.microsoft.com/kb/942043

    For more information, please see the following article:
    http://blog.hoegaerden.be/2010/02/14/iis-7-5-and-windows-authentication/

    Best Regards,


    Elvis Long
    TechNet Community Support

    Tuesday, July 23, 2013 2:43 AM

All replies

  • Hi Nick,

    Please refer to the following article to see if this help to solve this issue:
    Error message when you try to visit a Web page that is hosted on IIS 7.0: "HTTP Error 401.2 - Unauthorized": http://support.microsoft.com/kb/942043

    For more information, please see the following article:
    http://blog.hoegaerden.be/2010/02/14/iis-7-5-and-windows-authentication/

    Best Regards,


    Elvis Long
    TechNet Community Support

    Tuesday, July 23, 2013 2:43 AM
  • Hi! Elvis,

    Thanks for your response , I try those settings but still not work. The current IIS setting is as below

    Authentication :
    (a) MDS Website : Enable Windows Authentication. Disable Anonymous Authentication.
    Under Windows Authentication > Advanced Settings > set Extended Protection = Accept or Required
    (b) Service Folder : Enable Windows Authentication. Enable Anonymous Authentication.

     

    I trace by Fiddler and Green arrows point out the bad request when I access Explorer.

    Detail error is  https://dl.dropboxusercontent.com/u/12915406/MDS/fiddler-log.html
    HTTP Error 401.2 - Unauthorized is still the same even apply the suggestions from the links you provided.


    I wonder what \Service.svc\bhb is , find bhb in Web.config and set some Authentication to None to test if I can bypass it.

    Now the Fiddler has different error.

    a:DestinationUnreachable
    The message with To 'http://mdsdev.tw.companynet.org:88/Service/Service.svc/bhb' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree.


    This link has similar problem but I have no idea where I can apply his workaround in my environment.

    http://social.msdn.microsoft.com/Forums/vstudio/en-US/b5ae495b-f5fb-4eed-ae21-2b2280d4fec3/address-filter-mismatch-wcf-addressing

    Append my Web.confg and applicationHost.config snippet  for your reference.
    Thank you so much!

    Web.Config

    <system.serviceModel>
        <behaviors>
          <serviceBehaviors>
            <behavior name="mdsWsHttpBehavior">
              <serviceMetadata httpGetEnabled="true" httpsGetEnabled="false" /> 
              <serviceDebug includeExceptionDetailInFaults="false" />
              <serviceThrottling maxConcurrentSessions="400" />
              <dataContractSerializer maxItemsInObjectGraph="999999999" />
    		 </behavior>
          </serviceBehaviors>
    	</behaviors>
        <bindings>
          <wsHttpBinding>
            <binding name="mdsWsHttpBinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
              <readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647" />
              <security mode="Message">
                <message clientCredentialType="Windows" />
    			<transport clientCredentialType="Windows">
    						  <extendedProtectionPolicy policyEnforcement="WhenSupported" />
    			</transport>
              </security>
            </binding>
          </wsHttpBinding>
          <basicHttpBinding>
            <binding name="mdsBasicHttpBinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
              <readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647" />
        	  <security mode="None">
                <transport clientCredentialType="None" />
    	      </security>
            </binding>
          </basicHttpBinding>
        </bindings>
        <services>
          <service behaviorConfiguration="mdsWsHttpBehavior" name="Microsoft.MasterDataServices.Services.Service">
    	    <endpoint binding="wsHttpBinding" bindingConfiguration="mdsWsHttpBinding" bindingNamespace="
    		http://schemas.microsoft.com/sqlserver/masterdataservices/2009/09" contract="Microsoft.MasterDataServices.Services.ServiceContracts.IService" />
            <!--Silverlight doesn't support wsHttpBinding -->
            <endpoint address="bhb" binding="basicHttpBinding" bindingConfiguration="mdsBasicHttpBinding" bindingNamespace="http://schemas.microsoft.com/sqlserver/masterdataservices/2009/09" contract="Microsoft.MasterDataServices.Services.ServiceContracts.IService" />
          </service>
        </services>
      </system.serviceModel>

    applicationHost.config

    <location path="Default Web Site">
            <system.webServer>
                <security>
                    <authentication>
    					<basicAuthentication enabled="false" />
                        <windowsAuthentication enabled="true" useKernelMode="true">
                            <extendedProtection tokenChecking="Allow" />
                        </windowsAuthentication>
    					<anonymousAuthentication enabled="true" />
                    </authentication>
                </security>
            </system.webServer>
        </location>
        <location path="MDS">
            <system.webServer>
                <security>
                    <authentication>
    					<basicAuthentication enabled="true" />
                        <windowsAuthentication enabled="true" useKernelMode="true">
                            <extendedProtection tokenChecking="Allow" />
                        </windowsAuthentication>
                        <anonymousAuthentication enabled="false" />
                    </authentication>
                </security>
            </system.webServer>
        </location>
        <location path="MDS/Service">
            <system.webServer>
                <security>
                    <authentication>
    					<basicAuthentication enabled="true" />
                        <anonymousAuthentication enabled="true" userName="" />
    					<!--anonymousAuthentication enabled="true" userName="" /-->
                        <windowsAuthentication enabled="true" />
                    </authentication>
                </security>
            </system.webServer>
        </location>


    Tuesday, July 23, 2013 8:10 AM
  • Nick,

    Not sure if you have solved the issue, but I had similar issues when playing around with MDS in my lab.

    I had it installed on Windows Server 2012 R2. The application pool my application was running was .Net 4, so I also had to install the HTTP Activation and TCP Activation features under 4.5 Framework Features -> WCF Features (not sure if you need the TCP Activation, but I installed it just in case).

    After doing so, MDS Explorer works without errors.

    Thursday, November 28, 2013 1:23 PM
  • Thanks indigocy, that fixed an issue I had with connecting to SQL Server 2014 CTP2 MDS from Excel too.
    Friday, February 21, 2014 6:16 AM
  • hi all;

    in my case this are the modifications that i have done:

    add to web.config : 
    <system.serviceModel>
        <serviceHostingEnvironment multipleSiteBindingsEnabled="true" >
        </serviceHostingEnvironment>
      </system.serviceModel>

     ref (http://www.dotnetfunda.com/forums/show/4546/this-collection-already-contains-an-address-with-scheme-http-there-can)

    modify auyhentification:

    Open the Internet Information Services (IIS) Manager 
    Expand: MDS Sites  
    Open Authentication 
    Select Windows Authentication 
    Select Advanced Settings... (on the right hand side) 
    Set Extended Protection to Off 
    Save the settings 
    Run the command: iisreset /noforce

    (ref:http://www.gfi.com/support/products/Error-The-ExtendedProtectionPolicy-PolicyEnforcement-values-do-not-match-IIS-has-a-value-of-WhenSupported-while-the-WCF-Transport-has-a-value-of-Never-when-a-client-attempts-to-connect-to-the-serve)

    see also the following link they are usefull:

    https://blogs.msdn.microsoft.com/jason_howell/2011/08/04/mds-services-svc-web-service-gives-http-error-404-3-not-found-after-i-just-installed-it-successfully/
    http://social.technet.microsoft.com/wiki/contents/articles/4520.troubleshooting-the-master-data-services-add-in-for-excel.aspx


    • Edited by karimb85 Tuesday, April 26, 2016 9:54 AM
    Tuesday, April 26, 2016 9:52 AM
  • FYI, I fixed this issue by changing the security mode from Message and TransportCredentialOnly to Transport into the <bindings> paragraph into web.config.

    By hoping this will help someone lost as I were :p


    • Edited by Fred_DBA Wednesday, February 19, 2020 8:46 AM
    Wednesday, February 19, 2020 8:44 AM
  • This is just a memory issue, free your ram, problem goes away.
    Monday, June 8, 2020 9:03 AM