|
|
Hi there, have you used AD thru .net before? The following works if executed in an app on my machine but fails if used in a web service. Maybe you know what's actually happening beneath?
Appreciate any help TT
[WebMethod]
public bool LogonValid(string user, string password){
// validate the user credentials
string[] dirPaths = new string[] {"LDAP://dc=bbsaa, dc=local"};
return LogonValid(dirPaths, user, password);
}
private static bool LogonValid(string[] paths, string userName, string password) {
foreach (string path in paths){
DirectoryEntry entry = new DirectoryEntry(path, userName, password, AuthenticationTypes.Secure);
// Bind to the native AdsObject to force authentication.
Object obj = entry.NativeObject;
DirectorySearcher search = new DirectorySearcher(entry);
search.Filter = "(SAMAccountName=" + userName + ")";
search.PropertiesToLoad.Add("cn");
SearchResult result = search.FindOne();
if(null != result) {
return true;
}
}
return false;
}
|
|
|
|
|
Hi,
i got a very silly doubt but i want to clarify that.
my doubt is,
what do we call the list of menuitems which are sepeated by a seperated
is it a group.
for ex. menu has llike this
menuitem1
menuitem2
menuitem3
---------
menuitem4
menuitem5
now what do we call menuitem1,menuitem2,menuitem3 group is it the group of menuitems or anything else.
please clarify,
thanks.
|
|
|
|
|
ya you can say it a sort of groupping.MenuItem groupped accroding to their functionality.for more just have a look of any menu given MS application.like IE
sameer
|
|
|
|
|
when user click on stop button on the mediaplayer, which event will run?
i want to get it to stop a timer.
|
|
|
|
|
I got it
private void axWindowsMediaPlayer1_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
will run !!
|
|
|
|
|
Hi all, I started using Visual C# Express 2005, and to my horror realized it doesn't support setup & deployment projects, it only has the ClickOnce Publisher.
And I only recieve the one manifest problem after the other and its making me
Have any of you used an external installer, something that I can just add my project outputs and it creates the needed msi file for installation, and if possible deploy the dotnet framework all at once. Freeware is always nice
Thanks in advance
He who laughs last is a bit on the slow side
|
|
|
|
|
can i get a form for console application?
ravi
|
|
|
|
|
You can write a console app that also shows a form, sure. Just start with a console app and add a form to it.
Is this what you meant ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I Have a search criteria form.I enter related information and i will see the related information in datagrid.Now if i have one lakh related records how can i see the records in datagrid.
|
|
|
|
|
Ravi Shankar43 wrote: lakh
This is not a word. I have no idea what you're asking ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: Ravi Shankar43 wrote:
lakh
This is not a word. I have no idea what you're asking ?
I think he meant, Lacs
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
means some thousands of records.how can i search for that records ofcourse we set paging concept for that but it is a lengthy process.
|
|
|
|
|
there must be some search criteria for search.put those criteria in a combobox.and on selected index chage event you can refresh you data grid by selecting those records from the original table which match with selected criteria. and to select data from table use table.Select("CONDITION");
sameer
|
|
|
|
|
hi...
In my application...
I have declared a SerialPort object in parent form & i am accessing it from a child form but
its giving an error in port 'open' method. Can anybody tell me where i am going wrong...
Here is sample code for some more information...
//In parent form
public SerialPort comport = new SerialPort();
child_Form childForm= new child_Form();//this is the child form
child_Form .MdiParent = this;
comport.PortName = "COM1";
//In child form
if(!((ParentForm)this.MdiParent).comport.IsOpen)
((ParentForm)this.MdiParent).comport.Open(); // Getting error on this line
((ParentForm)this.MdiParent).comport.Write("send the text on serial Port");
I am getting intellisense for parent's 'comport' in child form.
above two sentence in child are write or wrong...? where i'm doing mistake...?
Thanks in adavance,
Vinay
|
|
|
|
|
Hi,
I'm not sure if this is your problem, but I think you don't have defined baud rate, parity, data bits and stop bits for your comport.
OR
Try send your comport trough parameter to your child form.
I hope it helps,
Jure
|
|
|
|
|
Hi,
I am still having problems having an e-mail pop-up from an <a></a> tag. The subject contains an "&" and there cuts off certain text. I was told to use Server.UrlEncode which does work to a degree, but then it adds "+" to the spaces (which I don't want), like:
Enquiry from J&D+Ship+Services
It should actually be:
Enquiry from J&D Ship Services
Here is my code in the .aspx page:
<a href="mailto:<%= Globals.InfoEmail %>?Subject=Enquiry from <%= Server.UrlEncode(Globals.CompanyLongName) %>"><%= Globals.InfoEmail %></a>
I hope someone can help me.
Regards
ma se
|
|
|
|
|
Try %20 for spaces an %26 for &: J%26D%20Ship%20Services
demo link
____________________________________
There is no proof for this sentence.
|
|
|
|
|
Add replace function your code, before sending to the aspx page, that replace the "+" with "%26".
replace(varName, "+", "%26")
|
|
|
|
|
Hello friends,
I am developing an application, in which I need (the client... which is running the application)to login to a Windows 2003 server in the domain.
I write the following function...
internal bool DoLogin(string userDomain, string userName, string userPassword)
{
string domainpath = "LDAP://" + userDomain;
string username = userDomain + "\\" + userName;
DirectoryEntry entry = new DirectoryEntry(
("LDAP://" + userDomain), (userDomain + "\\" + userName), userPassword);
try
{
// Bind to the native object to force authentication to happen
Object native = entry.NativeObject;
return true;
}
catch
{
return false;
}
}
It only works with Windows 2003 server. I mean.. when I run the application on Windows 2003 server, it login to the server.
But when I run it on a WinXp machine.. (connected in a Windows 2003 server domain) it is not login to the server and gives error.
Also I wanted to login to a Remote Windows 2003 server from a WinXp machine... connected by internet.
Can anybody guide me ... how to do this?
Thanks in Advance
T.Maria Raja Kumar
|
|
|
|
|
Hello,
I am trying to create a static method that converts ArrayList to List<t> and vice versa. I am at a loss at how to do it, anyone care to help? I posted the code I created below.
<br />
public static List<T> ConvertArrayListToList(ArrayList arrayList, Type T)<br />
{<br />
List<T> result = new List<T>();<br />
<br />
for ( int i = 0; i < arrayList.Count; i++ )<br />
{<br />
if (arrayList[i] is T)<br />
result.Add((T)arrayList[i]);<br />
}<br />
<br />
return result;<br />
}<br />
<br />
public static ArrayList ConvertListToArrayList(List<T> list)<br />
{<br />
ArrayList result = new ArrayList();<br />
<br />
for ( int i = 0; i < list.Count; i++ )<br />
{<br />
result.Add(list[i]);<br />
}<br />
<br />
return result;<br />
}<br />
Thanks!
~Rafferty
|
|
|
|
|
<blockquote class="FQ"><div class="FQA">Rafferty Uy wrote:</div>I am at a loss at how to do it, anyone care to help</blockquote>
First step, tell us why this code doesn't work. At first glance, I assume you forgot to check 'Ignore HTML tags in this message below, and it's a List<T>, otherwise, I don't see a problem, although I may be able to if you gave me a hint.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello,
I want to zip perticular folder through C#.net coding.
How to do that?.
Rahul Kulkarni
|
|
|
|
|
Hi,
Do you want to use some component for this or through pure .Net.
If you dont want to use components, then have a look at java.util.zip namespace. remember that on ur machine J# Redistributable package must be installed. This is part of J# libraries.
For more details, please take a look at following link
http://msdn.microsoft.com/msdnmag/issues/03/06/ZipCompression/[^]
If you want to use a component the search for Xceed Zip components on google.
Hope this helps you !
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|