Click here to Skip to main content
15,889,216 members
Home / Discussions / C#
   

C#

 
GeneralRe: Is it possible to create an Access database with Pure C# Code Pin
Syed Mujtaba Hassan20-Aug-07 2:51
Syed Mujtaba Hassan20-Aug-07 2:51 
AnswerRe: Is it possible to create an Access database with Pure C# Code Pin
Talal Sultan20-Aug-07 0:03
Talal Sultan20-Aug-07 0:03 
GeneralRe: Is it possible to create an Access database with Pure C# Code Pin
Infernojericho20-Aug-07 0:35
Infernojericho20-Aug-07 0:35 
GeneralRe: Is it possible to create an Access database with Pure C# Code Pin
Christian Graus20-Aug-07 0:45
protectorChristian Graus20-Aug-07 0:45 
GeneralRe: Is it possible to create an Access database with Pure C# Code Pin
Talal Sultan20-Aug-07 1:48
Talal Sultan20-Aug-07 1:48 
GeneralRe: Is it possible to create an Access database with Pure C# Code Pin
J4amieC20-Aug-07 1:02
J4amieC20-Aug-07 1:02 
GeneralRe: Is it possible to create an Access database with Pure C# Code Pin
JoeSharp20-Aug-07 1:02
JoeSharp20-Aug-07 1:02 
QuestionActive Directory Integration using C#.net Pin
shanthivasan19-Aug-07 22:26
shanthivasan19-Aug-07 22:26 
I am using VS 2003 .Net framework. I have to integrate the web application with active diretory. I browsed net i found the below code.no luck there.
i dont know how to solve the error.



void Page_Load(Object Src, EventArgs E )
{
if(!Page.IsPostBack)
{
lblMessage.Text = "use domain\\username format";
}
}
private void AuthenticateUser(object sender, EventArgs e)
{
string ldapPath = "LDAP://dc=domain",DC=dn;
DirectoryEntry de = new DirectoryEntry(ldapPath);
de.Username = txtUsername.Text;
de.Password = txtPassword.Text;
de.AuthenticationType = AuthenticationTypes.Secure;
try
{
string name = de.Name; //force a bind
lblMessage.Text = "Success, You have authenticated";
}
catch(Exception ex)
{
lblMessage.Text = "Failure: " + ex.Message;
}
finally
{
de.Close();
}
}


User name 
<asp:textbox id="txtUsername" runat="server">


password  
<asp:textbox id="txtPassword" runat="server" textmode="Password">


  
<asp:button id="btnSubmit" onclick="AuthenticateUser" runat="server" text="Submit">


<asp:label id="lblMessage" runat="server">


User name:
<%=User.Identity.Name %>


My process is running as:
<%=System.Security.Principal.WindowsIdentity.GetCurrent().Name %>






I am getting the following exception:

Failure: System.Runtime.InteropServices.COMException (0x8007054B): The specified domain either does not exist or could not be contacted at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_Name() at ASP.index_aspx.AuthenticateUser(Object sender, EventArgs e)


please advice on this
AnswerRe: Active Directory Integration using C#.net Pin
sathish s19-Aug-07 22:44
sathish s19-Aug-07 22:44 
GeneralRe: Active Directory Integration using C#.net Pin
shanthivasan19-Aug-07 23:33
shanthivasan19-Aug-07 23:33 
GeneralRe: Active Directory Integration using C#.net Pin
sathish s20-Aug-07 3:24
sathish s20-Aug-07 3:24 
GeneralRe: Active Directory Integration using C#.net Pin
shanthivasan20-Aug-07 3:31
shanthivasan20-Aug-07 3:31 
AnswerRe: Active Directory Integration using C#.net Pin
ekynox20-Aug-07 12:57
ekynox20-Aug-07 12:57 
QuestionC# 3.0 Limitation: Type Inference & Lambda Expressions Pin
SHaroz19-Aug-07 22:14
SHaroz19-Aug-07 22:14 
AnswerRe: C# 3.0 Limitation: Type Inference & Lambda Expressions Pin
originSH19-Aug-07 22:23
originSH19-Aug-07 22:23 
GeneralRe: C# 3.0 Limitation: Type Inference & Lambda Expressions Pin
SHaroz19-Aug-07 22:59
SHaroz19-Aug-07 22:59 
GeneralRe: C# 3.0 Limitation: Type Inference & Lambda Expressions Pin
originSH20-Aug-07 0:04
originSH20-Aug-07 0:04 
QuestionMutex and user account Pin
MarioMARTIN19-Aug-07 22:08
MarioMARTIN19-Aug-07 22:08 
AnswerRe: Mutex and user account Pin
Guffa20-Aug-07 0:53
Guffa20-Aug-07 0:53 
GeneralRe: Mutex and user account Pin
MarioMARTIN20-Aug-07 1:31
MarioMARTIN20-Aug-07 1:31 
AnswerRe: Mutex and user account Pin
pbraun20-Aug-07 12:00
pbraun20-Aug-07 12:00 
GeneralRe: Mutex and user account Pin
MarioMARTIN20-Aug-07 20:47
MarioMARTIN20-Aug-07 20:47 
GeneralRe: Mutex and user account Pin
MarioMARTIN20-Aug-07 21:26
MarioMARTIN20-Aug-07 21:26 
QuestionTo extract text of multiline textbox Pin
Mushtaque Nizamani19-Aug-07 21:50
Mushtaque Nizamani19-Aug-07 21:50 
AnswerRe: To extract text of multiline textbox Pin
Giorgi Dalakishvili19-Aug-07 21:55
mentorGiorgi Dalakishvili19-Aug-07 21:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.