473,699 Members | 2,799 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

server.transfer and forms authentication

hi there,

my app needs to retrieve a value from a previously viewed page. The user
moves between pages on the site with the server.transfer method doing the
legwork. This works fine.

The problem comes from getting values from a particular page; which does not
use the server.transfer command. This page is for logging in, and is the page
a user is redirected to when accessing the site. They are redirected there by
the web.config file which uses forms authentication. As the logon page uses
the line

FormsAuthentica tion.RedirectFr omLoginPage(str ing userName, bool
createPersisten tCookie);

to redirect the user; the parameters of the logon screen are not saved from
the class meaning i cant access them. What would be a sensible way to get
round this ? I need it passed securely as i want the password; so posting it
in the url is out.

I thought to authenticate the user then direct them to a specific welcome
page. How/Can this be done whilst satisfying the web.config file for
authenticating a user.

Any help greatly appreciated,

H
Nov 19 '05 #1
5 2561
Instead of using:
FormsAuthentica tion.RedirectFr omLoginPage
(which i believe is a Response.Redire ct)

Rather use
FormsAuthentica tion.SetAuthCoo kie

you can then call Server.Transfer yourself

HTH

"java.equals(co ol)" <ja************ @discussions.mi crosoft.com> wrote in
message news:82******** *************** ***********@mic rosoft.com...
hi there,

my app needs to retrieve a value from a previously viewed page. The user
moves between pages on the site with the server.transfer method doing the
legwork. This works fine.

The problem comes from getting values from a particular page; which does
not
use the server.transfer command. This page is for logging in, and is the
page
a user is redirected to when accessing the site. They are redirected there
by
the web.config file which uses forms authentication. As the logon page
uses
the line

FormsAuthentica tion.RedirectFr omLoginPage(str ing userName, bool
createPersisten tCookie);

to redirect the user; the parameters of the logon screen are not saved
from
the class meaning i cant access them. What would be a sensible way to get
round this ? I need it passed securely as i want the password; so posting
it
in the url is out.

I thought to authenticate the user then direct them to a specific welcome
page. How/Can this be done whilst satisfying the web.config file for
authenticating a user.

Any help greatly appreciated,

H

Nov 19 '05 #2
You can stick whatever you want in the Session state and then retrieve
it later from any page in your app...

To store:

this.Session["MyStoredVa lue"] = "Hello World!";

To retrieve:

string HelloWorld = this.Session["MyStoredVa lue"].ToString();

Nov 19 '05 #3
This method is definately the easiest. But is the method secure ? are the
values hidden ? if not can i encrypt them ?

"Joey" wrote:
You can stick whatever you want in the Session state and then retrieve
it later from any page in your app...

To store:

this.Session["MyStoredVa lue"] = "Hello World!";

To retrieve:

string HelloWorld = this.Session["MyStoredVa lue"].ToString();

Nov 19 '05 #4
You can most definately encrypt them, and if they are a security risk you
should!

You can also store values you want into a FormAuthenticat ionTicket, which
you can use the FormsAuthentica tion encryption to encrypt
(that is if you choose not to use sessions)
"java.equals(co ol)" <ja************ @discussions.mi crosoft.com> wrote in
message news:4C******** *************** ***********@mic rosoft.com...
This method is definately the easiest. But is the method secure ? are the
values hidden ? if not can i encrypt them ?

"Joey" wrote:
You can stick whatever you want in the Session state and then retrieve
it later from any page in your app...

To store:

this.Session["MyStoredVa lue"] = "Hello World!";

To retrieve:

string HelloWorld = this.Session["MyStoredVa lue"].ToString();

Nov 19 '05 #5
great. thanks very much guys

"Grant Merwitz" wrote:
You can most definately encrypt them, and if they are a security risk you
should!

You can also store values you want into a FormAuthenticat ionTicket, which
you can use the FormsAuthentica tion encryption to encrypt
(that is if you choose not to use sessions)
"java.equals(co ol)" <ja************ @discussions.mi crosoft.com> wrote in
message news:4C******** *************** ***********@mic rosoft.com...
This method is definately the easiest. But is the method secure ? are the
values hidden ? if not can i encrypt them ?

"Joey" wrote:
You can stick whatever you want in the Session state and then retrieve
it later from any page in your app...

To store:

this.Session["MyStoredVa lue"] = "Hello World!";

To retrieve:

string HelloWorld = this.Session["MyStoredVa lue"].ToString();


Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3957
by: techfuzz | last post by:
I'm posting my problem experience and solution I found here for other ASP.NET developers. I have a web application that uses Forms Authentication with Active Directory to control access. In this web application, I have search page that utilizes the Windows Indexing Service (MSIDXS provider). For reasons I'm not aware of at this time, setting <identity impersonation="true" /> in the web.config causes an error whenever you try to search.
2
2172
by: Lior Amar | last post by:
Hey All, Trying to understand why I can not get SQL server to trust my IIS server. I have two machines set up, 1 App and 1 DB, and I'm trying to validate the applications access to the DB server via NT Authentication. The App comes in via NTLM which from my understanding only supports Single hop security delegation. So far I understand why it doesn't work, although seems to me like a very bad problem. Now, Basic Authentication will...
3
1879
by: yma | last post by:
Hi, I put a .aspx page inside Server.Transfer() within a button. The page was created for testing so it only has button and I did not add code. When I click the button, it gave me an error below. Could try this and help me? Thank a lot. --Chris Server Error in '/mysite/WebApplication1' Application. ---------------------------------------------------------------------------- ----
4
5389
by: tommy | last post by:
hello everbody, i write a little asp-application with forms-authentication. i copy my aspx-files with web.config to my webspace and i get the error above... i tried to set the custom-errors-tag ="off" but nothing happens.... what is my failure????
11
6039
by: Alexander Bosch | last post by:
Hi, I'm having a problem similar to the one that's stated in this KB http://support.microsoft.com/default.aspx?scid=kb;en-us;839521 When I'm posting a page to itself with the bool value as true it falls into an infinite loop and later a StackOverflow Exception. I need to do this and not a Response.Redirect or a transfer with the bool in false. My problem is that this KB is saying that this problem should be solved with ServicePack 1 of...
1
1287
by: Ryan | last post by:
Hello, I am having a really strange issue, I have folder containing an ASP.NET application. (The folder's name is Web) The root directory of the whole site I have an Index.aspx page that contains: <% Server.Transfer("Web\Default.aspx") %>
0
1933
by: themattconnolly | last post by:
I have an application built on virtual pages, where the url is intercepted and a different page is built according to the url. In order to also use forms authentication, I had a Server.Transfer call in a custom HttpModule, called by AuthenticateRequest. The problem is that now I want to access session variables that are set on the application's start, but calling Server.Transfer inside of AuthenticateRequest loses reference to the session....
23
6800
by: barryfz | last post by:
I need to be able to move from one web app on my server to another on the same server and preserve the session state. I have played with server.transfer but I get an error saying I can't do this. How can I accomplish this. I don't think redirects with session state being passed in the url makes any sense from a security standpoint. -- Barry
2
4555
by: =?Utf-8?B?UmljaGFyZA==?= | last post by:
Hi, Is there any difference in handling the site navigation by using location.href or by using server.transfer? window.location.href = '<%=Response.ApplyAppPathModifier("~/MyAccount.aspx") %>'; or
0
8687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8883
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6534
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5874
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4376
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3057
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2347
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2009
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.