Ajax 调用 .cshtml:403 禁止访问

Ajax calling .cshtml : 403 FORBIDDEN

我 AJAX 调用 .cshtml 文件,它一直说它是 403 禁止...这是我设法从 Firebug 中退出的错误...使用 ASP.net应用程序,框架 4 ...我不知道如何解决这个问题,我尝试了我在网上找到的大部分东西

重置VS用户,安装Web平台....我不知道下一步该做什么

这是来自 firebug 的错误:

<!DOCTYPE html>
<html>
   <head>
       <title>This type of page is not served.</title>
       <meta name="viewport" content="width=device-width" />
       <style>
            body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 
            p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
            b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
            H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
            H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
            pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}
           .marker {font-weight: bold; color: black;text-decoration: none;}
           .version {color: gray;}
           .error {margin-bottom: 10px;}
           .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

     @media screen and (max-width: 639px) {
           pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }
     }
     @media screen and (max-width: 479px) {
           pre { width: 280px; }
     }
    </style>
</head>

<body bgcolor="white">

        <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

        <h2> <i>This type of page is not served.</i> </h2></span>

        <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

        <b> Description: </b>The type of page you have requested is not served because it has been
   explicitly forbidden. &nbsp;The extension '.cshtml' may be incorrect. &nbsp;&nbsp;Please review the
   URL below and make sure that it is spelled correctly.
        <br><br>

        <b> Requested URL: </b>/PopunjavanjeUpitnika/PopunjavanjeUpitnika/Upitnik.cshtml<br><br>


        <hr width=100% size=1 color=silver>

        <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version
   :4.0.30319.34280

        </font>

</body>

** 编辑:**

这就是我调用 .cshtml 文件的方式

function NavigateToPage(questionnaire_id, page_id, user_id, object_id) {
            $("#cont").load(
            "PopunjavanjeUpitnika/Upitnik.cshtml",
            { questionnnaireId: questionnaire_id,
                pageId: page_id,
                userId: user_id,
                objectId: object_id
            });
            throw new Error("Something went badly wrong!");
            return false;

};

基于 cshtml 扩展,我假设上下文是 ASP.NET MVC 项目。如果是这样,那么您应该调用 returns cshtml 视图控制器的操作,而不是直接调用视图文件。这是 ASP.NET MVC 的基础知识,我建议您查看 http://www.asp.net/mvc/overview 以便熟悉它。