473,395 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

My.settings questions

Bob
I opened a new project in vb.net 2005. Just entered 1 setting test in the
settings.settings type string, scope user user.
That created the follwing app.config file content.

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

<configSections>

<sectionGroup name="userSettings"
type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" >

<section name="WindowsTestSettings.My.MySettings"
type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />

</sectionGroup>

</configSections>

<system.diagnostics>

<sources>

<!-- This section defines the logging configuration for
My.Application.Log -->

<source name="DefaultSource" switchName="DefaultSwitch">

<listeners>

<add name="FileLog"/>

<!-- Uncomment the below section to write to the Application Event Log -->

<!--<add name="EventLog"/>-->

</listeners>

</source>

</sources>

<switches>

<add name="DefaultSwitch" value="Information" />

</switches>

<sharedListeners>

<add name="FileLog"

type="Microsoft.VisualBasic.Logging.FileLogTraceLi stener,
Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"

initializeData="FileLogWriter"/>

<!-- Uncomment the below section and replace APPLICATION_NAME with the name
of your application to write to the Application Event Log -->

<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener"
initializeData="APPLICATION_NAME"/> -->

</sharedListeners>

</system.diagnostics>

<userSettings>

<WindowsTestSettings.My.MySettings>

<setting name="test" serializeAs="String">

<value>test value</value>

</setting>

</WindowsTestSettings.My.MySettings>

</userSettings>

</configuration>

Looking at the file in the sectionname section on top of the file the
requirePermission attribute is underlined in red and the tooltip says the
requirePermission attribute is not declared.

Also I get 1 wanrning and 6 messages. The messages all say

Could not find schema information for elemnt 'userSettings' then its for
WindowsTestSettings..My.Mysettings then for settings, then name, then
serialize as and finally value.

The warning is about requirePermission attribute is not declared.

What do I need to do to make this app.config file not give me any warnings
and make the messages go away?

Thanks,

Bob


May 10 '06 #1
1 7459
Hi there!

I had a similar problem with my App.Config files. Although it never
affected my application, all those warnings can cause some annoyance. I
found this article by Frederik Gheysel which should help you out.

http://fgheysels.blogspot.com/2006/0...nd-schema.html

Regards,

Michael Bosch
"Bob" <bd*****@sgiims.com> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
I opened a new project in vb.net 2005. Just entered 1 setting test in the
settings.settings type string, scope user user.
That created the follwing app.config file content.

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

<configSections>

<sectionGroup name="userSettings"
type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" >

<section name="WindowsTestSettings.My.MySettings"
type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />

</sectionGroup>

</configSections>

<system.diagnostics>

<sources>

<!-- This section defines the logging configuration for
My.Application.Log -->

<source name="DefaultSource" switchName="DefaultSwitch">

<listeners>

<add name="FileLog"/>

<!-- Uncomment the below section to write to the Application Event Log -->

<!--<add name="EventLog"/>-->

</listeners>

</source>

</sources>

<switches>

<add name="DefaultSwitch" value="Information" />

</switches>

<sharedListeners>

<add name="FileLog"

type="Microsoft.VisualBasic.Logging.FileLogTraceLi stener,
Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"

initializeData="FileLogWriter"/>

<!-- Uncomment the below section and replace APPLICATION_NAME with the
name of your application to write to the Application Event Log -->

<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener"
initializeData="APPLICATION_NAME"/> -->

</sharedListeners>

</system.diagnostics>

<userSettings>

<WindowsTestSettings.My.MySettings>

<setting name="test" serializeAs="String">

<value>test value</value>

</setting>

</WindowsTestSettings.My.MySettings>

</userSettings>

</configuration>

Looking at the file in the sectionname section on top of the file the
requirePermission attribute is underlined in red and the tooltip says the
requirePermission attribute is not declared.

Also I get 1 wanrning and 6 messages. The messages all say

Could not find schema information for elemnt 'userSettings' then its for
WindowsTestSettings..My.Mysettings then for settings, then name, then
serialize as and finally value.

The warning is about requirePermission attribute is not declared.

What do I need to do to make this app.config file not give me any warnings
and make the messages go away?

Thanks,

Bob

May 12 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Galina | last post by:
Hello I am trying to create a table, which includes a field type LONG. The wizard hasn't allowed me to enter storage settings for this table. It set the initial size is 64K and not available to...
2
by: Lawrence San | last post by:
I'm trying to test some simple JavaScript meant to speed up the display of my Web pages for readers using modems, but I have a fast DSL connection and I'm having trouble visualizing how effective...
1
by: Jean-Marc Blaise | last post by:
Dear all, The V8.2 Information Center states "udf_mem_sz : UDFs no longer pass data in shared memory, so this parameter is not supported". But you find some programs displaying the udf_mem_sz...
10
by: Chris Dunaway | last post by:
I have an .exe console project and a class library project as part of a solution. The .exe has an App.config file and I have used the Settings page to add some Application level settings. When...
3
by: ervin21 | last post by:
I'm using Microsoft Visual Studio 2005. Ok well I need to know how to save program settings that the user inputs. I am creating a program that opens a main screen, it tells you to click here to take...
2
by: Wimpie van Lingen | last post by:
Hey I have some more questions with regards to Remoting in .NET 2. I'm using TCP with the Binary formatter. My solution consists of 4 projects: - Class Library containing the server classes...
3
by: Peter Wyss | last post by:
Hello! I've a few questions about ClickOnce in VisualStudio 2005. The installation of my application works fine, I published the files on a webserver and installed the app on a winxp client,...
2
by: =?Utf-8?B?QWFyb24=?= | last post by:
I am trying to create dynamic settings in a .NET 2.0 C# application. I need to be able to store settings on the user, but I do not know how many settings are necessary at design time because the...
5
by: Alcibiade | last post by:
Hi, I have 2 questions about saving windows form settings. I have a form with 1 textbox and 2 radiobuttons I added application settings for : textbox1, radiobutton1 and form location I've set...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.