473,748 Members | 7,377 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Any way to programatically modify the URL mappings in the web.config without restarting the asp worker process?

I have the problem that I need to programatically add new url mappings to
the web.config file in an asp 2.0 app.

e.g. my code is

Dim urlMappings As UrlMappingColle ction = urlMappingSecti on.UrlMappings
Dim url_Mapping As UrlMapping

Dim y As New UrlMapping("~/myalias", "~/article.aspx?Se ctionID=45")

urlMappings.Add (y)

If Not urlMappingSecti on.IsReadOnly() Then
configuration.S ave()
End If

This works fine, however as the web.config file has been modified the asp
worker process restarts and all users of the website lose their session
variables etc.

Is there any way round this? Is there any in memory version of web.config
that I can modify?

Thanks

Justin
Nov 19 '05 #1
1 1443
Nope.
anytime the web.config is modified the site/applicaiton will restart. Store
these in another place perhaps.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"justin" wrote:
I have the problem that I need to programatically add new url mappings to
the web.config file in an asp 2.0 app.

e.g. my code is

Dim urlMappings As UrlMappingColle ction = urlMappingSecti on.UrlMappings
Dim url_Mapping As UrlMapping

Dim y As New UrlMapping("~/myalias", "~/article.aspx?Se ctionID=45")

urlMappings.Add (y)

If Not urlMappingSecti on.IsReadOnly() Then
configuration.S ave()
End If

This works fine, however as the web.config file has been modified the asp
worker process restarts and all users of the website lose their session
variables etc.

Is there any way round this? Is there any in memory version of web.config
that I can modify?

Thanks

Justin

Nov 19 '05 #2

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

Similar topics

0
2415
by: Chris McKeever | last post by:
I am trying to modify the Mailman Python code to stop mapping MIME-types and use the extension of the attachment instead. I am pretty much clueless as to what I need to do here, but I think I have narrowed it down to the Scrubber.py file.. If this seems like a quick step me through, I would be very appreciative, could get you something on your Amazon wish-list (that is me on my knees begging).. From just my basic understanding, it...
6
1712
by: Maximus | last post by:
Hi everybody, Has anyone changed the session state in web.config programatically through the applications. Any Help will be appreciated. Thanks.
3
6512
by: Wm. Scott Miller | last post by:
What is the difference between using a username and password in the processmodel section vs using one in impersonation in the machine.config file? What are the advantages of each and what are the reasons for using each? Thanks for any replies, Scott
5
1807
by: Daniel | last post by:
Hi, is the a way to prevent aspnet process to restart after web.config is modified? like, waiting for all sessions to close, or not restart at all ? Thank you, Daniel
3
2510
by: Danny Miller | last post by:
Hi there, I've got a web app that uses impersonation and makes calls to a SQL Server backend. I'd like to be able to automate the setting of database security for the web app upon deployment. What I'd like to do during installation is the following: - run the database creation script - determine the user context that the ASP.NET worker process is running under - assign privileges for that user in the new database
17
3248
by: Fred Nelson | last post by:
Hi: I have written several web applications that obtain their connection strings from the web.config file. This is very easy to use and it makes it easy to move an app from development into production. I'm in the process of writing a site that will have lots of traffic so I'm trying to save resources everyplace that I can. My question is - do the web.config app settings get loaded once when the
9
3346
by: woolley.dean | last post by:
The problem we are having is with the worker process restarting after one minute of being started up. We had a website running in .Net 1.1 and switched it over to .Net 2.0. The site is running on a W2003 machine w/ IIS6 with 4GB Ram. We have it running in it's own Application Pool with no other websites. The settings we have are: - Recycle worker process after 1440 Minutes - Shut down worker proecess after being idle for 20 minutes
8
7774
by: Rak | last post by:
I am looking for a way to programatically change the .net version of the virtual directory that I am creating within a aspx page. As part of creating a new customer in my asp.net 2 application, it automatically creates a virtual directory and configures it. I am using the DirectoryServices.DirectoryEntry class in C# to do this. I am unable to set the .Net version of the virtual directory from 1.1 to version 2. All searches led me to the...
4
8832
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... Following the samples online, we implemented a windows service in .Net. Like most services, there's a worker thread actually doing stuff in the background. The problem we've run into is how to get the service to exit when the worker thread has a fatal error *and* get the SCM to invoke the auto-restart configuration? The worker thread can error out while the parent thread in the server process chugs along. We can set the exit...
0
8828
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
9537
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, 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...
0
9367
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
9319
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
8241
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...
1
6795
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
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
4599
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...
2
2780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.