Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I tried to add a safecontrol to my web.config file and SharePoint crashed (yellow/white asp.net error screen). I undid my changes and saved the file and the error continued. The only way I was able to resolve the issue was to restore the backup I had made of my web.config file.

Further testing showed that making no changes at all but merely saving the file so that the date modified timestamp changes was enough to crash sharepoint. Performing an IIS reset/app pool recycle did not resolve the issue. The only way I've been able to get it back up after any change of any kind to web.config is to restore the original web.config file.

Also, despite my best efforts to turn on CustomErrors in web.config nothing seems to work and the only error message I get from SharePoint is the one telling me that an error has occured, and if I want to see the error to turn off custom errors.

We performed this test in our dev/qa regions without issue, though they are x64 and our production is x86.

share|improve this question
    
Have you checked ULS logs? –  AlexSSE Jul 6 '11 at 13:48
    
I juch checked them and nothing is popping out at me. I'm assuming it would be an issue with w3wp.exe, but I went ahead and reviewed all the messages and there aren't any obvious errors. –  Peter Jul 6 '11 at 14:05
add comment

1 Answer

up vote 4 down vote accepted

What are you using to make the edits? Can you try it from a different editor?

Have you done a comparison of the modified and backup files with something like WinDiff (verify that truly only the time stamp changed and there isn't some obscure artifact being introduced).

Verify the file encoding is the same and is not being changed when you save a new version as well. I believe UTF-8 will be the default.

share|improve this answer
    
As an additional tip, open your file with an editor like Notepad++ and check if there are hidden/non-printable characters. –  vasya10 Jul 6 '11 at 14:09
2  
Note to Self: Don't use Wordpad to modify web.config... I had used Notepad in Dev/QA and didn't even think about the fact that I had used wordpad in production to make the change. –  Peter Jul 6 '11 at 14:22
    
Wow, Wordpad, really? Tried MS Publisher ;) Another tip - rename file .xml and open in IE - this will then show if you've got any syntax errors such as unclosed elements –  Ryan Jul 6 '11 at 17:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.