Web.config - ConnectionString property has not been initialized
I have a number of ASP.NET applications which run fine for months, then stop dead with the message: "....ConnectionString property has not been initialized". The application uses strongly typed datasets, with the connection string stored in the web.config file. If you just search the web for the message in the subject, you get all sorts of answers relating to incorrectly configured web.config files. In this case, however, the connection works - then randomly stops working.
The resolution, I have found, is to open the web.config file in Notepad and Save the file (without making any changes), or rebooting the server (the customer's IT dept did this). Once you sav开发者_StackOverflow中文版e the file or reboot, the website continues to run normally.
I have seen this behaviour at several sites with several of our applications, but can't seem to find a resolution. Are there any Microsoft KBs about this? Is it a bug in the ASP.NET stack, or is there a problem with the way I am using the DAL?
Is there maybe some server environmental factor such as permissions being randomly applied across your web root folder?
精彩评论