one other possibility: 7. You have not attempted to bind to a System.DirectoryServices.DirectoryEntry using this method.
-----Original Message----- From: Ryan Jameson (USA) Sent: Tuesday, August 13, 2002 3:57 PM To: dotnet Subject: RE: C# - System.Data.OleDb - Trusted_Connection=yes First: All I know is I have followed 7 different methods, the first of which came from MSDN and they only work with Basic Authentication. When I uncheck basic and check integrated authentication I get the completely undocumented exception: System.Runtime.InteropServices.COMException: The authentication mechanism is unknown I defy you to find some documentation. Second: My point on documentation is that proper javadoc includes documenting exceptions and their causes. Hence, if Microsoft had stolen javadoc I may be able to at least discover what "The authentication mechanism is unknown" really means. Also, when I reference MSDN for descriptions on machine.config I get incomplete & as far as I can tell with the <identity impersonate="true" /> property ... incorrect definitions. Now it sounds like you have your environment working fine. So you offer hope, maybe I have yet to get advice from an accurate source. However, your reply offered no advice. Therefore, I am still stuck. Here are some possibilities: 1. You have both Integrated and Basic checked in IIS, in which case my code works, but it also prompts my intranet users for an unecessary username and password. 2. You are not running in mixed mode. (which I cannot test because I'm in a mixed mode environment) 3. You have a framework version different than the current release. 4. You changed the default configuration in some way other than <identity impersonate="true" /> to make it work. 5. You are referencing some barely documented module to allow this to work. 6. Some bug in the framework is causing inconsistent behavior. <>< Ryan -----Original Message----- From: Kats, Sergey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 13, 2002 3:37 PM To: dotnet Subject: RE: C# - System.Data.OleDb - Trusted_Connection=yes Ryan, Integrated Windows Authentication has nothing to do with ASP.NET impersonation. Both work just fine. On my machine I have IIS app configured to allow only Integrated Windows Auth. My web.config file has the following: <configuration> <system.web> <identity impersonate="true" /> </system.web> </configuration> My code runs under the current user's account. > Bill, if your listening, I have gotten over the fact that C# > is a blatant rip off of Java, right down to machine.config > and web.config files, but my gripe is, where in the heck do I > find documentation on this stuff. I wish you would of stolen > javadoc from Sun as well. > There's plenty of documentation online, ever heard of MSDN? Sergey > -----Original Message----- > From: Ryan Jameson (USA) [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 13, 2002 5:12 PM > To: dotnet > Subject: RE: C# - System.Data.OleDb - Trusted_Connection=yes > > > The final Story: > > It appears that ASP.NET does not support Integrated Windows > Authentication when <identity impersonate="true" /> is set > in the application Web.config file. This all works as > expected if I turn off IAuth and turn on Basic > Authentication, which I will not use simply because it will > require my already authenticated intranet users enter their > username and password all over again. This same method works > great in PHP using IAuth. Go figure. > > WTG Bill!!! > > <>< Ryan > > -----Original Message----- > From: Ryan Jameson (USA) > Sent: Tuesday, August 13, 2002 2:42 PM > To: dotnet > Subject: RE: C# - System.Data.OleDb - Trusted_Connection=yes > > > One step further... > > SERVER/ASPNET required privilege to act as part of the > operating system. Upon granting that I was able use > impersonate a specified user and get the result I wanted. > However, I still cannot get the IIS user token to pass > through. Anytime I leave the username and password strings > empty I get this: > > Exception Details: > System.Runtime.InteropServices.COMException: The > authentication mechanism is unknown > > ... Please reply if this is familiar. :-) > > <>< Ryan > > > -----Original Message----- > From: Ryan Jameson (USA) > Sent: Tuesday, August 13, 2002 1:40 PM > To: dotnet > Subject: RE: C# - System.Data.OleDb - Trusted_Connection=yes > > > I found this routing around in machine.config: > > <!-- > identity Attributes: > impersonate="[true|false]" - Impersonate Windows User > userName="Windows user account to impersonate" | empty string > implies impersonate the LOGON user specified by IIS > password="password of above specified account" | empty string > --> > <identity impersonate="false" userName="" password=""/> > > When I set it to true .NET blows up with "The authentication > mechanism is unknown" ... > > I'm sure this is the right path. I'll continue to try to > figure it out. > > <>< Ryan > > > > -----Original Message----- > From: Ryan Jameson (USA) > Sent: Tuesday, August 13, 2002 1:21 PM > To: dotnet > Subject: RE: C# - System.Data.OleDb - Trusted_Connection=yes > > > Thanks for the reply, > > I'm using ADO because it is more generic and my development > methodology does not allow me to code for a specific database > platform. The connection string is fine, the problem is the > user it tries to use. In machine.config I do have > comImpersonationLevel="Impersonate" set, but it still insists > on using the generic account. > > Bill, if your listening, I have gotten over the fact that C# > is a blatant rip off of Java, right down to machine.config > and web.config files, but my gripe is, where in the heck do I > find documentation on this stuff. I wish you would of stolen > javadoc from Sun as well. > > <>< Ryan > --- You are currently subscribed to dotnet as: [EMAIL PROTECTED] To unsubscribe send a blank email to %%email.unsub%% --------- Administrated by 15 Seconds : http://www.15Seconds.com List Archives/Search : http://local.15Seconds.com/search Subscription Information : http://www.15seconds.com/listserv.htm Advertising Information: http://www.internet.com/mediakit/ --- You are currently subscribed to dotnet as: [EMAIL PROTECTED] To unsubscribe send a blank email to %%email.unsub%% --------- Administrated by 15 Seconds : http://www.15Seconds.com List Archives/Search : http://local.15Seconds.com/search Subscription Information : http://www.15seconds.com/listserv.htm Advertising Information: http://www.internet.com/mediakit/ --- You are currently subscribed to dotnet as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] --------- Administrated by 15 Seconds : http://www.15Seconds.com List Archives/Search : http://local.15Seconds.com/search Subscription Information : http://www.15seconds.com/listserv.htm Advertising Information: http://www.internet.com/mediakit/
