Controlling The FormsAuthentication CreatePersistentCookie Expiration?

Sep 20, 2010

In an ASP.NET MVC2 app, we have the standard login action...

if (ValidateUser(model.Email, model.Password)
{
FormsAuthentication.SetAuthCookie(model.Email, model.RememberMe);

[code]...

View 1 Replies


Similar Messages:

Security :: What Is The Difference FormsAuthentication.RedirectFromLoginPage And FormsAuthentication.SetAuthCookie

Mar 16, 2010

What is the difference between:

FormsAuthentication.RedirectFromLoginPage

AND

FormsAuthentication.SetAuthCookie(Text_txtUserName.Text, true);
HttpContext.Current.Response.Redirect(RedirectFromLoginAddress);

View 3 Replies

How To Set Expiration To Image

Mar 3, 2010

I'm creating image (jpg) at run time in my application (ASP.NET/C# 3.0). I need to delete the created image after 30 mins. So is it possible to set expiration to the image after 30 mins when creating the image like setting expiration to cookies.

View 3 Replies

How To Set Email Expiration

Jul 1, 2010

I'm programatically sending an email and I want to set it to expire after a certain amount of time. I tried using the following but it doesn't seem to work:

message.Headers.Add("Expires", Now.AddMinutes(2))

I can see the value in the header but the email doesn't actually expire.

View 4 Replies

MVC 2.0 TempData Expiration?

Jul 3, 2010

What happens in Asp.Net MVC 2.0, when next request does not come ever to retrieve value from TempData. Is it stored permanently or expires?

View 1 Replies

Web Forms :: Controlling A UI From Another UI?

Jun 28, 2010

Is it possible to control a web page from another web page. ?My scenario isI have a page (UI1). It has a hyperlink. Clicking on the same it opens another seperate UI (UI2). UI2 also have a hyper link.My question is , is there any way that I can control UI1 from UI2 using this hyper link

View 4 Replies

Security :: How To Set A Trial Expiration

Aug 12, 2010

I am not sure if I am asking this question correctly. Sometimes when you don't know enough, you may not know what to ask. I want to set up memberships with an ASP.NET website. The memberships will have a 14 day free trial period. After that, the user will need to pay a fee if they wish to continue to access the website. I am not sure how to accomplish this. After adding a membership database to the website, setting up roles ect., what do I do next? Do I need to make adjustments to the tables of the database, or write some code somewhere in the application? I have never done this exercise before, Logically, I know that I need to implement something that keeps track of expiration date. Also, how do I prevent a user from just making up new user names and credentialing?

View 4 Replies

What Happens When A HttpCookie Expiration Has Been Crossed

Mar 26, 2010

I am creating some cookies in my ASP.NET application. These cookies expire 10 minutes after they have been created. I follow the approach described on MSDN as shown here:[URL]

My question is, when a cookie "expires", what happens? Does the browser automatically delete the cookie? Is it our responsibility as developers to remove the cookies if they exist and have expired?

View 2 Replies

Sliding Expiration In Web App Using Claims From STS

Jun 8, 2010

1) How/where do I set the lifetime of the session cookie in my web application when using an STS to get claims? From what I can tell, it seems I can only do this programmatically in the erviceConfigurationCreated event.

2) How/where can I make sure that the expiration is sliding?

View 1 Replies

C# - To Realize Auction Expiration

Mar 3, 2010

How to realize auction expiration? Make it inactive after 1-3-5 days? Something like eBay?I am using asp.net c#.I have "active" boolean field in my auction table.

View 1 Replies

.net - Page Expiration After Postback?

Mar 11, 2010

I've been doing web development for a while and have yet to read a good answer to this question: iven a page that executes transactions through a postback, how do you prevent the user from duplicating the transaction when they do something as simple as hit the back button? I've explored trying expire the cache but I must admit I'm lacking in my understanding of ASP.NET caching. What is the approach I should use to make the old request stale and invalid?

View 2 Replies

C# - Controlling Access With Web.config?

Jul 26, 2010

I am trying to control access to my website with windows integrated.

[code]....

Except that, this code isn't working. I can access it if im a member of that group or not. What is wrong?

I looked through some code, and thought maybe I needed to switch the ? for a *, but then that seems to just deny everything.

View 1 Replies

How To Set Cache Expiration For Javascript File

Jul 5, 2010

I have asp.net application. I'm using external javascript files in my application. When I test my site with page speed tool from google it says that following resources are missing a cache expiration. also some of the images and css files.

View 2 Replies

Web Forms :: Content Expiration For Certain Pages?

Jan 19, 2010

I am in need for setting content expiration to immediate for certain parts of my website. Basically we want to expire the "shopping" pages but the browsing pages shouldn't expire allowing users the ease of using the back button to browse around. Is there a way to enable it per page, master page, folder, or something?

View 1 Replies

Disadvantages Of Enable Content Expiration In IIS?

Nov 5, 2010

What may be the disadvantages of enable content expiration in IIS 6 ?

View 1 Replies

Handle Facebook Session Expiration?

Jan 27, 2010

am a ASP.NET developer using Facebook Developer Toolkit to develop a facebook flash application with flash developer.When the user plays the game for a certain period of time, there are chances that the facebook session expires and I can't call any Facebook API for processing as a result.

View 2 Replies

Web Forms :: Controlling A Text Box With A Check Box?

Aug 16, 2010

I want to enable a text box when a check box is pressed. I am using asp.net 2.0 with vb.

Here is my current code, no errors are returned but it doesn't do anything when the check box is clicked.

[Code]....

[Code]....

[Code]....

[Code]....

View 4 Replies

Controlling Site From Master Page?

Mar 25, 2011

I have a web app that contains 1 master page and a bunch of content pages. One of the content pages is "SysLogin.aspx", which is called from a menu option from the Master Page. When the page is called, the user logs in. However, there is a "Login" button. In the code behind of the Login_Click() event, the the user successfully logs in, they are supposed to be redirected to a "Default.aspx" page and the Main Menu is enabled. Problem is, the app hangs on the redirect statement and it goes to the Catch portion of the Try Catch construct. For some reason, when I examine the exception, it only says "Unable to evaluate expression". Below is my code. My question, other than what I've stated is...should your application be controlled using code in the Master Page or in child pages. My code from the "SysLogin.aspx" is below. It hangs on the highlighted line of code.

Private Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLogin.Click
Try
If txtLoginID.Text.Length > 0 Then
If txtPassword.Text.Length > 0 Then
If dbIO.ValidateUser(txtLoginID.Text, txtPassword.Text) Then
Session("LoggedIn") = txtLoginID.Text
Session("loggedInOk") = "Y"
Response.Redirect("~/Admin/Default.aspx")
End If
End If
End If
Catch ex As Exception
Master.errMsg = dbIO.DisplayError("btnLogin_Click()", "SysLogin", ex.Message)
End Try
End Sub

View 1 Replies

Controlling Collapsible Panel With DropDownList?

Dec 29, 2010

I was wondering if anyone knew if it was possible to control a collapsible panel with a drop down list?

For example. Say the drop down list has options, 1, 2, 3, 4. I want to hook up panels that go to each option. So when the user selects 1, panel one is shown, when user selects 4 panel 4 is shown.

View 5 Replies

Web Forms :: Controlling What Gets Entered Into A Textbox?

Mar 29, 2010

How can I set up a format for a text box so that if they are to put a date or the time they are required to put it in as mm/dd/yy or time as 12:00am?

View 6 Replies

C# - Controlling A Hardware Connected To A Com Port?

Dec 18, 2010

i want to make a web site which is able to control a hardware on a clients computer.

the the hardware for example be a simple gsm modem

this is a general question, for asking of methods and opinions as for the following

control this hardware using the computer the hardware is connected to.
control this hardware using another computer over a network
control this hardware using a web site application or a simple web site

the thing to consider --> this is a class group project which we implement in c# asp.net.

edit

hope the broadness is narrowed down.

assume there is a remote control attached to the comm port of my computer, which controls a small car.

i want user around the world to be able to move the car using there keyboard.

i can write a desktop app to control the remote using the printer port but thats on my local host only.

View 1 Replies

Configuration :: Controlling IIS LoadLibrary PATH?

May 4, 2010

Controlling IIS LoadLibrary PATH?

View 1 Replies

MVC :: Controlling Order Of Model Validation?

Jul 6, 2010

With my model, I have one view model using another as its base. In my case, BaseUserModel is inherited by CreateUserModel, in order to share common properties such as Username and Password. My CreateUserModel adds to that by having ConfirmPassword, Email, SecurityQuestion, etc.

My problem is, when using the ValidationSummary() Html helper, the validation is obviously in order of the properties in my model. Basically, because of the inheritance I have going on here, the errors are not in the correct order.

Is it possible to control when or how these validation rules are added to the list? The only attribute I'm using is Required.

View 2 Replies

Mobiles :: Controlling The Size Of Webpages?

Jul 3, 2010

I'm writing a web application for display on smartphones and multimedia phones. If I go with the default web page size then the phone resizes the page so small that it is impossible to read the text. Fixing the width of the objects on the page to 200 px wide has no effect. The device still tries to display the entire page.

So I'd like to find a way to force all the pages to be no more than 200 px wide.

View 1 Replies

Security :: Add An Expiration Token To A Existing Querystring?

Jul 2, 2010

I don't know if the following is possible or not but in brief, here is what I'm trying to achieve:

1. When a user requests to view a document, they click on a link (could be other) which contains an encrypted query string containing data required to retrieve the relevant document. i.e.[URL]

2. I want to ensure that if after x minutes the user goes back to their history and select the link again or re-type the same url as above that it will not request the document and redirect them to a page letting them know that the requested document "link" is no longer valid.

I don't want to rely on cookies or sessions, so thought that maybe there would be a way to add a datetime token at the end of the existing url but this needs to be done at run-time as the url is already predefined when the link is created, so I'm not sure how can I do this?

ideally, I'd like something like this [URL] where the token would contain the date & time when the link was clicked.

Once re-requested, I would decrypt the token and validate it again the server time and if it was over the x minutes defined, it would redirect me to the "link is no longer valid" page.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved