473,421 Members | 1,500 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,421 software developers and data experts.

Vs2005 Application settings

Hi I have some trouble (on only one developer computer) with the application
settings functions...

I have posted to the Microsoft.Public.vstudio.setup group but they couldn't
help me and asked me to post in this forum.

I paste both the messages I posted there..
---
Hi I have just installed VS2005 and the first thing I did was to try out the
new Screensaver sample. that wouldn't work it just crashed all the time.
After a little monking around i found out that it was the application
settings that just didn't work. It trowed an exception:
System.InvalidOperationException
with an innerexception of "{"Configuration system failed to initialize"}"
(with:) {"An error occurred loading a configuration file: Could not find a
part of the path 'C:\Documents and Settings\<MY
USERNAME>\tstScreenSaver1.vshost.ex_Url_0myugwc0sn 0h1p1cupnb2ay0ywdyyuft\1.0.0.0\user.config'.
(C:\Documents and Settings\<MY USERNAME>\Application
Data\...\tstScreenSaver1.vshost.ex_Url_0myugwc0sn0 h1p1cupnb2ay0ywdyyuft\1.0.0.0\user.config)"}
And if I check the system.Windows.Forms.Application.LocalUserAppDataP ath
I see that it points to :C:\Documents and Settings\<MY USERNAME>\Local
Settings\Application Data\...\tstScreenSaver1\1.0.0.0

I don't know where the ... come from I guess it's why it wasn't able to find
the folder?

I can recreate this if I create another project and add a Application
setting

I even tried a repair on the visual studio installation but with no change.

Anyone got a good suggestion?
---
Rhett Gong[MSFT] answered that he didn't have a qlue and asked me for some
more info and detailed test.
I answered
---

* Create a new project (windows) (I'm using vb) ( My project is named
tst_SettingsEx)
* Right click on the Icon for the project and select properties
* go to "tab" settings
* add a new setting (I'm adding "Setting") with type "String" and Scope
"User" Value "test"
* Go back to form add a button (Button1) go to click event in codebehind
* add code
MsgBox(My.Settings.Setting)
* start project with debugging
* press the button
Result: look in attached file "Exception1" (a ConfigurationErrorsException
with the innerexception:
"An error occurred loading a configuration file: Could not find a part of
the path 'C:\Documents and
Settings\<USER>\tst_SettingsEx.vshost.exe_Url_ob2l hjb3pwszm3exvs3r2msjtgij5kcb\1.0.0.0\user.config'. "
* additional when it has crashed (or if it won't put in a break or someother
mean to see this) in the debug window write "?
system.Windows.Forms.Application.LocalUserAppDataP ath " my result is
"C:\Documents and Settings\<USER>\Local Settings\Application
Data\...\tst_SettingsEx\1.0.0.0"

I'm guessing that it has something to do with the path.. I guess that the
result shouldn't contain ... in it. it should be something else. That's why
I think it's related to the installation of Visual studio. Like I stated in
the last post I have tried to repair the installation with no luck.

---
So I hope that you could help me better. After this I have tried to recreate
this on some other computer but havn't suceeded. I guess that it's some
setting or file that is corrupt but a repair didn't help so...

Thanks for your help..

// Cristian


Nov 23 '05 #1
1 1864
Hi

As you said, I also wonder it seems that the VS.NET 2005 is not correctly
installed, because the simplest test with Appsetting failed too.
So far another possible is if the user has the full privileges.
So you may try to run the test again under the administrator account.

Also you may to try to use filemon to see when you create the user scope
setting and save, if there is any file created/read/write under the dir
below.
C:\Documents and Settings\<MY USERNAME>\Application Data\....\user.config

After that when you try to read the appsettting when the problem running,
did the file is loaded? or is it trying to find another file?

You may perform the test and let me know the result.

Also I think a throughly reinstall may be usefully in this scenario.

BTW: filemon can be found in the webpath below.
http://www.sysinternals.com/Utilities/Filemon.html
Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 23 '05 #2

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

Similar topics

3
by: Robert | last post by:
I have an application with custom configuration sections in it's app.config file. Here's a shortened excerpt: <monitors> <monitor...
2
by: Jim | last post by:
I'm trying to use the Application Settings option in VS2005 with C#. So far I've no success getting my settings to save or load. Various tutorials on the 'net seem to be outdated. Even MSDN's...
10
by: Dan | last post by:
I use the settings grid to create a setting named "ServerName". Now i want to retrieve it in code and i can't figure out how. This should be incredibly obvious but i cant get it. I have tried...
15
by: Joseph Geretz | last post by:
OK, I'll admit it up front - I just don't get it. Here's our previous VS2003 development model. Developers develop the WS solution on their own workstations, using their own IIS web servers...
0
by: GT | last post by:
This question has been posted before, but without any response so therefore I'm trying once more. I'm trying to embed .resource files into a Windows application in VS2005, and then compile and...
2
by: rcp | last post by:
Hi all, I've read all posts from all existing threads and none of them worked to solve my problem, although its exactly the same. I'll try to explain my case and see if a kind soul could help me...
1
by: David Lozzi | last post by:
Howdy, I've created an entire ecommerce site as a Web Site project (WSP) in VS2005. Now that i'm trying to publish it I'm finding that I should've used the ASP.Net Web Application (ANWA) project...
3
by: Thomas | last post by:
Hi, I have written a simple console program in VS2005 and it should run on computers that dosn't have .NET (not 1.1 and not 2.0). I think it depends on the headerfiles? I have exculded the...
0
by: Academia | last post by:
I have a vs2003 solution that I want to convert to VS2005 format. These projects have been converted and now compile in VS2005. But they had the older format - they is the UI code was in .vb...
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: 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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.