2013-10-18 152 views
0

我有一个网站(页面源代码包含在底部),第一次使用Windows 8.1/IE11的用户访问它正确加载的页面,但是当他们点击按钮时它只是永远旋转,如果刷新它可以正常工作,或者他们第一次访问DevTools时打开它也可以。此页面适用于除Windows 8.1/IE11之外的所有浏览器/操作系统组合,并且Fiddler也能正常工作...第一次加载网页

我没有Console.log语句。由于我无法打开DevTools并查看页面spin-wait,因此我不确定如何调试/修复此问题。

任何人之前看到过这个,或能够提出一种调试方法吗?尽管Post/Get在一段代码中返回“View()”,这是我排除分页错误的方法。从我所知道的情况来看,服务器并没有被打到电话。浏览器只是旋转(我一次离开它30分钟)。

C#:

public ActionResult Introduction() 
{ 
    if (Request.HttpMethod == "POST") 
    { 
     var user = DataRepository.GetUser(WebSecurity.CurrentUserName, TaskID); 
     if (user.CurrentStep == 3) 
     { 
      user.CurrentStep++; 
      DataRepository.SetUserStep(WebSecurity.CurrentUserId, user.CurrentStep); 
     } 
     return GetView(user); 
    } 

    Task task = DataRepository.GetTask(TaskID); 
    return View(task); 
} 

我也曾尝试:

[HttpGet] 
public ActionResult Introduction() 
{ 
    return View(task); 
} 

[HttpPost] 
[ActionName("Introduction")] 
public ActionResult IntroductionHttpPost() 
{ 
    return View(); 
} 

查看:

<!DOCTYPE html> 
    <html> 
    <head> 
     <meta charset="utf-8" /> 
     <title>Introduction</title> 
     <script type="text/javascript"> 
      document.createElement('header'); 
      document.createElement('section'); 
      document.createElement('article'); 
      document.createElement('aside'); 
      document.createElement('nav'); 
      document.createElement('footer'); 
     </script> 


    </head> 
    <body> 
     <div class="page clearfix"> 
      <header> 
       <div id="progress" class="clearfix"> 

       </div> 
       <div id="title"> 
        <h1>Introduction</h1> 
           </div> 
      </header> 
      <section id="main"> 


    <form action="/Task/Introduction" method="post">Welcome, <br /> 
     <br /> 
    In this survey you will be asked to answer some questions about yourself and about the kinds of events you enjoy. It is important that you consider each question and answer honestly, we can only accept surveys that are complete and personalized to your preferences. <br /> 
     <br /> 
     <button type="submit" class="button">Start Task</button> 
    </form> 
      </section> 
      <footer> 
      </footer> 
     </div> 
    </body> 
    </html> 
+0

您是否尝试过使用log4net或elmah使其在某些点登录到日志文件?它在兼容模式下工作吗? – Eonasdan

+0

它在兼容模式下工作正常。尝试使用Azure跟踪,它似乎没有击中服务器。 – Faraday

回答

0

对于别人谁是有这个问题,你可以在name属性添加到你的按钮,一切正常。

相关问题