This morning I deployed an MVC3 application to my hosting provider, using the VS publish action to apply a transform to my web.config file. For debugging I use a local SQL Server, with a trusted connection, and for release I transform the connection string to use a SQL login. I accidentally deployed th开发者_如何学运维e first time using the incorrect keyword 'user name' instead of 'user id' in the release connection string, and I got the expected error:
Keyword not supported: 'user name'
I corrected my web.config.release, then published and deployed again, but I still get the same error on the host. I can find no occurrence of the term 'user name' anywhere in my solution, nor in the files I published and uploaded, and the support guy at the host can't find any reference to the term either. He has even restarted IIS for me, with no change.
How could I go about diagnosing and/or helping my host diagnose an issue like this?
Try deleting the files on the server before deploying. If you deploy again and it is still there, then you know that somewhere in your solution something is wrong (or that it is not rebuilding, etc.)
If you get the expected result then you know that the deployment isn't overriding your files.
This was caused by a very confusing directory structure on my FTP account at the hosting provider, like this:
ftp-home (ftp://*www*.mydomain.com)
|
|--Content
|
|--mydomain.com
| |
| --wwwroot
|
|--wwwroot
I had been uploading to the first visible wwwroot, not the inner one.
精彩评论