Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed,
had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /login.aspx
When I store my .aspx files in a folder in the project and when I store the .aspx file outside the folder (together
with Web.config), I get to browse the .aspx.
I've check my security for the folder which is set to "localhost", everyone, admin and they have the full control for the folder (the same security I did for others folder). It doest work. Is there anything else I can do? I tried delete the whole folder, building
new .aspx pages, enable roles. Yet, the problem still occur.
But the problem is i don't even have login.aspx file in my project. Moreover the others folder in my project (eg: User Folder and Admin Folder) can be browsed through browser. Please help me. thanks.
I've delete the <properties> that i set for that Folder1 in web.config then i get this:
Server Error in '/' Application.
Parser Error
Description: An
error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'Simon_Fung__Educational_Management_System.Default'.
Source Error:
Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Simon_Fung__Educational_Management_System.Default" %> Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Source File: /default.aspx Line: 1
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225
Description: An
error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'Simon_Fung__Educational_Management_System.Default'.
Source Error:
Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Simon_Fung__Educational_Management_System.Default" %> Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
JaniceW
Member
21 Points
37 Posts
HTTP 404 Error When .aspx were stored in a folder
Apr 24, 2012 07:19 AM|LINK
Hi there,
I get this error message :
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /login.aspx
When I store my .aspx files in a folder in the project and when I store the .aspx file outside the folder (together with Web.config), I get to browse the .aspx.
I've check my security for the folder which is set to "localhost", everyone, admin and they have the full control for the folder (the same security I did for others folder). It doest work. Is there anything else I can do? I tried delete the whole folder, building new .aspx pages, enable roles. Yet, the problem still occur.
Please help me.
THanks
nijhawan.sau...
All-Star
16460 Points
3178 Posts
Re: HTTP 404 Error When .aspx were stored in a folder
Apr 24, 2012 07:41 AM|LINK
Use:
"~/Folder1//login.aspx"
JaniceW
Member
21 Points
37 Posts
Re: HTTP 404 Error When .aspx were stored in a folder
Apr 24, 2012 11:21 AM|LINK
But the problem is i don't even have login.aspx file in my project. Moreover the others folder in my project (eg: User Folder and Admin Folder) can be browsed through browser. Please help me. thanks.
nijhawan.sau...
All-Star
16460 Points
3178 Posts
Re: HTTP 404 Error When .aspx were stored in a folder
Apr 24, 2012 11:38 AM|LINK
Ok, well remove the membership tags from web.config as you dont want any authentication.
Search for login.aspx in web.config, i am sure you have specified it somewhere inside it.
JaniceW
Member
21 Points
37 Posts
Re: HTTP 404 Error When .aspx were stored in a folder
Apr 24, 2012 12:18 PM|LINK
I've delete the <properties> that i set for that Folder1 in web.config then i get this:
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'Simon_Fung__Educational_Management_System.Default'.
Source Error:
Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Simon_Fung__Educational_Management_System.Default" %> Line 2: Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">Source File: /default.aspx Line: 1
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225
nijhawan.sau...
All-Star
16460 Points
3178 Posts
Re: HTTP 404 Error When .aspx were stored in a folder
Apr 24, 2012 12:25 PM|LINK
Other then removing some tags from web.config did u remove anything else also?
If not, can you share old and new versions of web.config here.
JaniceW
Member
21 Points
37 Posts
Re: HTTP 404 Error When .aspx were stored in a folder
Apr 24, 2012 12:41 PM|LINK
THis is all I have for my web.config. I've deleted everything and even the folder1.
THen I add in the new web.config:
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<authentication mode="Forms" />
<compilation debug="true" targetFramework="4.0" />
<membership>
<providers>
<remove name="AspNetSqlMembershipProvider"/>
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="LocalSqlServer"
minRequiredPasswordLength="5"
minRequiredNonalphanumericCharacters="0"
passwordStrengthRegularExpression=""
/>
</providers>
</membership>
</system.web>
</configuration>
WHen I debug it, errror occured:
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'Simon_Fung__Educational_Management_System.Default'.
Source Error:
Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Simon_Fung__Educational_Management_System.Default" %> Line 2: Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">Source File: /default.aspx Line: 1
nijhawan.sau...
All-Star
16460 Points
3178 Posts
Re: HTTP 404 Error When .aspx were stored in a folder
Apr 24, 2012 12:46 PM|LINK
Can you check code behind file of Default.aspx and see if it inherits from Simon_Fung__Educational_Management_System.Default or not.
JaniceW
Member
21 Points
37 Posts
Re: HTTP 404 Error When .aspx were stored in a folder
Apr 24, 2012 01:06 PM|LINK
checked:
namespace Simon_Fung__Educational_Management_System
{
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
Ruchira
All-Star
44342 Points
7194 Posts
MVP
Re: HTTP 404 Error When .aspx were stored in a folder
Apr 27, 2012 12:10 PM|LINK
Hello,
Disable the directory browsing in IIS.
Click on the Directory Browsing icon in IIS
And click on the Disable link.
My Tech blog | My YouTube ChannelPlease 'Mark as Answer' if this post helps you.