473,396 Members | 2,018 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,396 software developers and data experts.

asp.net and UserSettings

I've just found out that asp.net will not allow the use of UserSettings
in its config file.

This seems to mean that I cannot use any dlls which have
UserSettings!!!!

It makes sense that asp.net does not provide the means for users to
modify settings, but it does not make sense that my application cannot
still use them.

I have a whole bunch of dlls which I use in both a windows app and
asp.net. In windows it makes sense that I provide the ability to alter
settings on a per user bases, so my apps have user settings. However
this means I cannot use those dlls in aps.net now!!!! Argh!

Is there any way around this or will I have to convert all my settings
back to application level and then add duplicates at user level and put
try/catches around the access attempts.

Tony

Jun 29 '06 #1
2 1384
if you had coded all access to settings was handled thru a common method
(this is a good example of why you should use abstraction), then you would
only need one if statement. also the factory model for settings is a common
choice by professional coders.

-- bruce (sqlwork.com)
"Tigger" <to**@grunt.tv> wrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
I've just found out that asp.net will not allow the use of UserSettings
in its config file.

This seems to mean that I cannot use any dlls which have
UserSettings!!!!

It makes sense that asp.net does not provide the means for users to
modify settings, but it does not make sense that my application cannot
still use them.

I have a whole bunch of dlls which I use in both a windows app and
asp.net. In windows it makes sense that I provide the ability to alter
settings on a per user bases, so my apps have user settings. However
this means I cannot use those dlls in aps.net now!!!! Argh!

Is there any way around this or will I have to convert all my settings
back to application level and then add duplicates at user level and put
try/catches around the access attempts.

Tony

Jun 29 '06 #2
In 1.0, I did have the access to settings encapsulated in my own
accessors, however in the formal 2.0 architecture studio generates the
code for you, so I didn't feel the need to encapsulate that again!

I do like some of the new features the 2.0 achitecture brings, but it
also has its anoying points. I guess this always happens when things
change :-(

Could you explain how to use the factory model for the new .net
settings architecture? Would this be done by ignoring the code studio
creates and re-writing access to the underlying settings using my own
settings factory?

It also doesn't resolve the fact that, in asp.net, it seems I cannot
use "off the shelf" dlls which have user settings, as they will throw
exceptions when trying to access those settings.

Tony

bruce barker (sqlwork.com) wrote:
if you had coded all access to settings was handled thru a common method
(this is a good example of why you should use abstraction), then you would
only need one if statement. also the factory model for settings is a common
choice by professional coders.

-- bruce (sqlwork.com)
"Tigger" <to**@grunt.tv> wrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
I've just found out that asp.net will not allow the use of UserSettings
in its config file.

This seems to mean that I cannot use any dlls which have
UserSettings!!!!

It makes sense that asp.net does not provide the means for users to
modify settings, but it does not make sense that my application cannot
still use them.

I have a whole bunch of dlls which I use in both a windows app and
asp.net. In windows it makes sense that I provide the ability to alter
settings on a per user bases, so my apps have user settings. However
this means I cannot use those dlls in aps.net now!!!! Argh!

Is there any way around this or will I have to convert all my settings
back to application level and then add duplicates at user level and put
try/catches around the access attempts.

Tony


Jun 30 '06 #3

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

Similar topics

7
by: Dica | last post by:
i've used the sample code from msdn to create an encyption/decryption assembly as found here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT10.asp i'm...
6
by: Woody Splawn | last post by:
In the tool I used to use I would write certain things to a .ini file in a users private directory from time to time. For example, when the application was started, a certain section of that .ini...
2
by: John | last post by:
Hi What is a Serializable class compared to a normal class? Thanks Regards
5
by: Phil Kelly | last post by:
Hi I need to write the contents of a structure to a binary file - there is one string and 2 integers, but I can't seem to figure out how to write the data correctly. If I am simply writing...
9
by: Sam | last post by:
Hi, I have a xml file that looks like this: <?xml version="1.0" encoding="utf-8"?> <UserSettings> <UserName>sorcererdev</UserName> <Server>192.168.0.1</Server> <Database>NewWorld</Database>...
5
by: Bobstar | last post by:
Hello. In the good ol'ASP-days I allways handled all request vars within a class. I want to do the same in ASP.NET. It can be done smart and maybe not so smart - and I need help for the first...
5
by: Andy | last post by:
I need to write a VB.NET WinForms app. For this purpose I need to keep some settings of the application, like many other Windows applications do. The most obvious solution is to store settings in...
1
by: bg_ie | last post by:
Hi, I have my own UserSettings class that I wish to include within my windows application. To include it at the moment, I do something like this - namespace WindowsApplication1 { static...
8
by: Andrus | last post by:
..NET 2 Winforms application. How to create new setting and set it default value in userSettings section of app.config file or overwrite existing setting value ? I found code below in this list...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.