Vibrant discussion about CSLA .NET and using the framework to build great business applications.
Every day a new problem making every day damn frustrating at the moment and the chance of making deadlines more and more unlikely.
Today i have hit the "Remote Server returned and error NotFound" exception when trying to get credential sharing between a SL client and a backend. I have downloaded and run Rocky's sample: 04-DataPortal-110504\Authentication\Windows\Windows.sln and simply cannot figure out how to get it to run properly.
I can get it to run if i remove the following section from the config file:<security mode="TransportCredentialOnly"><transport clientCredentialType="Windows" /></security>I'm dealing with a lot of new technologies and approaches at the moment so please appreciate i am no expert in any of this. I need to get a bunch of things working first and come back and figure them all out later!
What do i have to do to get this sample to just work.
The "NotFound" exception is (sadly) useless. It just means that WCF couldn't wire up the client's call to a service. It usually does mean your call isn't getting to any of your server-side code, and often indicates a server-side configuration or assembly reference issue. Sometimes you can use fiddler or WCF tracing to get more information.
To put it bluntly: WCF security is a b*tch.
The number of moving parts and configuration options/issues are vast.
You can start by putting an aspx page into your web site, and on that page display the information from the current principal. That can often help diagnose errors with the server-side security configuration. Basically, before you can do anything on the client, you have to get IIS and ASP.NET configured to require Windows authentication and to do impersonation. This is easier to debug in aspx than in an svc.
I've recently had to get an SL4 app working with Windows/AD security and it did take a lot of work to figure out the right combination of settings on IIS and within the config file. In my case, I found it helpful first of all to browse to the service address and see if my browser could reach it. If I wasn't able to do that, I wouldn't bother with the app. That may or may not be the right way to do it, but that is how I approached it.
jh72i:Rocky can you get working on Csla90 for my boy should he be crazy enough to choose software as a career. If such a thing exists in 2030 :-)
I'll get right on that :)
Congratulations on the new baby, that's great news!
Thanks for the congrats Rocky - I'm pretty sure I have read that you are a dad too so you'll understand my emotional state at present. And thanks to both fo you for the steers about the notfound exception. I probably wasn't thinking straight before but my head is clear now and within 5 minutes of sitting at my desk i managed to sort out the problem. Well, for now at least. I looked at the IISExpress applicationhost.config file and enabled the WindowsAuthentication flag. That gets rid of the NotFound exception and I can see my security info travel to my dataportal_xyz methods. I have a suspicion that this probably isn't the ultimate solution but it allows me to get through this roadblock for now so, again, thank you both.
<security> <authentication> <windowsAuthentication enabled="true"> <providers> <add value="Negotiate" /> <add value="NTLM" /> </providers> </windowsAuthentication> </authentication>