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

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 UrlMappingCollection = urlMappingSection.UrlMappings
Dim url_Mapping As UrlMapping

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

urlMappings.Add(y)

If Not urlMappingSection.IsReadOnly() Then
configuration.Save()
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 1425
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 UrlMappingCollection = urlMappingSection.UrlMappings
Dim url_Mapping As UrlMapping

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

urlMappings.Add(y)

If Not urlMappingSection.IsReadOnly() Then
configuration.Save()
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
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...
6
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
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...
5
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
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....
17
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...
9
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...
8
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...
4
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...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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...
0
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...

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.