New Posts New Posts RSS Feed: Windows Authentication not working
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Windows Authentication not working

 Post Reply Post Reply
Author
ceramist View Drop Down
Newbie
Newbie


Joined: 21-Dec-2011
Posts: 9
Post Options Post Options   Quote ceramist Quote  Post ReplyReply Direct Link To This Post Topic: Windows Authentication not working
    Posted: 24-Oct-2012 at 8:40am
Try changing from Negotiate to IntegratedWindowsAuthentication.
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 23-Oct-2012 at 12:32pm
We were not able to reproduce the error here.
 
I'm attaching a sample using Windows Authentication: uploads/892/T12239.zip
Back to Top
LowOrbit View Drop Down
Newbie
Newbie


Joined: 17-Aug-2007
Location: United States
Posts: 20
Post Options Post Options   Quote LowOrbit Quote  Post ReplyReply Direct Link To This Post Posted: 18-Oct-2012 at 2:47pm
I saw that article and tried that one also. I get the following when I try that:
 
 
 
Thanks!


Edited by LowOrbit - 18-Oct-2012 at 2:48pm
Back to Top
LowOrbit View Drop Down
Newbie
Newbie


Joined: 17-Aug-2007
Location: United States
Posts: 20
Post Options Post Options   Quote LowOrbit Quote  Post ReplyReply Direct Link To This Post Posted: 18-Oct-2012 at 2:40pm
I guess I should include that I am using version 6.1.8.1. 
 
Let me clarify a little what I'm trying to do. We want to rely on the BOS under IIS and ASP.Net "Windows Authentication" to verify that the current user is a valid windows user in our domain. In the client at the start of the application, we use the Authenticator to LOGIN (passing null). If the user is not a valid user, the system should throw an exception like I'm getting now. But if the user is a valid user (in our domain), the Login should succeed.
 
Then in a SaveInterceptor, I want to use the principal identity (which should now contain the users domain id) to look up additional information about that user from Active Directory (such as their Full Name, etc.). During the same, we update certain audit fields with their fullname. We don't have a user table in our database which is why we are going to A/D.
 
Thanks!
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 18-Oct-2012 at 2:37pm
We haven't done a very good job documenting this.  In order to pass Windows credentials from the client to the server the WCF binding must be modified.  You can do this either in the web.config or with a custom implementation of the DevForce ServiceHostEvents class, which is usually the easiest approach.  Here's information on implementing the class:  http://drc.ideablade.com/xwiki/bin/view/Documentation/code-sample-custom-server-configuration#HAcceptWindowscredentialswhenusingWindowsAuthenticationinIIS.
Back to Top
LowOrbit View Drop Down
Newbie
Newbie


Joined: 17-Aug-2007
Location: United States
Posts: 20
Post Options Post Options   Quote LowOrbit Quote  Post ReplyReply Direct Link To This Post Posted: 18-Oct-2012 at 1:48pm
Hello
 
I have a simple ntier test application on a Win7 64bit with IIS 7.5 installed. I am trying to get Windows Authentication to work but keep getting the following error when I trying to fetch anything:
 
"The current user is not authorized, and guest access is not allowed."
 
Here is my current web.config:
 
<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core"/>
  </configSections>
 
  <connectionStrings>
    <add name="ClassEntities" ..../>
  </connectionStrings>
  
  <ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig" >
 
    <logging logFile="log\DebugLog.xml" shouldLogSqlQueries="true"/>
    <objectServer>
      <serverSettings allowAnonymousLogin="false" useAspNetSecurityServices="true"/>
    </objectServer>
  </ideablade.configuration>
 
  <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"
                               multipleSiteBindingsEnabled="false" />
  </system.serviceModel>
 
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
    <authentication mode="Windows"/>
  </system.web>
 
</configuration>
Here is the pertinent part of the app.config:
  <ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig">
 
    <logging logFile="DebugLog.xml"/>
 
    <objectServer remoteBaseURL="http://localhost" serverPort="9009" serviceName="EntityService.svc" >
      <clientSettings isDistributed="true" />
    </objectServer>
  </ideablade.configuration>
Here is a shot of the web server Authentication section:
 
I have even called the Authenticator as such:
 
Authenticator.Instance.DefaultAuthenticationContext = Authenticator.Instance.Login(null);
I still get the same error. 
 
Any ideas?
 
Thanks!
 
Robert
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down