I am needing to read and write application settings from within my ASP.NET
application. My web.config is not an option since I need to be able to write
settings as well. My database is not an option either as the database
location itself is one of the settings.
I've been trying to work with Isolated Storage, but it is obviously designed
to be use specific. I've attempted using Impersonation to load the same
settings for every session, but this doesn't really work. If I impersonate
my user account it works. If I impersonate the Administrator account it
works. But if I create a new user account on the machine and try to
impersonate that account, I just get the following error when trying to get
the isolated storage:
Unable to create the store directory.[The system cannot find the file
specified. ]
I've even made this new account an administrator, but I still get the same
results. Is there a better way to do what I am trying to do? Isn't there
some simple method of saving and retrieving application wide settings in an
ASP.NET environment? I also should mention that it is required that I use
windows authentication for this site. When I turn that off, the IUSR account
works just great for saving and loading settings. But unfortunately I must
authenticate each use in order to use domain security for using Reporting
Services.
Thank you for any suggestions,
-Glenn Thimmes 8 1475
"Glenn Thimmes" <glennthi@nospa m_msn.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. .. I am needing to read and write application settings from within my ASP.NET application. My web.config is not an option since I need to be able to
write settings as well. My database is not an option either as the database location itself is one of the settings.
I've been trying to work with Isolated Storage, but it is obviously
designed to be use specific. I've attempted using Impersonation to load the same settings for every session, but this doesn't really work. If I impersonate my user account it works. If I impersonate the Administrator account it works. But if I create a new user account on the machine and try to impersonate that account, I just get the following error when trying to
get the isolated storage:
Unable to create the store directory.[The system cannot find the file specified. ]
I've even made this new account an administrator, but I still get the same results. Is there a better way to do what I am trying to do? Isn't there some simple method of saving and retrieving application wide settings in
an ASP.NET environment? I also should mention that it is required that I use windows authentication for this site. When I turn that off, the IUSR
account works just great for saving and loading settings. But unfortunately I must authenticate each use in order to use domain security for using Reporting Services.
Store the settings in a database.
--
John Saunders
johnwsaundersii i at hotmail
Use application variables.
example:
Global.asax.cs
protected void Application_Sta rt(Object sender, EventArgs e)
{
Application["variable1"] = "abc";
}
WebForm1.aspx.c s
private void Page_Load(objec t sender, System.EventArg s e)
{
string var = Application["variable1"].ToString();
Application["variable1"] = "123";
}
Bobby Ryzhy bo***@weekendte ch.net http://www.weekendtech.net
On Thu, 8 Jul 2004 13:56:17 -0600, "Glenn Thimmes"
<glennthi@nospa m_msn.com> wrote: I am needing to read and write application settings from within my ASP.NET application. My web.config is not an option since I need to be able to write settings as well. My database is not an option either as the database location itself is one of the settings.
I've been trying to work with Isolated Storage, but it is obviously designed to be use specific. I've attempted using Impersonation to load the same settings for every session, but this doesn't really work. If I impersonate my user account it works. If I impersonate the Administrator account it works. But if I create a new user account on the machine and try to impersonate that account, I just get the following error when trying to get the isolated storage:
Unable to create the store directory.[The system cannot find the file specified. ]
I've even made this new account an administrator, but I still get the same results. Is there a better way to do what I am trying to do? Isn't there some simple method of saving and retrieving application wide settings in an ASP.NET environment? I also should mention that it is required that I use windows authentication for this site. When I turn that off, the IUSR account works just great for saving and loading settings. But unfortunately I must authenticate each use in order to use domain security for using Reporting Services.
Thank you for any suggestions,
-Glenn Thimmes
Thank you for your suggestion. As I mentioned in my post, storing settings
in a database is not possible since part of those settings is the database
server.
"John Saunders" <jo************ **@notcoldmail. com> wrote in message
news:et******** ********@TK2MSF TNGP09.phx.gbl. .. "Glenn Thimmes" <glennthi@nospa m_msn.com> wrote in message news:%2******** ********@TK2MSF TNGP11.phx.gbl. .. I am needing to read and write application settings from within my
ASP.NET application. My web.config is not an option since I need to be able to write settings as well. My database is not an option either as the database location itself is one of the settings.
I've been trying to work with Isolated Storage, but it is obviously designed to be use specific. I've attempted using Impersonation to load the same settings for every session, but this doesn't really work. If I
impersonate my user account it works. If I impersonate the Administrator account it works. But if I create a new user account on the machine and try to impersonate that account, I just get the following error when trying to get the isolated storage:
Unable to create the store directory.[The system cannot find the file specified. ]
I've even made this new account an administrator, but I still get the
same results. Is there a better way to do what I am trying to do? Isn't there some simple method of saving and retrieving application wide settings in an ASP.NET environment? I also should mention that it is required that I
use windows authentication for this site. When I turn that off, the IUSR account works just great for saving and loading settings. But unfortunately I
must authenticate each use in order to use domain security for using
Reporting Services.
Store the settings in a database. -- John Saunders johnwsaundersii i at hotmail
Thanks for the suggestion. Maybe I did not make it clear that these are
settings that need to persist to the hard drive. Each use will need to load
them. Each use will possibly write to them. Since i am using windows
authentication, I need a way that anyone can have permissions to write to
them if they are a member of the right windows group. I have an
administration page that allows admin users to change the database, product
key, and session timeout.
I am surprised that ASP.Net provides such rich capabilities for saving user
settings, but appears to provide nothing for saving application wide
settings.
"Bobby Ryzhy" <br****@hotmail .com> wrote in message
news:bq******** *************** *********@4ax.c om... Use application variables.
example: Global.asax.cs protected void Application_Sta rt(Object sender, EventArgs e) { Application["variable1"] = "abc"; }
WebForm1.aspx.c s private void Page_Load(objec t sender, System.EventArg s e) { string var = Application["variable1"].ToString(); Application["variable1"] = "123"; }
Bobby Ryzhy bo***@weekendte ch.net http://www.weekendtech.net
On Thu, 8 Jul 2004 13:56:17 -0600, "Glenn Thimmes" <glennthi@nospa m_msn.com> wrote:
I am needing to read and write application settings from within my
ASP.NETapplication. My web.config is not an option since I need to be able to
writesettings as well. My database is not an option either as the database location itself is one of the settings.
I've been trying to work with Isolated Storage, but it is obviously
designedto be use specific. I've attempted using Impersonation to load the same settings for every session, but this doesn't really work. If I
impersonatemy user account it works. If I impersonate the Administrator account it works. But if I create a new user account on the machine and try to impersonate that account, I just get the following error when trying to
getthe isolated storage:
Unable to create the store directory.[The system cannot find the file specified. ]
I've even made this new account an administrator, but I still get the
sameresults. Is there a better way to do what I am trying to do? Isn't there some simple method of saving and retrieving application wide settings in
anASP.NET environment? I also should mention that it is required that I use windows authentication for this site. When I turn that off, the IUSR
accountworks just great for saving and loading settings. But unfortunately I
mustauthenticate each use in order to use domain security for using Reporting Services.
Thank you for any suggestions,
-Glenn Thimmes
You can create your own XML config file that your app loads, modifies,
and maintains - just like the web.config - but you do all the
maintenance.
Bobby Ryzhy
bobby@ domain below http://www.weekendtech.net
On Thu, 8 Jul 2004 16:05:26 -0600, "Glenn Thimmes"
<glennthi@nospa m_msn.com> wrote: Thanks for the suggestion. Maybe I did not make it clear that these are settings that need to persist to the hard drive. Each use will need to load them. Each use will possibly write to them. Since i am using windows authentication , I need a way that anyone can have permissions to write to them if they are a member of the right windows group. I have an administrati on page that allows admin users to change the database, product key, and session timeout.
I am surprised that ASP.Net provides such rich capabilities for saving user settings, but appears to provide nothing for saving application wide settings.
"Bobby Ryzhy" <br****@hotmail .com> wrote in message news:bq******* *************** **********@4ax. com... Use application variables.
example: Global.asax.cs protected void Application_Sta rt(Object sender, EventArgs e) { Application["variable1"] = "abc"; }
WebForm1.aspx.c s private void Page_Load(objec t sender, System.EventArg s e) { string var = Application["variable1"].ToString(); Application["variable1"] = "123"; }
Bobby Ryzhy bo***@weekendte ch.net http://www.weekendtech.net
On Thu, 8 Jul 2004 13:56:17 -0600, "Glenn Thimmes" <glennthi@nospa m_msn.com> wrote:
>I am needing to read and write application settings from within myASP.NET >application. My web.config is not an option since I need to be able towrite >settings as well. My database is not an option either as the database >location itself is one of the settings. > >I've been trying to work with Isolated Storage, but it is obviouslydesigned >to be use specific. I've attempted using Impersonation to load the same >settings for every session, but this doesn't really work. If Iimpersonate >my user account it works. If I impersonate the Administrator account it >works. But if I create a new user account on the machine and try to >impersonate that account, I just get the following error when trying toget >the isolated storage: > >Unable to create the store directory.[The system cannot find the file >specified. ] > >I've even made this new account an administrator, but I still get thesame >results. Is there a better way to do what I am trying to do? Isn't there >some simple method of saving and retrieving application wide settings inan >ASP.NET environment? I also should mention that it is required that I use >windows authentication for this site. When I turn that off, the IUSRaccount >works just great for saving and loading settings. But unfortunately Imust >authenticate each use in order to use domain security for using Reporting >Services. > >Thank you for any suggestions, > >-Glenn Thimmes >
That is exactly what I have been trying to do. I have created an XML
settings doc and would like to be able to load it and save it. The problem
is that each session needs to be able to read and write to this file. And
each session can be a different domain account. I do not want to give every
domain account the ability to write to my hard drive. The Isolated Storage
works great if every user needs separate settings, but that is not the case.
Am I missing something? Is there some obvious place where my ASP.Net app
should be able to write and read from the hard disk regardless of who is
logged in, and use the same xml file regardless of who is logged in?
Shouldn't I be able to create a new windows account and impersonate that
account for the duration of my Isolated Storage manipulations? Is there
something wrong with what I did there or is that just the wrong avenue
entirely? I am only able to successfully get the isolated file store when I
impersonate myself. That sounds like a permissions issue, but the
documentation I've read on the Isolated Stored says that it will create a
isolated storage for whatever user context is used and they don't need any
permissions at all for this to work. But for some reason it still will not
work.
Thanks for your help Bobby!
-Glenn
"Bobby Ryzhy" <br****@hotmail .com> wrote in message
news:d5******** *************** *********@4ax.c om... You can create your own XML config file that your app loads, modifies, and maintains - just like the web.config - but you do all the maintenance.
Bobby Ryzhy bobby@ domain below http://www.weekendtech.net
On Thu, 8 Jul 2004 16:05:26 -0600, "Glenn Thimmes" <glennthi@nospa m_msn.com> wrote:
Thanks for the suggestion. Maybe I did not make it clear that these are settings that need to persist to the hard drive. Each use will need to
loadthem. Each use will possibly write to them. Since i am using windows authentication , I need a way that anyone can have permissions to write to them if they are a member of the right windows group. I have an administrati on page that allows admin users to change the database,
productkey, and session timeout.
I am surprised that ASP.Net provides such rich capabilities for saving
usersettings, but appears to provide nothing for saving application wide settings.
"Bobby Ryzhy" <br****@hotmail .com> wrote in message news:bq******* *************** **********@4ax. com... Use application variables.
example: Global.asax.cs protected void Application_Sta rt(Object sender, EventArgs e) { Application["variable1"] = "abc"; }
WebForm1.aspx.c s private void Page_Load(objec t sender, System.EventArg s e) { string var = Application["variable1"].ToString(); Application["variable1"] = "123"; }
Bobby Ryzhy bo***@weekendte ch.net http://www.weekendtech.net
On Thu, 8 Jul 2004 13:56:17 -0600, "Glenn Thimmes" <glennthi@nospa m_msn.com> wrote:
>I am needing to read and write application settings from within my ASP.NET >application. My web.config is not an option since I need to be able to write >settings as well. My database is not an option either as the database >location itself is one of the settings. > >I've been trying to work with Isolated Storage, but it is obviously designed >to be use specific. I've attempted using Impersonation to load the
same >settings for every session, but this doesn't really work. If I impersonate >my user account it works. If I impersonate the Administrator account
it >works. But if I create a new user account on the machine and try to >impersonate that account, I just get the following error when trying
toget >the isolated storage: > >Unable to create the store directory.[The system cannot find the file >specified. ] > >I've even made this new account an administrator, but I still get the same >results. Is there a better way to do what I am trying to do? Isn't
there >some simple method of saving and retrieving application wide settings
inan >ASP.NET environment? I also should mention that it is required that I
use >windows authentication for this site. When I turn that off, the IUSR account >works just great for saving and loading settings. But unfortunately I must >authenticate each use in order to use domain security for using
Reporting >Services. > >Thank you for any suggestions, > >-Glenn Thimmes >
"Glenn Thimmes" <glennthi@nospa m_msn.com> wrote in message
news:uG******** ******@TK2MSFTN GP10.phx.gbl... Thanks for the suggestion. Maybe I did not make it clear that these are settings that need to persist to the hard drive. Each use will need to
load them. Each use will possibly write to them. Since i am using windows authentication, I need a way that anyone can have permissions to write to them if they are a member of the right windows group. I have an administration page that allows admin users to change the database,
product key, and session timeout.
I am surprised that ASP.Net provides such rich capabilities for saving
user settings, but appears to provide nothing for saving application wide settings.
But these are not application-wide settings, they are per-user settings.
ASP.NET 2.0 solves this problem with its Profile APIs.
--
John Saunders
johnwsaundersii i at hotmail
"But these are not application-wide settings, they are per-user settings."
I'm not sure what you mean. These ARE apllication-wide settings. Otherwise
Isolated Storage would be hunky dory! The same settings for server, serial
number, and session timeout are used by everyone. It is true that these
settings are applied per session, but they are the same settings used by
everyone. When an administrator changes these settings, the changes need to
apply to everyone.
"John Saunders" <jo************ **@notcoldmail. com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. .. "Glenn Thimmes" <glennthi@nospa m_msn.com> wrote in message news:uG******** ******@TK2MSFTN GP10.phx.gbl... Thanks for the suggestion. Maybe I did not make it clear that these are settings that need to persist to the hard drive. Each use will need to load them. Each use will possibly write to them. Since i am using windows authentication, I need a way that anyone can have permissions to write
to them if they are a member of the right windows group. I have an administration page that allows admin users to change the database, product key, and session timeout.
I am surprised that ASP.Net provides such rich capabilities for saving user settings, but appears to provide nothing for saving application wide settings.
But these are not application-wide settings, they are per-user settings.
ASP.NET 2.0 solves this problem with its Profile APIs. -- John Saunders johnwsaundersii i at hotmail
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 change, next size 0K,
increase size by 0%.
Since I am going to copy data from an existing MS Access table into
this one, I know that the initial amount of records will be about
70000 and it will take about 7 Mb of disk space. I know it, because I...
|
by: Yaron Cohen |
last post by:
Hi,
I would like to ask for your help.
I am using IE5.5.
I have a wide page with horizontal scroll bar.
The problem is that I get only 1 page when printing it using
"file->print" or "window.print".
|
by: yazan jab |
last post by:
Is it true that
Multibyte characters are : char arrays (witch represent a string from
the basic characters set). In this case Wide characters are the way
for encoding characters from the extended characters set.
or
Multibyte characters are: characters from the extended character set
which need more than one byte to encode. And in this case wide
|
by: Michael Quinlivan |
last post by:
Hi,
I am writing an app in VB.NET
In short, I need to be able to have a single application configuration
file that applies to ALL users of the application, and that can be
modified by ANY user. When any user modifies the settings, it will
affect all users of the app.
For this reason, this configuration file cannot be stored in the
DOcuments and Settings/<user>/Application Data folder, as this will
|
by: Justin Creasy |
last post by:
Hello, I am trying to add the ability to save my applications settings
for each user. I was just wondering what the best method is to do this.
The only requirement is that any user account (user, power user, admin)
will have this capability. I would also prefer to have some measure of
security, but if need be I can use my own methods to handle this.
I am currently writting the setting information to the "application
data/all users"...
| |
by: Paul Cheetham |
last post by:
Hi,
I am developing an application that needs to store some machine-specific
settings. The application is going to be published on the network in
order to keep the clients on the latest version.
Because of this, I am unable to store these settings in the App.Config
file, as this gets updated every time the application does, and there
doesn't appear to be a way of preventing this.
Most of my application settings are kept in the...
|
by: Richard Lewis Haggard |
last post by:
I have an application that can't use the registry to save various user
options and application settings. My first thought was to simply use an
application configuration file but this approach seems flawed. The app
config file appears to be updated with values while the application is
running but when the application closes, the file seems to get restored to a
pristine state and the accumulated user options and application settings are...
|
by: =?Utf-8?B?R2Vvcmdl?= |
last post by:
Hello everyone,
Wide character and multi-byte character are two popular encoding schemes on
Windows. And wide character is using unicode encoding scheme. But each time I
feel confused when talking with another team -- codepage -- at the same time.
I am more confused when I saw sometimes we need codepage parameter for wide
character conversion, and sometimes we do not need for conversion. Here are
two examples,
|
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= |
last post by:
Hi misters, i have application winforms in VB.NET
When I press F5, for executing Debug....it's slows...
I see,
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |