2

I've read the many other posts, but none have been able to help me. I'm running a WCF IIS project in one instance of Visual Studio, and in another I have a web forms client. The above error is what I get when I run both locally and the site tries to connect to the service. The EXACT same WCF code running on the server works when the same client running locally connects to it. I can't figure out why. I've tried to enable tracing but cannot get a file to generate. Here's my client config

 <client>
  <endpoint address="http://localhost:64974/Service1.svc/ws" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService" contract="ServiceReference1.IService" name="WSHttpBinding_IService">
    <identity>
      <dns value="host"/>
    </identity>
  </endpoint>
</client>

and here's the WCF config

 <services>    
  <service name="Service1">
    <endpoint address="ws" binding="wsHttpBinding" contract="IService">
      <identity>
        <dns value="host"/>
      </identity>
    </endpoint>
  </service>
</services>

I've changed the service names to remove private data

Patrick Goode
  • 1,412
  • 5
  • 20
  • 35
  • Are you using the built-in web server(cassini) in VS ? You may need to run it in IIS express or full IIS to support windows authentication. – Kiran Mothe Oct 14 '13 at 19:59
  • Yes, I'm running the local dev server. However, I can run MVC projects with the local dev server and User.Identity.Name is populated. – Patrick Goode Oct 14 '13 at 20:35
  • I'm not sure if cassini supports wcf, I'd recommend running it on IIS or IIS express in any case. – Kiran Mothe Oct 14 '13 at 20:44
  • Also, see a similar question at http://stackoverflow.com/questions/854395/help-how-to-enable-windows-authentication-on-asp-net-development-server – Kiran Mothe Oct 14 '13 at 20:52
  • Thanks, I think I got the service to run on IIS express locally, but the same error remains on the client – Patrick Goode Oct 14 '13 at 21:14
  • is windows authentication enabled? If not, see http://stackoverflow.com/questions/4762538/iis-express-windows-authentication for enabling windows authentication in IIS express. – Kiran Mothe Oct 14 '13 at 22:04
  • You may want to include the client and server Binding Configurations, which may be an important factor in determining the issue. – Seymour Oct 15 '13 at 10:38

1 Answers1

0

I've got it working now. Not sure what the problem was. I created a new client and ran it connecting locally to the WCF web project. Both are using the local development server. Thanks everyone for the help

Patrick Goode
  • 1,412
  • 5
  • 20
  • 35