Solved

WCF Service on Windows 2003

Posted on 2011-02-18
4
453 Views
Last Modified: 2012-05-11
I have a silverlight application that connects to a WCF service to get data.  For some reason I am having a lot of problems when trying to get the application to work on almost every machine running Windows 2003 and IIS 6 when using Windows Authentication for the application.  Currently I only have this configuration working on two machines.  The first machine is an internal test machine that I didn't have any trouble setting up.  The second machine is a customers machine that I was able to eventually get to work but I am not sure what I did differently or why it eventually started to work.

The folders in the application are:

1. bin (contains the dlls)
2. ClientBin (contains the xap)
3. service (contains the svc)

The steps that I am taking are:

1.  Set the directory security for the application folder to use Integrated WIndows Authentication
2.  Set the directory security for the service folder to use Anonymous Authentication
3.  Restart IIS
4.  Open a new browser (I have found that I try to use the same browser it still fails)

The application loads successfully and then when I access a page that tries to utilize the service I get a Not Found error.  If I reconfigure IIS to use Anonymous authentication for everything it works fine.  I really don't understand what I am missing.
0
Comment
Question by:kmcbrearty
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 6

Assisted Solution

by:Ramone_Hamilton
Ramone_Hamilton earned 500 total points
ID: 34927129
Is basicHttpBinding set within the web.config ov your WCF service?  This has happened to me before and that solved my problem.
0
 
LVL 3

Author Comment

by:kmcbrearty
ID: 34927179
Yes, but I am manually configuring the binding when I connect to the web service.  Both the web.confg contents and the code that I am using to create the binding are attached. The code starts on line 45.

<system.serviceModel>
		<bindings>
			<basicHttpBinding>
				<binding name="basicHttpBinding0" receiveTimeout="00:59:00" sendTimeout="00:59:00" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" />
			</basicHttpBinding>
		</bindings>

		<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="false">
			<baseAddressPrefixFilters>
			</baseAddressPrefixFilters>
		</serviceHostingEnvironment>

		<services>
			<service behaviorConfiguration="ExecuKeysSL.Web.EKServiceBehavior" name="ExecuKeysSL.Web.EKService">
				<endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttpBinding0" contract="ExecuKeysSL.Web.IEKService" />
				<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
			</service>
			<service behaviorConfiguration="ReportServiceBehavior" name="Telerik.Reporting.Service.ReportService">
				<endpoint address="" binding="basicHttpBinding" contract="Telerik.Reporting.Service.IReportService" />
				<endpoint address="resources" behaviorConfiguration="WebBehavior" binding="webHttpBinding" contract="Telerik.Reporting.Service.IResourceService" />
				<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
			</service>
		</services>
		<behaviors>
			<serviceBehaviors>
				<behavior name="ExecuKeysSL.Web.EKServiceBehavior">
					<serviceMetadata httpGetEnabled="true" />
					<serviceDebug includeExceptionDetailInFaults="false" />
					<dataContractSerializer maxItemsInObjectGraph="655360000" />
				</behavior>
				<behavior name="ReportServiceBehavior">
					<serviceMetadata httpGetEnabled="true" />
					<serviceDebug includeExceptionDetailInFaults="false" />
				</behavior>
			</serviceBehaviors>
			<endpointBehaviors>
				<behavior name="WebBehavior">
					<webHttp />
				</behavior>
			</endpointBehaviors>
		</behaviors>
	</system.serviceModel>


    Public Sub New()
        myBinding = New BasicHttpBinding
        myBinding.ReceiveTimeout = New TimeSpan(0, 59, 0)
        myBinding.SendTimeout = New TimeSpan(0, 59, 0)
        myBinding.OpenTimeout = New TimeSpan(0, 1, 0)
        myBinding.CloseTimeout = New TimeSpan(0, 1, 0)
        myBinding.MaxBufferSize = 2147483647
        myBinding.MaxReceivedMessageSize = 2147483647

        address = New EndpointAddress(New Uri(Application.Current.Host.Source, "../service/EKService.svc"))
        proxy = New EKServiceClient(myBinding, address)
    End Sub

Open in new window

0
 
LVL 3

Accepted Solution

by:
kmcbrearty earned 0 total points
ID: 37532127
This turned out to be an issue with the IIS security settings.  I found that there are differences between the way this configuration needs to be setup in IIS 6 and IIS7.  Once the security settings were set correctly everything worked correctly.
0
 
LVL 3

Author Closing Comment

by:kmcbrearty
ID: 37555488
Best description of the solution.
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Copying from a network share 3 36
Web page design problem 3 39
Visual Studio Start / Browser Emulator menu different 2 33
Difference between Highcharts and Mapbox 10 42
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question