By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,312 Members | 1,686 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,312 IT Pros & Developers. It's quick & easy.

My.Settings value problem in VB2005

P: n/a
Hi,

I'm trying to store the value of an LDAP Filter string in the app.config
file of a VB2005 application.

I've made the following entry:
<setting name="LDAPFilterSring"
serializeas="String">
<value>"(&(objectcategory=person)(objectclass=user ))"</value>
</setting>

The ">"(&(objectcategory" string is underlined and it reports "Expecting
';'." when I hover over it.

Can anyone tell me what is wrong?

Thanks

Aug 21 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi,

I think you may try the steps below with IDE.
1. Open Project Properties page
2. Click Setting Tab
3. Add a setting named LDAPFilterSring, select Scope Application, Value
(&(objectcategory=person)(objectclass=user)).
4. observe the app.config.
<WindowsApplication1.My.MySettings>
<setting name="LDAPFilterSring" serializeAs="String">

<value>(&amp;(objectcategory=person)(objectclass=u ser))</value>
</setting>
</WindowsApplication1.My.MySettings>
5. Use code to show the property which will be correct.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
MsgBox(My.Settings.LDAPFilterSring)
End Sub

(&(objectcategory=person)(objectclass=user))
Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 22 '06 #2

P: n/a
Hi,

I am posting to check if you have any concern on this issue.
If so, please feel free to post here.

Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 24 '06 #3

P: n/a
Hi,

thanks for your reply. For some reason, I only got a notification for your
second posting not the first.

I think my problem occured because I tried to edit the app.config file
directly and not using the settings tab.

I've redone things your way and it works fine.

thanks again

""Peter Huang" [MSFT]" wrote:
Hi,

I am posting to check if you have any concern on this issue.
If so, please feel free to post here.

Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 24 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.