473,698 Members | 2,132 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IIS/ASP.NET not recognizing writes to web.confg


I'm experiencing problems related to IIS/ASP.NET not recognizing writes
to web.config that my web application performs.

Specifically I have a web application that provides an interface
allowing authenticated domain users to be written to the "authorizat ion"
section of the web.config file. Since i'm using Integrated Windows
Authentication, these users should then be able to issue the various
HTTP POSTS to the web application. However what I'm seeing is that the
users I add to the web.config file still are unauthorized.

IIS/ASP.NET simply doesn't detect modifications to the web.config file
I'm doing programmaticall y in my web application using the .NET
Configuration / WebConfiguratio nManager API.

If I use a non programatic way of modifying the web.config file after a
user has been added i.e. use notepad to open web.config. and save,
without making any changes, then IIS/ASP.NET recognise the change to
web.config and now the users become authorized to use my web
application.

Is this a bug?

-John Gonsalves

*** Sent via Developersdex http://www.developersdex.com ***
Mar 28 '07 #1
15 1815


By the way, I'm using .NET 2.0 and my web application is running on
Windows 2003 Server Enterprise Edition.

-John

*** Sent via Developersdex http://www.developersdex.com ***
Mar 28 '07 #2
If your code is able to add the users to the config file, could you
try adding the users programatically and then restarting the site
once, and then test it? Normally a web.config change causes the site
to be reloaded in memory for future hits, but the current requests
are served using the old settings. I am just taking an educated guess
but maybe when you are modifying the config file programatically , the
site never gets unloaded from memory to allow the new settings to take
effect.

If this is the case, maybe you can try picking up the users
dynamically from another xml file instead of web.config, which i think
is always tricky to modify on the fly.
Hope this helps.

Latish

Mar 29 '07 #3


I still have not received a response that works.

The feature I'm trying to use is the one where "allow users=" in the
authorization section while using Integrated Windows Security enforces
who can access the web application.

One of the services this web application offers is the ability to issue
a http post that includes a domain/user who I desire to give
authorization to (i.e. they are added to the web.config authorization
section using the Configuration / WebConfiguratio nMgr API).

Unfortunately IIS does not recognized any changes I make to web.config
programmaticall y, unless I manually use notepad to open the web.config
file and force a save without any additional modifications. (i.e. file
watcher is triggered on the notepad save but not on the
Configuration.s ave()).

This is clearly a bug and I need a workaround!

-John Gonsalves
Hewlett Packard

*** Sent via Developersdex http://www.developersdex.com ***
Apr 5 '07 #4
Did you try what i had suggested in the last post?
Latish

Apr 6 '07 #5
Also, is there a compelling reason for you to use web.config for this?
Can't you pick the settings from a Sql Server table or another config
file?

Apr 6 '07 #6


I could save the users to another file or database and do some
personalization in my web application to authorizing by comparing the
LogonUserIdenti ty.Name.ToStrin g() with what I have stored.

But I was hoping that by adding these users programmaticall y to
web.config in the authorization section, would force IIS to do this for
me.

-John Gonsalves

*** Sent via Developersdex http://www.developersdex.com ***
Apr 6 '07 #7


Latish,

What you're suggesting won't work for me. The users are added to the
web.config file authorization section spuriously and infrequently. When
they are added I don't have the liberty of restarting the web site. I
need the new users to be given authorization by IIS automatically.

The functionality I need is using Windows Integrated Security:

1) Add a user to the authoriztion section in web.config as 'allow
users="newuser" ', programmaticall y

2) Have IIS honor the added user, allowing them access to the web site.

There must be a way to do this using web.config.

-John Gonsalves

*** Sent via Developersdex http://www.developersdex.com ***
Apr 6 '07 #8
This seems to be a common problem ( i see similar questions in other
forums out there).
Check out http://www.developer.com/net/cplus/article.php/3531746

Perhaps you can use the Enterprise Library Configuration block.

Apr 6 '07 #9


Enterprise Library Configuration block appears to deal with
configuration changes being detectable by the web application.

I need IIS to detect my application changes, namely the authorization
section of the web.config file.

-John Gonsalves

*** Sent via Developersdex http://www.developersdex.com ***

Apr 6 '07 #10

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

Similar topics

2
1462
by: Greg Lindstrom | last post by:
Hello- I am writing an application where I need to recognize when a file arrives in a given directory. Files may arrive at any time during the course of the day. Do I set up a cron job to poll the directory every few minutes? Write a daemon to monitor the directory? Or is there some other more common/accepted way to perform this task? I'm using Python 2.3 on Linux. Thanks for your help, --greg
2
2010
by: Dale Anderson | last post by:
I have a schema that I'm trying to read. The schema has an element named 'GrantApplication' and one with a namespace prefix named 'SF424:GrantApplication'. When I try to read this schema in, I get an exception saying 'A datatable named 'GrantApplication' alread belongs to this dataset'. Why is dotnet not recognizing the namespace prefix and treating these like two separate elements? Thanks for your help.
0
1378
by: Feldman Alex | last post by:
Hello friends. Do anyone know wich C# api's should i use for recognizing removable/network drives? Example : I need to know when cd inserted to CD drive Thank a lot Alex
5
1799
by: Marc Violette | last post by:
<Reply-To: veejunk@sympatico.ca> Hello, I'm hoping someone can help me out here... I'm a beginner ASP.NET developper, and am trying to follow a series of exercises in the book entitled "Microsoft ASP.NET Step By Step" by Microsoft Press. When I try to display *any* ASP.NET page with a Sub() somewhere, I get the following error:
0
972
by: Glenn Venzke | last post by:
I'm using a ColdFusion app to consume a .NET webservice with 3 methods and I'm running into a problem. The first time I added a web reference & compiled the service (with VS.NET standard edition 2003), I had only 2 methods - both of which worked fine when calling from the CF client. But then I added a third method, updated the web reference and rebuilt the solution. Although I could invoke all three methods directly from the web browser,...
3
1468
by: john.enevoldson | last post by:
Hi, When running a job that inserts data into a particular table we are seeing a significant number of direct writes against the tablespace containing the table. This is the only table in the tablespace and there are no other jobs running against the table at the same time. The table contains no lobs or long varchar columns so we cannot understand what is causing the direct writes. Anyone any ideas ? Regards, John.
2
3374
by: Brisingman | last post by:
Hi, I set PYTHONPATH to /home/me/bin in bash.bashrc, however the IDLE path browser is not recognizing this. Not sure why. Grateful for any insight. Best
6
2798
by: ahmadbaseet | last post by:
Hello every one. I am new to MS Access. I am using data SQL command SELECT to fetch some data from Access tables. I want to use DAO.Recordset object to get the data, but somehow my compiler is not recognizing the DAO object. I am using Access 2003. Can somebody help me. I cannot declare Dim rs As DAO. Thanks in advance
1
1472
by: thulaseeram | last post by:
hi, i am using the following code for uploading <div id="iframe" name="iframe" style="width:850px; height:120px;"> <iframe name="attach_frame" id="attach_frame" src="http://100.100.100.233/storyclix/upload.php" style="width:850px; height:120px;" frameborder="0"></iframe> </div> <div class="form-item" name="_Confirm_buttons" id="_Confirm_buttons"> <input type="button" value="Add media" class="form-submit"...
0
8600
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,...
0
9021
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 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...
1
8892
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,...
0
7712
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5860
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4361
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...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3038
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
1998
bsmnconsultancy
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...

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.