I inherited an app to make some updates. It was an older 1.1 ASP.Net application that was already upgraded to 2.0. All the new files I wrote worked fine and it built error free. I could debug the app and run it locally with no problems. Once I was ready to publish the app it then finally decided to give me some grief. I would get an error after the build completed and the publish started. The error was:
Data at the root level is invalid. Line 1, position1.
When I clicked on the error line in VS it would take me to web.config. This web.config file was not the web.config file for the app however it was in the _vti_cnf folder and definitely did not look like a normal web.config file. The line giving the error was:
vti_encoding:SR|utf8-nl
The fix ended up being to delete the four _vti folders. They were all leftovers from when the project was built in VS2003 which had those FrontPage extensions. After that no more publishing problems.