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

why web.config locks? please help, thanks!

I found my web.config file always in lock mode, when I tried to modify it, I
ofter got "Can not create web.config" error. I had to reboot my machine, and
before I accessed any site I can modify it. I think microsoft creates the
..NET structure so that user can modify config file easier without restart
service. I am not sure why my web.config works like that? Could someone
explain this to me? And is there a easier way I can modify the config file
without restarting service or machine.

Thanks!
Jul 21 '05 #1
3 1739
How are you trying to modify the web.config file? I am not to familiar with
the web.config file but I think it works in the same way as the app.config
file, meaning you can only read from it while your application is running.
So if this is a Web Service you may have to re-start the Web Service. So as
to why you have to re-start your computer..have you tried to stop the web
server/service first?

If you want to modify the file without re-starting the application you would
need to do something similar to this article:
http://www.devx.com/dotnet/Article/11616/0/page/1

It explains how you create a config file in memory while your application is
still running and then the changes are permanently pushed to the file when
the application closes. Note: this article talks about the app.config file
not the Web.Config but you might find it useful.

Ronny
"david" <wy*****@hotmail.com> wrote in message
news:OJ**************@TK2MSFTNGP11.phx.gbl...
I found my web.config file always in lock mode, when I tried to modify it, I ofter got "Can not create web.config" error. I had to reboot my machine, and before I accessed any site I can modify it. I think microsoft creates the
.NET structure so that user can modify config file easier without restart
service. I am not sure why my web.config works like that? Could someone
explain this to me? And is there a easier way I can modify the config file
without restarting service or machine.

Thanks!

Jul 21 '05 #2
First, thank you for your reply.

I think app.config is quite different from web.config, this is from the link
you gave to me.

Although both read the files at startup and cache the contents, if you
change a
Windows Forms configuration file, the changes don't take effect until the
next time
you start the application. In contrast, when you change an ASP.NET
applicationsconfiguration file, the framework recognizes the change
immediately.

I believe one of the important new feature of .NET is that you can change
the setting without restarting anything. It works fine on some of my
servers. it just not works on my home server.

"Ronny" <fl******@comcast.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
How are you trying to modify the web.config file? I am not to familiar with the web.config file but I think it works in the same way as the app.config
file, meaning you can only read from it while your application is running.
So if this is a Web Service you may have to re-start the Web Service. So as to why you have to re-start your computer..have you tried to stop the web
server/service first?

If you want to modify the file without re-starting the application you would need to do something similar to this article:
http://www.devx.com/dotnet/Article/11616/0/page/1

It explains how you create a config file in memory while your application is still running and then the changes are permanently pushed to the file when
the application closes. Note: this article talks about the app.config file
not the Web.Config but you might find it useful.

Ronny
"david" <wy*****@hotmail.com> wrote in message
news:OJ**************@TK2MSFTNGP11.phx.gbl...
I found my web.config file always in lock mode, when I tried to modify it,
I
ofter got "Can not create web.config" error. I had to reboot my machine,

and
before I accessed any site I can modify it. I think microsoft creates

the .NET structure so that user can modify config file easier without restart service. I am not sure why my web.config works like that? Could someone
explain this to me? And is there a easier way I can modify the config file without restarting service or machine.

Thanks!


Jul 21 '05 #3
As a side note about changing the app config file in a ASP.NET application.
yes the changes are read in after you make them but this is done by
restarting the application. Once this happens things like lost sessions can
happen.

"david" <wy*****@hotmail.com> wrote in message
news:#9**************@TK2MSFTNGP10.phx.gbl...
First, thank you for your reply.

I think app.config is quite different from web.config, this is from the link you gave to me.

Although both read the files at startup and cache the contents, if you
change a
Windows Forms configuration file, the changes don't take effect until the
next time
you start the application. In contrast, when you change an ASP.NET
applicationsconfiguration file, the framework recognizes the change
immediately.

I believe one of the important new feature of .NET is that you can change
the setting without restarting anything. It works fine on some of my
servers. it just not works on my home server.

"Ronny" <fl******@comcast.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
How are you trying to modify the web.config file? I am not to familiar with
the web.config file but I think it works in the same way as the app.config
file, meaning you can only read from it while your application is running. So if this is a Web Service you may have to re-start the Web Service. So

as
to why you have to re-start your computer..have you tried to stop the web server/service first?

If you want to modify the file without re-starting the application you

would
need to do something similar to this article:
http://www.devx.com/dotnet/Article/11616/0/page/1

It explains how you create a config file in memory while your application is
still running and then the changes are permanently pushed to the file

when the application closes. Note: this article talks about the app.config file not the Web.Config but you might find it useful.

Ronny
"david" <wy*****@hotmail.com> wrote in message
news:OJ**************@TK2MSFTNGP11.phx.gbl...
I found my web.config file always in lock mode, when I tried to modify it,
I
ofter got "Can not create web.config" error. I had to reboot my machine, and
before I accessed any site I can modify it. I think microsoft creates

the .NET structure so that user can modify config file easier without restart service. I am not sure why my web.config works like that? Could
someone explain this to me? And is there a easier way I can modify the config

file without restarting service or machine.

Thanks!



Jul 21 '05 #4

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

Similar topics

25
by: n3crius | last post by:
hi, i just got a web host with asp.net , seemed really cool. aspx with the c# or vb IN the actual main page run fine, but when i use codebehind and make another source file ( a .cs) to go with...
5
by: david | last post by:
I found my web.config file always in lock mode, when I tried to modify it, I ofter got "Can not create web.config" error. I had to reboot my machine, and before I accessed any site I can modify it....
7
by: praveen | last post by:
Hi When does DB2 go for an IS (Intent Share) lock? IS mode is defined as a mode in which "The lock owner can read data in the locked table, but cannot update this data. Other applications can...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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...
0
tracyyun
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...
0
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,...

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.