Solved

WCF Service on Windows 2003

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access Web appliction 7 47
Icons and Colors for Terms 3 24
How would you add MULTITHREADING to the attached C# code? 4 51
how to read json value 2 30
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

910 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

22 Experts available now in Live!

Get 1:1 Help Now