Home
Get Started
Learn
Downloads
AJAX
MVC
Community
Wiki
Forums
Sign in
|
Join
Home
›
ASP.NET Forums
›
Search
Search
You searched for the word(s): userid:752273
More Search Options
RSS Available
Matching Posts
Timeout function is not working properly
Hi This is what I want when a user comes to login they have a choice to be logged in for 2 weeks or end of session. Now if they don't choose the 2 weeks option and they sit on my site for 30mins with no activity they are logged out. This seems to work just fine. Now if they choose 2 weeks I want the timeout to be set to 2 weeks. So they could sit there for 2 weeks and do nothing and they would be logged in but they seem to still time out after 30mins. Here is my code <authentication mode="Forms">
Posted to
Security
(Forum)
by
chobo2
on 11/12/2009
Re: Timeout function is not working properly
[quote user="Keep it Simple"] As an aside, not using SSL and having someone logged in for 2 weeks on a production system is not recommended. If createPersistentCookie is a method, have you debugged and check if it returns true? If it is a boolean variable does it get set to true? From your code, I cannot see where you are setting "createPersistentCookie" to true. Hence, the code execution is following the "else" block and "expiry" is being set to 30 minutes
Posted to
Security
(Forum)
by
chobo2
on 11/12/2009
Re: How to return a user back to loginpage?
[quote user="sbakshi"] Hi, Please run following code: $().ajaxStop(function(e) { alert("<% = Model.CurrentUser %>"); }); You have to use "=" in above case. Hope it helps [/quote] Still just prints out "<% = Model.CurrentUser %>"
Posted to
ASP.NET MVC
(Forum)
by
chobo2
on 11/10/2009
Re: How to return a user back to loginpage?
[quote user="sbakshi"] Hi, You can redirect the user from your page in case you are using AJAX or jquery to post content on the server. What ever you are using you will get the viewModel to your page, put the javascript code inside the part which will execute in case any response occurs. And add code like below to the page: <script language="javascript"> <%if(Model.CurrentUser == null){%> document.location.href = "<Login page url>"; <%}%> <
Posted to
ASP.NET MVC
(Forum)
by
chobo2
on 11/9/2009
How to return a user back to loginpage?
Hi I have site that users lots of ajax(jquery). Now if the user times out for whatever reason(walked about for 30mins or something). On there next action I want them to be returned to the login page. I setup everything in the webconfig(returnUrl and timeout) and if they try to go to a page they have no premission to go to they get sent to the login page. However I have the authorize tags on the methods in my controllers that are used for ajax requests. So if a user timesout they are no longer authenticated
Posted to
ASP.NET MVC
(Forum)
by
chobo2
on 11/8/2009
How to use dropdownlist html helper?
Hi I want to specify a value attirbute for each of the select fields so I have this: <%= Html.DropDownList("DDL") %> //controller List<SelectListItem> items = new List<SelectListItem>() { new SelectListItem() { Text = "hi", Value = "4" }, new SelectListItem() { Text = "bye", Value = "5"}, new SelectListItem() { Text = "cya", Value = "6"} }; ViewData["DDL"] = new SelectList(items); But this just prints
Posted to
ASP.NET MVC
(Forum)
by
chobo2
on 10/13/2009
How to setup asp.net mvc in IIS
Hi How do you setup asp.net mvc applcation in iis 7. I am using windows 7 and I want to add my site to IIS so I can do some testing. I got IIS installed but I am lost on how to actually add a new website. Like I try to add my website but it never loads up. Can someone walk through the steps on how to setup a asp.net mvc application in IIS 7? Thanks
Posted to
Configuration and Deployment
(Forum)
by
chobo2
on 10/11/2009
Re: Do I need to override Authorize Tag?
One more thing I am wondering does this line get inherited? [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = true)] Or do I need to add it to my custom ones?
Posted to
ASP.NET MVC
(Forum)
by
chobo2
on 10/1/2009
Re: How to make my own Cookie?
[quote user="subhashdike"] If all you need is to place user data in Cookies.. you dont need to worry about authentication cookie. It has its own purpose. You just can create your own cookie and place you data inside. Here is explanation with code. http://msdn.microsoft.com/en-us/library/ms178194.aspx [/quote] Well that data that I want to insert into the cookie is directly related to what is needed for authentication. Otherwise I can't properly authenticate the user. I am still confused
Posted to
Getting Started
(Forum)
by
chobo2
on 9/30/2009
Re: Do I need to override Authorize Tag?
[quote user="hasselhoss"] Have a look at these: http://msdn.microsoft.com/en-us/library/system.web.mvc.authorizeattribute.aspx http://davidhayden.com/blog/dave/archive/2009/04/09/CustomAuthorizationASPNETMVCFrameworkAuthorizeAttribute.aspx http://stackoverflow.com/questions/554094/asp-net-mvc-adding-to-the-authorize-attribute http://weblogs.asp.net/scottgu/archive/2008/07/14/asp-net-mvc-preview-4-release-part-1.aspx http://forums.asp.net/p/1441790/3267245.aspx#3267245 http://stackoverflow
Posted to
ASP.NET MVC
(Forum)
by
chobo2
on 9/28/2009
Page 1 of 60 (598 items) 1
2
3
4
5
Next >
...
Last »
Channel 9:
TWC9: 2009 - The Year in Review
ASP.NET:
Tip#100: Did you know… How to view ASP.NET trace information?
ASP.NET:
Passing anonymous objects to MVC views and accessing them using dynamic
Channel 9:
Channel 9 Live at PDC09: Coding 4 Fun
Channel 9:
Channel 9 Live at PDC09: Stephen Toub
WindowsClient:
Mouse Gestures for Internet Explorer
Channel 9:
Controlling concurrency in Rx
Channel 9:
Dev Tools Ecosystem Summit Videos Available
WindowsClient:
Using Cerebrata's Cloud Storage Studio To Download IIS logs from Multiple Instances of Windows Azure
TechNet Edge:
TechNet Radio: Office 2007 Setup and Configuration (Part 1)
Channel 10:
How-To: Listen to Your Zune Pass Music on Your WinMo Phone
Channel 10:
Share Your Screen with SharedView
Channel 10:
Get Microsoft Tinker Game For Free
Channel 10:
LG eXpo WinMo 6.5 Unboxing Video
Channel 9:
ADFS 2.0 RC is Here!
Channel 10:
Bing Reference Updated with New Sidebar Features
Channel 10:
Look Behind SurfaceScapes
ASP.NET:
Moving your ASP.NET Application to Windows Azure – Part I
TechNet Edge:
Windows Server 2008 R2 Quick Look- Installing the Migration Tools
WindowsClient:
My latest videos – WPF, Silverlight, Sensors, and PDC09
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online