Any way to programatically modify the URL mappings in the web.config without restarting the asp work

J

justin

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
 
G

Guest

Nope.
anytime the web.config is modified the site/applicaiton will restart. Store
these in another place perhaps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top