|
|
Does anyone know how to deploy an application/project in VB.Net?
thanks.
|
|
|
|
|
|
Thanks bro!
|
|
|
|
|
|
Hi Everyone
I am trying to do a authentication of username and password from Excel application with LDAP server as most of our users are having userid configured to LDAP server
I am trying to query the LDAP server(iPLANET) through VB(ADSI) to get the username and facing connection issues.
Here is the Code :
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim Command
Set conn = CreateObject("ADODB.Connection")
conn.Provider = "ADsDSOObject"
conn.Open "ADs Provider"
Set com = CreateObject("ADODB.Command")
com.ActiveConnection = conn
com.CommandText =
" <LDAP://kuwait.ccs.com/OU=9000,OU=Associates,DC=dir,DC=ccs,DC=net>;
(uid=" & uid & ");cn;subtree"
Set rs = com.Execute
I am getting "Table does not exits" error at Set rs = com.Execute line .
My LDAP server name is kuwait.ccs.com
My Dn is dc=dir,dc=ccs,dc=net
The uid is =19990001
This uid is inside OU = Associates->9000.
Should I give the DC values as DC=kuwait,DC=ccs,DC=net or the way I gave is right? I have also tried changing the sequence of OU=Associates first and OU=9000 next in the query line,but still I have problem. Also I tried giving the server IP address instead of servername,but still no use. Is that I need to setup something in VB tools other than for ADODB connection and something to be configured in LDAP server like CDO to accept the connection .
Also when I see the log created in the LDAP server is like this :
[19/Jan/2006:16:54:03 -0500] conn=90971 op=-1 msgId=-1 - fd=37 slot=37 LDAP connection from 172.24.37.97 to 166.86.124.73
[19/Jan/2006:16:54:03 -0500] conn=90971 op=0 msgId=268 - SRCH base="" scope=0 filter="(objectClass=*)" attrs="subschemaSubentry dsservicename namingContexts defaultnamingcontext schemanamingcontext configurationnamingcontext rootdomainnamingcontext supportedControl supportedLDAPVersion supportedldappolicies supportedSASLMechanisms dnshostname ldapservicename servername supportedcapabilities"
[19/Jan/2006:16:54:03 -0500] conn=90971 op=0 msgId=268 - RESULT err=0 tag=101 nentries=1 etime=0
[19/Jan/2006:16:54:03 -0500] conn=90971 op=1 msgId=270 - BIND dn="" method=sasl version=3 mech=GSSAPI
[19/Jan/2006:16:54:03 -0500] conn=90971 op=1 msgId=270 - RESULT err=14 tag=97 nentries=0 etime=0, SASL bind in progress
[19/Jan/2006:16:54:03 -0500] conn=90971 op=2 msgId=271 - BIND dn="" method=sasl version=3 mech=GSSAPI
[19/Jan/2006:16:54:03 -0500] conn=90971 op=2 msgId=271 - RESULT err=49 tag=97 nentries=0 etime=0
[19/Jan/2006:16:54:03 -0500] conn=90971 op=3 msgId=272 - BIND dn="" method=128 version=3
[19/Jan/2006:16:54:03 -0500] conn=90971 op=3 msgId=272 - RESULT err=0 tag=97 nentries=0 etime=0 dn=""
[19/Jan/2006:16:54:03 -0500] conn=90971 op=4 msgId=273 - SRCH base="ou=9000,ou=associates,dc=dir,dc=ccs,dc=net" scope=0 filter="(objectClass=*)" attrs="objectClass"
[19/Jan/2006:16:54:03 -0500] conn=90971 op=4 msgId=273 - RESULT err=0 tag=101 nentries=0 etime=0
[19/Jan/2006:16:54:03 -0500] conn=90971 op=5 msgId=274 - UNBIND
[19/Jan/2006:16:54:03 -0500] conn=90971 op=5 msgId=-1 - closing - U1
[19/Jan/2006:16:54:04 -0500] conn=90971 op=-1 msgId=-1 - closed.
It seems to be the method of communication is SASL where as this service is not configured in the LDAP server. Is this the reason it is failing? I have gone through the tips from most of the forums and tried all the possibilites but still I am facing this error.
Please help me. Thanks for the help in advance.
Regards
Vivek
8046145735
-- modified at 15:47 Thursday 26th January, 2006
|
|
|
|
|
We have had a similar problem with LDAP queries and got Microsoft involved as a support call. Basically by using VB we see the errors. When we convert the code to C# the error disappears. There is definitely some difference in the emitted CLR code between the VB and C# compilers.
There isn't an official fix yet (maybe some time off) so I suggest trying the query in C# to see what if any difference this makes in your case - especially since you seem to have tried most avenues already.
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
Thanks for your comments steve. Do you have any idea about the method of communication used by my VB application is SASL and this service is not configured in the LDAP server. Will this could be the reason not getting connected. Is there any other chance of changing the communication method to 128 which is simple authentication from VB? You can find the details of SASL in the log of my last mail.
Thanks for your help
Vivek
|
|
|
|
|
itvivek5340 wrote: Do you have any idea about the method of communication used by my VB application is SASL and this service is not configured in the LDAP server.
Sorry - no idea. Just know that the LDAP query works for us in C# but not VB. I didn't personally get involved with the diagnosis at my site. Maybe someone else on this board can give you those details.
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
Hello!
I am trying to create a code which should create a new address entry in Windows' Address Book? Also same for the outlook Express...
Any Idea?
Thank a lot!
Bedri
|
|
|
|
|
|
I am using VB .NET 2005.
I have a tab control in my form and the tab control contains 4 tab pages. Each tab page has different controls in it.
If my selected (current) tab is 3rd tab and I set the focus to a child control in first tab page by using
ControlName.Focus()
The control does not fire any Enter/GotFocus event
Is there anyway to set the SelectedTab or SelectedIndex of the TabControl to the TabPage in which the Control to be focused exists.
Waiting for a quick reply.
Thank You.
-- modified at 12:14 Thursday 26th January, 2006
|
|
|
|
|
Here's a few quick tips...
You can change the tab selection like this.
myTabControl.SelectedTab = myTabPage
You can find out which TabPage a control belong's to by searching the TabPage.Controls collection.
Also, the control's Parent property "might" return a reference to the TabPage that owns it. You'll have to test that one out to be sure.
|
|
|
|
|
Thank you for your reply.
I have tried by setting the tag property of each control on the tab page to the index of its tab page (i.e. 0 for controls on first tab, 1 for second etc.) at design time.
Then I have dynamically associated the event handler for "Enter" event of each control on the tab page. Event handler looks like
TabControl1.SelectedIndex = DirectCast(sender, Control).Tag
But the control does not get focus when I call the .Focus() method
I don't want to explicitly call the TabControl1.SelectedIndex before setting Focus to any control. Is there anyway?
|
|
|
|
|
Calling Focus() won't change the tab selection. Plus a control won't gain Focus if it's not visible. You're going to have to show the tab page yourself.
Now, if you want to keep it generic, I suppose you can do something like this. Just pass the control you want to give focus to in this function. It's just that easy.
Private Sub SetControlFocus(ByVal ctrl As Control)
' Validate argument.
If (ctrl Is Nothing) Then Return
' If control belongs to a tab page, then show it.
If (TypeOf ctrl.Parent Is TabPage) Then
myTabControl.SelectedTab = DirectCast(ctrl.Parent, TabPage)
End If
' Give control focus.
ctrl.Focus()
End Sub
|
|
|
|
|
I don't know if this problem has already been addressed or not, so please forgive me.
We all know that if we have more than one application running we can toggle through them by press the key combination alt+tab and a little window will show up showing us the icons of every application running. We press alt+tab to move from icon to icon until we find the one we want and then we release the alt and tab keys and we go right to the application we selected.
When I'm running a VB project and I toggle from the running application to another I noticed the Icons I designed have for the VB project don't show up in the tab window. It is just the standard VB icon for a form. How do I set it so it shows my icon?
Thank you,
Quecumber256
|
|
|
|
|
Did you set the Icon property of your form to one of these icons?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yes. I have it in the Sub Form_Load. Here is the code snippet.
frmCreateDoc.Icon = LoadPicture(App.Path & "\Create32.Ico")
It shows the icon of the form, but not on the alt+tab.
Thank,
Quecumber256
|
|
|
|
|
LoadPicture, or whatever you're using isn't going to work. You actually have to use the Icon class.
frmCreateDoc.Icon = New Icon(Path.Combine(App.Path, "Create32.ico"))
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
frmCreateDoc.Icon = New Icon(Path.Combine(App.Path, "Create32.ico"))
Sorry, this gave me a compiler error. Expected end of statement.
Am I missing some required component or resource?
Thanks,
Quecumber256
|
|
|
|
|
Imports System.Io at the top of your code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave,
Received another compiler error. Method or data member not found.
Obviously I don't know exactly where this will go. Is it in the General Declarations are? The Sub Main as a defined as a public class?
Thanks again,
Quecumber256
|
|
|
|
|
I just assumed you would be putting the ...Icon= line in the same place at the one you posted. That line MUST go in some Sub or Function somewhere, usually inside the Form.Load event handler.
Damn! Sorry! The Icon class is in the System.Drawing namespace. Make sure you add a Reference to System.Drawing.dll.
Imports System.Io
Imports System.Drawing
Public Class Form1
Private Sub Form_Load(blah, blah) Handles MyBase.Load
Me.Icon = New Icon(Path.Combine(Application.StartupPath, "myIcon.ico"))
End Sub
End Class
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 20:48 Thursday 26th January, 2006
|
|
|
|
|
I am now completely lost. I added the reference to the System.Drawing.dll. When I try to do a full compile the VB doesn't recongnize either the .Io or .Drawing properties.
I think I'm going to have to have step by step instructions on how to use this.
Thanks for your help,
Quecumber256
|
|
|
|
|
Does your icon have a 32x32x256 color image in it?
After that, I have no idea what's wrong. I've never had the problem you're having.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|