Solved

WCF Service on Windows 2003

Posted on 2011-02-18
4
451 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
  • 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Vb.net threads keep increasing 2 38
Get month and date in a format 4 35
How can I do Unit Testing with Session ? 1 13
IDE for Python 5 27
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

820 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