After I publishing my first web app to test what I had been learning, I discovered that when I type the Web address in the browser address bar, it takes me to login page instead of the Default page.
Why did it not show me the Default page first, is what I don't understand ?
Could it be that the authentication was not properly set?
But I set the Default page and some other pages like about and sign up pages as anonymous access, allowing any user to have access to the pages, but yet it still takes me to Login page; the default page doesn't show first
Here is my web config
<system.web>
<trust level="Full"/>
<sessionState timeout="40"></sessionState>
<authentication mode="Forms">
<forms name="login" timeout="40" cookieless="UseCookies" loginUrl="Login.aspx" defaultUrl="overview.aspx" slidingExpiration="true" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
<compilation debug="true" targetFramework="4.7.2" />
<httpRuntime targetFramework="4.7.2" maxRequestLength="3145728" />
<customErrors mode="Off" />
<pages enableEventValidation="false">
<controls>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
</controls>
</pages>
</system.web>
<location path="Signup.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="Default.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="About.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
I also made some routing in the Global asax file
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
ScriptManager.ScriptResourceMapping.AddDefinition("jquery",
new ScriptResourceDefinition
{
Path = "~/scripts/jquery-1.7.2.min.js",
DebugPath = "~/scripts/jquery-1.7.2.min.js",
CdnPath = "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.1.min.js",
CdnDebugPath = "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.1.js"
});
RegisterRoutes(RouteTable.Routes);
}
static void RegisterRoutes(RouteCollection routes)
{
routes.MapPageRoute("About", "about", "~/About.aspx");
routes.MapPageRoute("Login", "login", "~/Login.aspx");
routes.MapPageRoute("Signup", "signup", "~/Signup.aspx");
}
Please, what can I do to make the default page display first, as the start page when I type the web address?
e.g. www.mytestwebsite.com.
I just want that when I type the address like the example I show above, it takes me to the Default page instead of the Login page.