1. Phenomenon
a. Access with localhost, normal
b. If accessed by IP address, a 403 error will occur
2. Analysis
a. Suspecting an ACL problem, setting Everyone to full control, the problem still cannot be solved
b. I accidentally accessed "WebForm1.aspx", and then accessed the homepage again. I can access it normally.
c. The original inaccessible aspx was converted from asp
3. Conclusion
a. Visit any web page converted from asp to aspx. If the new aspx web page does not contain the "Codebehind="index.aspx.cs" AutoEventWireup="false" Inherits="IQTest.WebForm1"" part, A 403 error will occur
b. Solution: Be sure to access any page containing "Codebehind" before accessing all aspx web pages converted from asp. The essential reason is that the asp.net application failed to start, causing IIS to deny access
for the same reason. , it can be seen that when the asp.net application times out and is recycled, this 403 error will also appear on the pages submitted later!
Note: aspx pages that do not contain "Codebehind="index.aspx.cs" AutoEventWireup="false" Inherits="IQTest.WebForm1" can be accessed normally.