This is a migrated thread and some comments may be shown as answers.

Reporting WCF Service + Windows Authentication

6 Answers 324 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Brian Workman
Top achievements
Rank 2
Brian Workman asked on 27 Apr 2010, 02:52 AM
I haven't been able to get it to work, not sure why.  The SL Report Viewer displays an exception when I change the security mode from default to Windows, I assume I'm doing something wrong with the bindings.  IIS is set for Windows Authentication, Anonymous Login disabled.  Any ideas?

Portion of web.config:

<authentication mode="Windows" />
<
identity impersonate="true" />

...

    <bindings> 
      <basicHttpBinding> 
        <binding name="basicHttpBinding_Windows">  
          <security mode="TransportCredentialOnly">  
            <transport clientCredentialType="Windows" /> 
          </security> 
        </binding> 
      </basicHttpBinding> 
      <webHttpBinding> 
        <binding name="webHttpBinding_Windows">  
          <security mode="TransportCredentialOnly">  
            <transport clientCredentialType="Windows" /> 
          </security> 
        </binding> 
      </webHttpBinding> 
    </bindings> 
 
...  
 
 <service name="Telerik.Reporting.Service.ReportService" behaviorConfiguration="ReportServiceBehavior">  
        <endpoint  
          address="" 
          binding="basicHttpBinding" 
          bindingConfiguration="basicHttpBinding_Windows" 
          contract="Telerik.Reporting.Service.IReportService">  
          <identity> 
            <dns value="localhost" /> 
          </identity> 
        </endpoint> 
        <endpoint  
          address="resources" 
          binding="webHttpBinding" 
          bindingConfiguration="webHttpBinding_Windows" 
          behaviorConfiguration="WebBehavior" 
          contract="Telerik.Reporting.Service.IResourceService" /> 
        <endpoint  
           address="mex" 
           binding="basicHttpBinding" 
           bindingConfiguration="basicHttpBinding_Windows" 
           contract="IMetadataExchange" /> 
      </service>

Thanks,
-Brian

6 Answers, 1 is accepted

Sort by
0
Brian Workman
Top achievements
Rank 2
answered on 27 Apr 2010, 09:25 PM
I removed the mex endpoint and it still produces an exception when running from the VS environment, but it appears to be working from IIS when published - odd!

Is removing mex the correct practice?  I assume the report viewer doesn't need it, but if so I don't know why it's inclusion creates an exception.

The reason why I had it in the first place was because it was in the example web.config here:
http://www.telerik.com/help/reporting/silverlight-hosting-in-iis.html

Thanks,
-Brian
0
Eric
Top achievements
Rank 1
answered on 05 Jul 2011, 08:52 PM
I'm having the same issue, and would also like to know if removing the mex endpoint is correct way to handle the problem.

Eric
0
BKR AG
Top achievements
Rank 1
answered on 16 Aug 2011, 11:50 AM
I also got the same issue and haven't been able to fix it yet.
Removing the mex didn't work for me.
In VS Debug everything works. On my live IIS I get this error.
0
Accepted
Steve
Telerik team
answered on 17 Aug 2011, 03:54 PM
Hi guys,

After some research, it seems that this is a common problem with WCF services and Windows Authentication and not a Telerik Reporting service specific issue. There are various threads on the net complaining for the very same thing, here is one post where users talk about this in the comments.
In some other posts, user report that adding bindingConfiguration to the mex endpoint with <transport clientCredentialType="Windows"/> as well addresses their problem.

@Michael: Visual Studio Development Server runs in a different security context than IIS and supports only NTLM Authentication, so we're surprised that your behavior is the opposite and not like what Brian experienced.

Best wishes,
Steve
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Adam
Top achievements
Rank 1
answered on 13 Sep 2011, 08:37 PM
Hi,

I am having the same problem too.  I am using a custom binding in my C# code.  So far it looks like this;


public ReportServiceClient Create(Uri remoteAddress)
{
    BasicHttpBinding binding = new BasicHttpBinding();
    binding.MaxReceivedMessageSize = Int32.MaxValue;
    binding.SendTimeout = new System.TimeSpan(0, 10, 0);
    return new ReportServiceClient(binding, new EndpointAddress(remoteAddress));
}



But my question is do I need to add something else to the binding so that it jives with AnonymousAuthentication disabled and only WindowsAuthentication enabled in IIS.
0
Adam
Top achievements
Rank 1
answered on 13 Sep 2011, 08:59 PM
Never mind, this post solved it.  I just pasted in the <system.serviceModel> portion straight from Mike's post.

http://www.telerik.com/community/forums/reporting/telerik-reporting/authentication-on-telerik-reports-wcf-service.aspx#1657788
Tags
General Discussions
Asked by
Brian Workman
Top achievements
Rank 2
Answers by
Brian Workman
Top achievements
Rank 2
Eric
Top achievements
Rank 1
BKR AG
Top achievements
Rank 1
Steve
Telerik team
Adam
Top achievements
Rank 1
Share this question
or