在本地IIS上部署后发布错误 [英] Post error after deploying on local IIS

查看:64
本文介绍了在本地IIS上部署后发布错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,

我已经被这个问题困扰了将近一天,所以我想我会问你们.我正在用jquery mobile开发MVC3应用程序.当我在本地开发服务器上运行它时,它一直运行良好,但是将其部署到本地主机上后,IIS7出现了此错误.

该网站运行良好,直到单击将Jquery发布到控制器中的actionresult的按钮为止.

Hey,

I''ve been stuck with this problem for almost a day now, so i figured I''ll ask you guys. I''m developing a MVC3 application with jquery mobile. And it''s been working just fine when I run it on my local dev server, but after I deployed it on my localhost, IIS7 I got got this error.

The site is running fine, until click a button that is doing a Jquery post to an actionresult in the controller.

$.post("/Games/PlayerAttendance", { gameId: parseInt(_gameId), status: parameter }, function (data) {
             $("#deltagare").html(data);
          });



控制器动作如下所示:



The controller Action looks like this:

public ActionResult PlayerAttendance(int gameId, string status)
        {
            Attendance attendance = new Attendance();
            if (status == "yes")
            { attendance.Status = (int)AttendanceStatus.Spelar; }
            else if (status == "maybe")
            { attendance.Status = (int)AttendanceStatus.Kanske; }
            else
                attendance.Status = (int)AttendanceStatus.Nej;
            attendance.fk_gameId = gameId;
            attendance.fk_playerId = 1;
            
            attendance.Name = "jane doe";  
            
            
            repository.SetParticipationStatus(attendance); 
            var attendees = repository.FindAttendeesInGame(gameId);
            return PartialView("Attendees", attendees);
        }



这在asp.net开发人员状态下工作正常,但在部署时不起作用.知道我在做什么错吗?我已将请求限制设置为无限制.



This works just fine in asp.net dev state, but it doesnt work when deployed. Any idea what i''m doing wrong? I''ve set the request limit to unlimited.

推荐答案

.post(" /Games/PlayerAttendance",{gameId:函数(数据){
.post("/Games/PlayerAttendance", { gameId: parseInt(_gameId), status: parameter }, function (data) {


( # deltagare" ).html(data); });
("#deltagare").html(data); });



控制器动作如下所示:



The controller Action looks like this:

public ActionResult PlayerAttendance(int gameId, string status)
        {
            Attendance attendance = new Attendance();
            if (status == "yes")
            { attendance.Status = (int)AttendanceStatus.Spelar; }
            else if (status == "maybe")
            { attendance.Status = (int)AttendanceStatus.Kanske; }
            else
                attendance.Status = (int)AttendanceStatus.Nej;
            attendance.fk_gameId = gameId;
            attendance.fk_playerId = 1;
            
            attendance.Name = "jane doe";  
            
            
            repository.SetParticipationStatus(attendance); 
            var attendees = repository.FindAttendeesInGame(gameId);
            return PartialView("Attendees", attendees);
        }



这在asp.net开发人员状态下工作正常,但在部署时不起作用.知道我在做什么错吗?我已将请求限制设置为无限制.



This works just fine in asp.net dev state, but it doesnt work when deployed. Any idea what i''m doing wrong? I''ve set the request limit to unlimited.


尝试使用完全限定的路径,其中具有
Try a fully qualified path where you have


这篇关于在本地IIS上部署后发布错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆