我有网站 MyProject 的解决方案。 我需要发布这个网站。 在弹出菜单中,我看到构建网站和发布网站
我将我的站点发布到目录并上传到 ftp。
但是网站报错:
The directory '/App_GlobalResources/' is not allowed because the application is precompiled.
如何发布我的网站?
更新: 我删除了 PrecompiledApp.config。
并报错
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0433: The type 'UPSRateServiceWebReference.RateService' exists in both 'c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\d6545937\de1fce5a\App_WebReferences.ixuylfle.dll' and 'c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\d6545937\de1fce5a\assembly\dl3\31691e67\292073b8_400ccd01\App_WebReferences.DLL'
Source Error:
Line 255:
Line 256: #region PrivateMethods
Line 257: private RateRequest CreateRateRequest(RateService rate)
Line 258: {
Line 259: RateRequest rateRequest = new RateRequest();
最佳答案
在 Visual Studio 2013 中,您应该选中“Precompile During Publishing”选项,我这样做并解决了这个问题。
在您的情况下,您可以尝试选中“允许更新此预编译站点”
关于c# - 如何发布我的网站?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9892646/