如题,这个问题困扰小弟两天了,直接把html拷上去都没有用,哪位大虾帮忙解决下啊!!
asp.net在studio环境下的,就新建了个文件名,把原来html的source考进去。。
前面加了段
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Index.aspx.cs" Inherits="Index" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">页面迁移的时候就出
パス '/WebSite1/menu.html' にアクセスするために使用される HTTP 動詞 POST は許可されていません。
asp.net在studio环境下的,就新建了个文件名,把原来html的source考进去。。
前面加了段
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Index.aspx.cs" Inherits="Index" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">页面迁移的时候就出
パス '/WebSite1/menu.html' にアクセスするために使用される HTTP 動詞 POST は許可されていません。
在studio里做的时候还需设置iis么??请问怎么设置啊?
是的,我提交一个login画面,做一个用户认证,然后迁移到menu画面。
两个画面单独都可以正常显示,但是做迁移的时候,就出
viewstate MAC の検証フィールドです。このアプリケーションが Web Farm またはクラスタによってホストされている場合、<machineKey> 構成が同一の validationKey および検証アルゴリズムを指定していることを確認してください。AutoGenerate をクラスタで使用することはできません。 所以我后来把它重做,改成html,还是不行,出post那个错
=====>
你是怎么迁移的?
用的Server.Transfer?
你好,是这样的
<script type="text/javascript">
<!--
function go_login_enter()
{
if(document.form1._UserID.value == ""){
alert("ユーザIDを入力して下さい。");
return;
}
if(document.form1.PASSWORD.value == ""){
alert("パスワードを入力して下さい。");
return;
}
if(document.form1._UserID.value == "99"){
document.form1.action = "./menu.aspx";
} else if(document.form1._UserID.value == "10"){
document.form1.action = "./menu.aspx?_UserID=" + document.form1._UserID.value;
} else{
alert("認証できませんでした。");
return;
}
// document.form1.target = "_top";
// document.form1.method = "POST";
document.form1.submit();
}
//-->
</script>
<script type="text/javascript">
<!--
function go_login_enter()
{
document.form1.action = "./menu.html?_UserID=" + document.form1._UserID.value;
document.form1.target = "_top";
document.form1.method = "POST";
document.form1.submit();
}
//-->
</script><INPUT type="text" name="USERID" size="20" value="">
<INPUT type="button" name="LOGIN" value="ログイン" onclick="go_login_enter()";>报错信息:
验证视图状态MAC领域。如果这个应用程序是网络场或群集主办,相同配置的<machineKey>的validationKey请确保您指定并验证算法。自动生成不能在群集中使用。
web.config配置是否正确
头一次做,貌似没有配置过,现在的web.config里有一段
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>请问一下,<pages validateRequest="false" viewStateEncryptionMode="Never" enableViewStateMac="false">这个直接加在下面,还是??
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Index.aspx.cs" Inherits="Index" nableViewStateMac="false" %>