Click here to Skip to main content
15,904,024 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys. I have another problem. What I need is this: I need to configure my web application running by the user, when the user enter the application, immediately switch to Login.aspx.

So I have my database (I do not use a database that are automatically assigned by the application) that is associated with the application. When the application running, I want to switch to Login.aspx.

In order to better understand what I want to say, I will put the code of some pages.

This is my web.config file
---------------------------------
XML
<?xml version="1.0" encoding="UTF-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
    <system.web>
  <compilation debug="true" targetFramework="4.0" />
    <pages theme="Style">
    </pages>
    </system.web>
  <connectionStrings>
    <add name="myConn" connectionString="server = myServer; database = myDatabase; Integrated Security=True" providerName="System.Data.SqlClient" />
  </connectionStrings>
</configuration>

----------------------------------------------------------------------------


Once again let me repeat. When the user runs the application, I want to be automatically transferred to Login.aspx page, not the Default.aspx
Posted
Updated 22-Dec-11 5:47am
v2
Comments
Wendelius 22-Dec-11 11:48am    
Don't use big fonts. It's making it hard to read the question.
zajim 22-Dec-11 11:50am    
I just wanted people to pay attention to it. Ok, I will not use big fonts.

1 solution

HTML
<configuration>
   <system.webserver>
      <defaultdocument enabled="true">
         <files>
            <add value="login.aspx" />
         </files>
      </defaultdocument>
   </system.webserver>
</configuration>

FYI Default Document <defaultDocument>
 
Share this answer
 
Comments
Uday P.Singh 22-Dec-11 11:54am    
5ed :)
Wendelius 22-Dec-11 12:01pm    
Excellent, 5
Monjurul Habib 22-Dec-11 12:04pm    
5!
zajim 22-Dec-11 13:18pm    
Sorry, I try this, but it doesn't work :-(
thatraja 22-Dec-11 13:26pm    
Its a fine solution. Did you see that link in my answer? check it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900