Security :: Switch Off "RequiresQuestionAndAnswer" For A Few Seconds?

Jul 30, 2010

I have a website build on VWD2008 with SQL2008 .net 3.5. I'm using the built in membership components for loging in, I am also using the recover password option for silly users that forget their password. this is hooked up to the email and all is good.

What i'm am trying to do is build in a fail safe for the explitive users that not only forget their password, but also forget their security question. Normally if a user has forgotton the security question, I would go into the "web site Administration tool" in VWD and manually delete their account, then tell them to go re-register.

I have built a page using code I got from hours of searching, that allows me to reset the users password for them, with out any information from them.

[Code]....

The problem I have with this code is that it only works if "RequiresQuestionAndAnswer" is set to false, but for security I would prefer to leave this switched on.

What I have thought of is in the button that runs the above code, first put in a command to set the "RequiresQuestionAndAnswer" to false, run the code to change the password, then set it back to true. The amount of time it would take to run could be counted in milliseconds so security is not a major issue.

I have tried to set "RequiresQuestionAndAnswer" to false

[Code]....

but the propety is read only. switching off "RequiresQuestionAndAnswer" in a button click ?

View 5 Replies


Similar Messages:

Security :: Change The RequiresQuestionAndAnswer And RequiresUniquEmail To False At Runtime?

Mar 11, 2011

I have a situation...i need to change requiresQuestionAndAnswer and requiresUniqueEmail values to false at runtime(for membership providers)

View 4 Replies

Security :: How To Switch To Another User Account

May 30, 2010

I have used membership provider to implement my system. The system administrator can list the users. What I want to do is, administrator should be able to sign-in as the selected user. I can sign out administrator by FormsAuthentication.Signout but how can I sign in as the selected user? Passwords are hashed so I can not retrieve the passwords.

View 5 Replies

Security :: LoginView Switch To LoggedIn Template After Registering?

Mar 10, 2010

I got a loginview located on the master page hen i have a registering functionWhat I want to do is upon registration successful, I wish to directly switch to loginview template to assigned role which is member How do i do that using codebehind?

View 3 Replies

Security :: Redirect Client 5 Seconds After CreateUserWizard Created The User?

Jul 29, 2010

After a user has finished registration, i want to show an info message and redirect the user to the site's main page after 5 seconds. I can do a delayed redirect easily:

[Code]....

How can i call this method only when the user was succesfully created?

View 2 Replies

Security :: LoginView Control: Programmatically Created, Doesn't Switch From Anonymoustemplate To Loggedintem?

Mar 30, 2010

I'm creating a LoginView in a class file rather than at design time.

The equivalent LoginView created in a .aspx page and used the same way works fine, and User.Identity.IsAuthenticated is switching from false to true once I log in as a user so the problem must not be there.

But even once logged in, the programmatic version of this LoginView is not switching from the Anonymous template to the LoggedIn and the output is always "You are not logged in".

Anyone have ideas? thanks.


here is my code to create the loginview

private void BuildAddCommentView(HtmlTextWriter htmlTextWriter)
{
LoginView commentsLoginView = new LoginView();


commentsLoginView.AnonymousTemplate = new LoginViewTemplate("AnonymousTemplate");
commentsLoginView.LoggedInTemplate = new LoginViewTemplate("LoggedInTemplate");

commentsLoginView.DataBind();

commentsLoginView.RenderControl(htmlTextWriter);
}


here's the LoginViewTemplate class

class LoginViewTemplate:ITemplate
{
string _templateType;

public LoginViewTemplate(String templateType)
{
_templateType = templateType;
}

public void InstantiateIn(Control container)
{

Label label = new Label();

switch (_templateType)
{
case "AnonymousTemplate":
label.Text = "You are not logged in.";
container.Controls.Add(label);
break;
case "LoggedInTemplate":
label.Text = "YOU ARE LOGGED IN.";
container.Controls.Add(label);
break;
}

}

}

View 4 Replies

Security :: Aspnet_regiis With The "-pa" Switch For "NTAUTHORITYNETWORK SERVICE" Throwing Exception 0x080070534

Mar 17, 2011

The environment:

Development:

Windows 7 64bit running microsoft visual studio to develop an ASP.NET web application in C#.

Production:

Windows Server 2003 : Microsoft.Net V3.5 : IIS

Application:ASP.NET web application with forms authentication using an Active Directory provider to authenticate against our domain controller. Once authenticated users can select reports which populate a gridview with data from an SQL database.

Background:The web app works flawlessly on development and production. Users can navigate to, authenticate, and access all information on the web app.

Due to sensitive connectionString and active directory provider information in my web.config file we have decided to encrypt those parts.

After researching different methods we chose to do a machine level RSA encryption.

The method which we are following in CMD:

1. cd c:windowsmicrosoft.netframework"version"

2. aspnet_regiis -pc "containerName" //this creates the key container

3. aspnet_regiis -pa "containerName" "NTAUTHORITYNETWORK SERVICE" //this creates an ACL for the NETWORK SERVICE user to be able to access the
container and decrypt the web.config file

4. aspnet_regiis -pef "connectionStrings" "C:inetpubwebsiterootdir" -prov "provider" (where provider is the name of the encryption provider in
web.config) //this uses the encryption provider to encrypt the data then storing the key in the container that we created in step 2.

5. Repeat this process for any other sections of web.config with sensitive info.

View 4 Replies

C# Want To Switch On Enums?

Jul 2, 2010

I have an enum:

public enum Status
{
Incomplete = 1, Complete = 2, Cancelled = 3, Deleted = 4
}

Now on a certain page I wish to list this enum in a checkboxlist. This would be fine except that I want the text of each checkbox to display different text than the enum.

i.e the check boxes should say:"Not Processed" instead of "Incomplete"

"Processed" instead of "Complete"

"Void" instead of "Cancelled"

Is it possible to put this enum in a foreach and then switch on the status and update the text. Like so:var statuses = Enum.GetNames(typeof(Status));
foreach (var status in statuses)))
{
switch (status) [code]....

View 3 Replies

Configuration :: .net 4 Switch To .net 3.5?

Mar 1, 2011

i built web site in asp4/.net 4 using vs2010

only to find out that the hoster that i need to use (rackspace) doesn't support .net 4 except in beta

of course i can't precompile in 3.5 because of some of the assemblies

any quick way to rebuild in 3.5 without totally rebuilding the whole site in 3.5?

View 2 Replies

How To Redirect A Page After X Seconds

Dec 4, 2010

I am tring to redirect but somehow it doesnt work.

I want to redirect a user after x seconds.

Here is what I am trying:

[Code]....

Tried also rediect on codebehind, with sleep method, on PageLoad, but then, the page doesn't show...so maybe I can put this code on another page life cycle method?

View 5 Replies

Switch Statement Not Working?

May 20, 2010

My switch is based on a string, the text value of an server control. code:

[Code]....

[Code]....

View 3 Replies

AJAX :: How To Switch From IFrame App

Mar 3, 2010

1) Should I change the iframe to a User/Server control? or just a div?

2) I currently just have HTML links with load my iframe based on the page the user wants to see. How should I load (1) from the main links?

3) I have multiple levels of user controls. So control A could dynamically load Child controls...which each of those could load child controls. Do All these controls get a scriptManagerProxy? WHere should the original scriptManager go from (1)?

View 1 Replies

MVC :: Switch A Stylesheet On Postback?

Mar 4, 2011

I am new to MVC so I would like to know how would you switch the stylesheet of the view on postback?

I know how to do this in webforms but in MVC it does not appear to be done the same way.

View 2 Replies

C# - C# Switch Statement With A Combo Box?

Jan 28, 2011

currently i'm attempting to using a switch statement to change between time zone with a project for school.

if (extTime1.timeZone == "CDT")
{
switch (cboTimeZone.SelectedItem.ToString)
{
case "EST":

[Code]....

I can't seem to get the cboTimeZone to work correctly. I always thought SelectedItem was the correct choice in this situation.

View 2 Replies

Should Switch To IIS7 URL Rewriting

Mar 5, 2010

I'm using Intelligencia url rewriting currently but have just leased an IIS 7.5 server to put my asp.net 3.5 site on. I installed the IIS URL rewriting module and was amazed at how easy it was to create rules. Creating rules with the Intelligencia url rewriter is complicated (at least for me). Are there any downsides to switching? Is there a reason for me not to move on to the Microsoft solution? This site isn't live yet, so I have time to switch

View 2 Replies

Web Forms :: Image Rotation For 5 Seconds

Jun 24, 2010

actually i was displaying 10 of my products images on my home page and i want that they should rotate or change one by one after 5 seconds themselves. How can i do so by using asp.net,ajax,javascript

View 12 Replies

Compare Two Dates Excluding The Seconds?

Aug 16, 2010

I have a requirement where i want compare only the date part of a DateTime Object not the seconds with the another object.I tried if(DateTime.Compare(dt1, dt2) == 0) where it compares both date and seconds, but i want only date part.

View 3 Replies

How Subtract 60 Seconds From Current Date

Jan 4, 2010

dear i want to subtract 60 seconds from current date.

View 3 Replies

SQL Server :: DateTime Seconds Are Not Saved?

Aug 11, 2010

I am converting my datetime object with current date and specific time 23:59:59 as shown underneath.

[Code]....

But when I check in my sql table datetime column, it is changes seconds part of time from 59 to 00, so for instance, if I have a datetime, 2010-08-11 23:59:59, it changes this to 2010-08-11 23:59:00. How should I fix this.

View 2 Replies

Web Forms :: Redirect Outside Iframe After X Seconds?

Jun 5, 2010

I have a page called HP.aspx that has an iframe to display a presentation made up of several pages. On the last page (Movie.aspx) within the HP.aspx iframe, I want to redirect the page to Projects.aspx outside the HP.aspx iframe after 25 seconds.

I know I can use 'Response.Write("<script>window.open('~/Projects.aspx','_top');</script>");' in the Movie.aspx's codebehind to redirect the page outside the iframe, but how do I set the page load to redirect after 25 seconds.

I' know the usual way of redirect after a specific time in C# is 'Response.AddHeader("REFRESH", "25;URL=~/Projects.aspx");,' but that leaves me still within the HP.aspx iframe. I tried replaces '~/Projects.aspx' withe '<script>...</script>' but it just gave me an error still inside the HP.aspx iframe.

View 3 Replies

How To Make A Page Reload Itself Every 10 Seconds

Jan 15, 2010

How to make an ASP.Net page reload itself every 10 seconds ?

View 6 Replies

Asp Mvc Application Authentication Lost Every 20 To 50 Seconds

Jul 11, 2010

My asp.net mvc application, requires me to login every 20-50 seconds, i contacted the hosting provider, who says its due to recycle of pool. i have added following code to web.config.

<sessionState mode="StateServer" stateConnectionString="tcpip=localhost:42424" cookieless="false" timeout="20"/>

the problem is not solved, how do i serialize the authentication part?

View 2 Replies

Wait Three Seconds Then Turn To Another Webpage?

Mar 29, 2011

I'm currently using ASP.net. I wonder what would I need to do to let the browser wait for 3 seconds so my users can read the text "Customer Successfully Added" before turning to another page? I have attached my code as follows.

Protected Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click
Dim db As New DatabaseClass
db.addProfile(txtLN.Text, txtFN.Text, txtUsername.Text, txtPassword.Text, txtAddress.Text, txtZip.Text, txtPhone.Text, txtEmail.Text)
lblMessage.Text = "Customer Successfully Added"
End Sub

In addition, I'm not sure how to utilize MSDN. For me, its information overload, I'm wondering how to go about finding the solution on MSDN so i would be able to solve my problems in the future.

View 3 Replies

Pinging Domain In Every Few Seconds/minutes Using C#.net?

Feb 16, 2011

I going to developed website that ping domain in every some time interval for checking the domain status. refer site: http://pingdom.com/ this site also like do same. How I get Ping statistic using C#..?

View 2 Replies

IIS7 Session Drops In Seconds?

Mar 18, 2010

For testing I have 1 isolated page - no masters, controls, .... My sessions are lost after about 30 seconds. I've tried setting timeout on the page itself, in web.config, both, and neither. Tried forms authentication with timeout and windows authentication. Recycle the AppPool after changes.

I can response.write from the Session_Start , but I never get any response.writes from the Session_End.

Some things I've tried:

<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;"
cookieless="false"
timeout="20" />
<sessionState mode="InProc" cookieless="false" timeout="20"/>
<sessionState mode="InProc" timeout="20"/>
<sessionState timeout="20"/>

No luck.

My runtime is set to:

<httpRuntime useFullyQualifiedRedirectUrl="true"
maxRequestLength="204800"
requestLengthDiskThreshold="204800"
executionTimeout="600" />

I don't know what this would be relevant, but I can't think of anything else to post!

View 2 Replies







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