在 IIS 7.5 中部署 MVC3 - 不断收到 CS1009: 无法识别的转义序列错误消息
我不断收到
Line 43: public override void Execute() {
Line 44: WriteLiteral("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" +
Line 45: "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\");
Line 46:
Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\ef576117\c80eec5d\App_Web_index.cshtml.a8d08dba.hua2yaob.0.cs Line: 44
错误消息。
有人可以帮忙吗?我已完成以下所有操作:
如果 IIS 是在服务器上的 .NET 4.0 之后安装的,则需要运行 aspnet_regiis.exe 将其注册到 IIS 应用程序池设置为以集成模式运行 在你的 web.config 中你有设置 您正在使用 http://server/home/index 访问您的网站(更改控制器和操作名称以匹配您的名称) )。 您有一条与 Global.asax 中的 {controller}/{action} url 匹配的路线。 相应的视图存在于 ~/Views/Home/Index.cshtml 中。
该网站具有相同的二进制文件在本地计算机上运行,但不在另一台服务器上运行。另一台服务器也安装了MVC3
I keep getting
Line 43: public override void Execute() {
Line 44: WriteLiteral("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" +
Line 45: "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\");
Line 46:
Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\ef576117\c80eec5d\App_Web_index.cshtml.a8d08dba.hua2yaob.0.cs Line: 44
Error message.
Can someone please help? I've done all the following items below:
If IIS was installed after .NET 4.0 on the server you need to run aspnet_regiis.exe to register it with IIS
The application pool is set to run in integrated mode
In your web.config you have the set
You are accessing your site with http://server/home/index (change the controller and action names to match yours).
You have a route that will match the {controller}/{action} url in your Global.asax.
The corresponding view exists in ~/Views/Home/Index.cshtml.
This website with same binaries runs in local machine but not on another server. The other server has MVC3 installed too
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当我将网站部署到另一台服务器时,二进制文件丢失了。并不是代码不完整或者包含奇数个“/”。重新编译并发布重新编译的 DLL 有效。
The binaries were missing when I deployed website to another server. It was not that the code was incomplete or contained odd number of "/". Recompiling and publishing recompiled DLLS worked.