[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

WCF Service on Windows 2003

Posted on 2011-02-18
4
Medium Priority
?
461 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 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Here I am going to explain creating proxies at runtime for WCF Service. So basically we use to generate proxies using Add Service Reference and then giving the Url of the WCF service then generate proxy files at client side. Ok, what if something ge…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Integration Management Part 2
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

831 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