Working with XP-Pro and VS.Net I have set my Start Page to "Home.aspx" but
the application always starts the "Login" page - - - How can I change the
start page to the Home.aspx???
On the login page that displays I have
private void LinkButton1_Click(object sender, System.EventArgs e)
{
bool MyVar = true;
Msg.Text = "ReDirecting to Home.aspx";
Response.Redirect("Home.aspx",MyVar);
}
AND.....
private void LinkButton2_Click(object sender, System.EventArgs e)
{
Msg.Text = "ReDirecting to Home.aspx";
Response.Redirect("Home.aspx",MyVar);
}
Using debug I see that both buttons just re-load the Login page and
re-execute the Login page Page_Load event???
WHY / HOW can I get the ReDirects to work?
I am so frustrated - please help me understand WHY these don't work.
Thanks in advance,
Paul 5 2024
Hi Paul,
Are you running any type of authentication (Forms or Windows)? That could
keep sending people back to the login page. Good luck! Ken.
--
Ken Dopierala Jr.
For great ASP.Net web hosting try: http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.
"PaulThomas" <Pa********@discussions.microsoft.com> wrote in message
news:4B**********************************@microsof t.com... Working with XP-Pro and VS.Net I have set my Start Page to "Home.aspx"
but the application always starts the "Login" page - - - How can I change the start page to the Home.aspx??? On the login page that displays I have private void LinkButton1_Click(object sender, System.EventArgs e) { bool MyVar = true; Msg.Text = "ReDirecting to Home.aspx"; Response.Redirect("Home.aspx",MyVar); } AND..... private void LinkButton2_Click(object sender, System.EventArgs e) { Msg.Text = "ReDirecting to Home.aspx"; Response.Redirect("Home.aspx",MyVar); } Using debug I see that both buttons just re-load the Login page and re-execute the Login page Page_Load event??? WHY / HOW can I get the ReDirects to work?
I am so frustrated - please help me understand WHY these don't work.
Thanks in advance, Paul
YES - I am using
<authentication mode="Forms" />
Does this affect "all" pages - I guess I need to do some more serious
reading...
I "thought" that if a page required security - I would code for it in the
individual pages that need it. I should be able to put up pages that do not
require security and go directly to them without validation - right?
Thanks for the clue...
Paul
"Ken Dopierala Jr." wrote: Hi Paul,
Are you running any type of authentication (Forms or Windows)? That could keep sending people back to the login page. Good luck! Ken.
-- Ken Dopierala Jr. For great ASP.Net web hosting try: http://www.webhost4life.com/default.asp?refid=Spinlight If you sign up under me and need help, email me.
"PaulThomas" <Pa********@discussions.microsoft.com> wrote in message news:4B**********************************@microsof t.com... Working with XP-Pro and VS.Net I have set my Start Page to "Home.aspx" but the application always starts the "Login" page - - - How can I change the start page to the Home.aspx??? On the login page that displays I have private void LinkButton1_Click(object sender, System.EventArgs e) { bool MyVar = true; Msg.Text = "ReDirecting to Home.aspx"; Response.Redirect("Home.aspx",MyVar); } AND..... private void LinkButton2_Click(object sender, System.EventArgs e) { Msg.Text = "ReDirecting to Home.aspx"; Response.Redirect("Home.aspx",MyVar); } Using debug I see that both buttons just re-load the Login page and re-execute the Login page Page_Load event??? WHY / HOW can I get the ReDirects to work?
I am so frustrated - please help me understand WHY these don't work.
Thanks in advance, Paul
Hi Paul,
This is a fast fix. In your Web.config use location tags like below to only
protect folders that need protecting. For home pages don't protect that.
Good luck! Ken.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<location path="Members/Administrator">
<system.web>
<authorization>
<allow roles="Administrator"></allow>
<deny users="*"/>
</authorization>
</system.web>
</location>
<location path="Members/OtherUserType">
<system.web>
<authorization>
<allow roles="UserTypeOne, UserTypeTwo"></allow>
<deny users="*"/>
</authorization>
</system.web>
</location>
<system.web>
.......
<authorization>
<allow users="*" /> <!-- Allow all users, the location tags will protect
folders. -->
</authorization>
--
Ken Dopierala Jr.
For great ASP.Net web hosting try: http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.
"PaulThomas" <Pa********@discussions.microsoft.com> wrote in message
news:C4**********************************@microsof t.com... YES - I am using <authentication mode="Forms" /> Does this affect "all" pages - I guess I need to do some more serious reading...
I "thought" that if a page required security - I would code for it in the individual pages that need it. I should be able to put up pages that do
not require security and go directly to them without validation - right?
Thanks for the clue... Paul "Ken Dopierala Jr." wrote:
Hi Paul,
Are you running any type of authentication (Forms or Windows)? That
could keep sending people back to the login page. Good luck! Ken.
-- Ken Dopierala Jr. For great ASP.Net web hosting try: http://www.webhost4life.com/default.asp?refid=Spinlight If you sign up under me and need help, email me.
"PaulThomas" <Pa********@discussions.microsoft.com> wrote in message news:4B**********************************@microsof t.com... Working with XP-Pro and VS.Net I have set my Start Page to
"Home.aspx" but the application always starts the "Login" page - - - How can I change
the start page to the Home.aspx??? On the login page that displays I have private void LinkButton1_Click(object sender, System.EventArgs e) { bool MyVar = true; Msg.Text = "ReDirecting to Home.aspx"; Response.Redirect("Home.aspx",MyVar); } AND..... private void LinkButton2_Click(object sender, System.EventArgs e) { Msg.Text = "ReDirecting to Home.aspx"; Response.Redirect("Home.aspx",MyVar); } Using debug I see that both buttons just re-load the Login page and re-execute the Login page Page_Load event??? WHY / HOW can I get the ReDirects to work?
I am so frustrated - please help me understand WHY these don't work.
Thanks in advance, Paul
Thanks Ken,
I looked at the webhost4life site and when I get closer to ready, I'll
probably sign up there. I also tried your suggestion about the web.config
file and I don't have it working (yet - with multiple 'location path'
statements) but I think you put me on the right path.
Thanks again,
Paul
"Ken Dopierala Jr." wrote: Hi Paul,
This is a fast fix. In your Web.config use location tags like below to only protect folders that need protecting. For home pages don't protect that. Good luck! Ken.
<?xml version="1.0" encoding="utf-8" ?> <configuration>
<location path="Members/Administrator"> <system.web> <authorization> <allow roles="Administrator"></allow> <deny users="*"/> </authorization> </system.web> </location>
<location path="Members/OtherUserType"> <system.web> <authorization> <allow roles="UserTypeOne, UserTypeTwo"></allow> <deny users="*"/> </authorization> </system.web> </location>
<system.web> .......
<authorization> <allow users="*" /> <!-- Allow all users, the location tags will protect folders. --> </authorization>
-- Ken Dopierala Jr. For great ASP.Net web hosting try: http://www.webhost4life.com/default.asp?refid=Spinlight If you sign up under me and need help, email me.
"PaulThomas" <Pa********@discussions.microsoft.com> wrote in message news:C4**********************************@microsof t.com... YES - I am using <authentication mode="Forms" /> Does this affect "all" pages - I guess I need to do some more serious reading...
I "thought" that if a page required security - I would code for it in the individual pages that need it. I should be able to put up pages that do not require security and go directly to them without validation - right?
Thanks for the clue... Paul "Ken Dopierala Jr." wrote:
Hi Paul,
Are you running any type of authentication (Forms or Windows)? That could keep sending people back to the login page. Good luck! Ken.
-- Ken Dopierala Jr. For great ASP.Net web hosting try: http://www.webhost4life.com/default.asp?refid=Spinlight If you sign up under me and need help, email me.
"PaulThomas" <Pa********@discussions.microsoft.com> wrote in message news:4B**********************************@microsof t.com... > Working with XP-Pro and VS.Net I have set my Start Page to "Home.aspx" but > the application always starts the "Login" page - - - How can I change the > start page to the Home.aspx??? > On the login page that displays I have > private void LinkButton1_Click(object sender, System.EventArgs e) > { > bool MyVar = true; > Msg.Text = "ReDirecting to Home.aspx"; > Response.Redirect("Home.aspx",MyVar); > } > AND..... > private void LinkButton2_Click(object sender, System.EventArgs e) > { > Msg.Text = "ReDirecting to Home.aspx"; > Response.Redirect("Home.aspx",MyVar); > } > Using debug I see that both buttons just re-load the Login page and > re-execute the Login page Page_Load event??? > WHY / HOW can I get the ReDirects to work? > > I am so frustrated - please help me understand WHY these don't work. > > Thanks in advance, > Paul
Hi Paul,
Very cool. I use Forms Auth. with webhost4life and I use the <location>
tags for restricting access to different member roles. Remember to put the
<location> tags between the <configuration> and <system.web> tags. The
<authorization> tag should go in place of the one that is currently in your
Web.config in the <system.web> tag. The location tags below are used if you
are assigning people to roles, I figured that you were. But if you aren't
then change it to <allow users=""> and put in the user names you allow.
Also the Web.config file this goes in should be in the root directory of
your web app and the paths in the <location> tags should be relative to your
root directory. Good luck! Ken.
--
Ken Dopierala Jr.
For great ASP.Net web hosting try: http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.
"PaulThomas" <Pa********@discussions.microsoft.com> wrote in message
news:BA**********************************@microsof t.com... Thanks Ken, I looked at the webhost4life site and when I get closer to ready, I'll probably sign up there. I also tried your suggestion about the
web.config file and I don't have it working (yet - with multiple 'location path' statements) but I think you put me on the right path. Thanks again, Paul
"Ken Dopierala Jr." wrote:
Hi Paul,
This is a fast fix. In your Web.config use location tags like below to
only protect folders that need protecting. For home pages don't protect
that. Good luck! Ken.
<?xml version="1.0" encoding="utf-8" ?> <configuration>
<location path="Members/Administrator"> <system.web> <authorization> <allow roles="Administrator"></allow> <deny users="*"/> </authorization> </system.web> </location>
<location path="Members/OtherUserType"> <system.web> <authorization> <allow roles="UserTypeOne, UserTypeTwo"></allow> <deny users="*"/> </authorization> </system.web> </location>
<system.web> .......
<authorization> <allow users="*" /> <!-- Allow all users, the location tags will protect folders. --> </authorization>
-- Ken Dopierala Jr. For great ASP.Net web hosting try: http://www.webhost4life.com/default.asp?refid=Spinlight If you sign up under me and need help, email me.
"PaulThomas" <Pa********@discussions.microsoft.com> wrote in message news:C4**********************************@microsof t.com... YES - I am using <authentication mode="Forms" /> Does this affect "all" pages - I guess I need to do some more serious reading...
I "thought" that if a page required security - I would code for it in
the individual pages that need it. I should be able to put up pages that
do not require security and go directly to them without validation - right?
Thanks for the clue... Paul "Ken Dopierala Jr." wrote:
> Hi Paul, > > Are you running any type of authentication (Forms or Windows)? That could > keep sending people back to the login page. Good luck! Ken. > > -- > Ken Dopierala Jr. > For great ASP.Net web hosting try: > http://www.webhost4life.com/default.asp?refid=Spinlight > If you sign up under me and need help, email me. > > "PaulThomas" <Pa********@discussions.microsoft.com> wrote in message > news:4B**********************************@microsof t.com... > > Working with XP-Pro and VS.Net I have set my Start Page to "Home.aspx" > but > > the application always starts the "Login" page - - - How can I
change the > > start page to the Home.aspx??? > > On the login page that displays I have > > private void LinkButton1_Click(object sender, System.EventArgs e) > > { > > bool MyVar = true; > > Msg.Text = "ReDirecting to Home.aspx"; > > Response.Redirect("Home.aspx",MyVar); > > } > > AND..... > > private void LinkButton2_Click(object sender, System.EventArgs e) > > { > > Msg.Text = "ReDirecting to Home.aspx"; > > Response.Redirect("Home.aspx",MyVar); > > } > > Using debug I see that both buttons just re-load the Login page
and > > re-execute the Login page Page_Load event??? > > WHY / HOW can I get the ReDirects to work? > > > > I am so frustrated - please help me understand WHY these don't
work. > > > > Thanks in advance, > > Paul > > > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Damo |
last post by:
Could someone please help me. I am a newbie at PHP. I downloaded formail.php
Version 5.0 from Jacks scripts( http://www.dtheatre.com/scripts/ )and
changed the required areas to my email address and...
|
by: Bob Garbados |
last post by:
forgive my ignorance, as I'm new to php coming from a ms background...
If I create a page named redirect.php and it's only content is:
<?php
header("Location: http://www.google.com");
?>...
|
by: Stephen |
last post by:
I was wondering if someone can help me with an web application design
problem. I have a aspx page which builds up an arraylist called addresses
and outputs the values in the arraylist items to a...
|
by: Justin |
last post by:
Hi,
Im confused here over the usage of Response.Redirect and
Server.Transfer. I used frameset for my work, what are the
proper usages of the two methods that seems working
similar..
The...
|
by: Sospeter |
last post by:
Hi Ken,
I have done that but still experiencing same problem. Tried the
following i.e. turning smartnavigation = false and using
server.transfer as below but nothing works.
Please help.
...
|
by: Trisha |
last post by:
I have a navigation user control navig.ascx that redirects to respective
pages based on webcontrols.linkbutton clicks using response.redirect.
I would like to control the look and feel of those...
|
by: Thomas |
last post by:
Hi All,
i am getting this error once i submit my page to a payment gateway and when
it returns the reponse back.
Redirect URI cannot contain newline characters.
Description: An unhandled...
|
by: nkoier |
last post by:
Hi, I've been going crazy trying to figure out what's wrong with our
Asp.Net 2.0 intranet site.
At the very top of our main page I provide a TextBox and a Button for
submitting Google searches....
|
by: =?Utf-8?B?cGI=?= |
last post by:
I am having trouble doing a redirect in an async asp.net implemention.
Most of the time it works, but when it doesn't it just "hangs", the browser
never gets any return page. If I run it under the...
|
by: UKuser |
last post by:
Hi,
I'm not sure if this can be done as I've searched the web and this
forum.
I am using an online merchant provider and I must post certain
variables to their webforms through a form on my...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |