Problem description
When publishing a Web site, it's always true that the online site is missing, and the local code is really fine.
To the disk of the publishing site to view, found that a lot of missing static page files.
This is a very strange problem: the MVC Web site, lost a lot of view (most of the cshtml files have been published successfully, only a few partial publishing failed).
Manually overwrite all of the view to find that the site is working ...
What is the reason for this? Why is the conference missing some static files?
Solution Solutions
Look at these missing and published file attributes in VS, and compare the findings
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/37/6B/wKiom1Os19-BH4rIAADgCXpCQpI962.jpg "title=" QQ picture 20140627101352.jpg "alt=" Wkiom1os19-bh4riaadgcxpcqpi962.jpg "/>
The publish successful file, the properties in the "Build Action" check the "content" option, and the failed file is "none".
These properties have been modified and I'm trying to publish, and it really worked.
Reasons for investigation
Why do these files not have these attributes?
Recall that these files were added to the project operation, I found (in my project), because there are multiple distribution views, so I only created a new distribution view, and then through CTRL + C CTRL + V copied the other view (the process of the suffix problem, modify the prefix), The results were published successfully through vs new distributed maps, and the copied view failed to publish.
With the copied view, if the suffix is modified (the view suffix is. cshtml1), the attribute information is lost.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/37/6A/wKiom1Os1wjxz-IaAACBs872Kf0266.jpg "title=" Qq20140627102348.png "alt=" Wkiom1os1wjxz-iaaacbs872kf0266.jpg "/>
You also modify the Build Action property of these files after you manually modify them to the correct suffix.
Postscript
This should not be the problem, lead to such a big trouble, but the study to get the final knowledge, is also a kind of harvest.
Take care to sail the boat, blame oneself is not careful.