建立测试环境步骤如下:
1。建立一个“ASP.NET Web应用程序”项目
2。添加Login.aspx,添加Login.js
3。在Login.aspx的Head中加入: <script src="Login.js" type="text/javascript"></script>
4。把web.config的authentication部分改成如下:
<authentication mode="Forms">
<forms loginUrl="Login.aspx"></forms>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
运行程序,弹出错误提示:“行:3 错误:语法错误”
如果把<script src="Login.js" type="text/javascript"></script>这一句取消,就没问题。
这是什么原因?
我从来没有用过authentication,今天第一次试就遇到这种问题,真惨!
至尊宝的传说
守着星空守着你