Solved

WCF Service on Windows 2003

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now