Security :: Login Status Error When User Logs Out?

Apr 10, 2010

i am using membership to create an account page that a user enters after logging on.

In the page load of "MyAccountPage.aspx" I have the following which gets the userid and add it as a paremeter

Guid userid = (Guid)Membership.GetUser().ProviderUserKey;"ClientId"].DefaultValue
= userid.ToString();
ObjectDataSource7.SelectParameters[
"ClientId"].DefaultValue = userid.ToString();

This works fine - I have now added to the page a LoginStatus as when they arrive they are loggen in. The problem is when the user clicks the Logg off link I get the error on the page below -

Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

[Code]....

Is this because the page load is trying to get the logged on user ID

but they have just logged out?

How can I allow the User to logg out without getting the error?

View 4 Replies


Similar Messages:

Security :: Secured Site Using The Login Control / Do Not Want Them Redirected Based On Their Login Status?

Mar 24, 2011

I am doing a simple secured site using the login control. I would like users to be redirected to their dashboard page once they log in, but after that if they choose to browse I do NOT want them redirected based on their login status. I am using the generic template provided in VWD with the basic login setup in the template including the tabbed ASP menu control - nothing fancy, nothing custom. This is intended to be something very simple and quick. Here is the code I am using for the page load...

[Code]....

So if I do this code WITHOUT the "IsPostBack", logged in users are always redirected to their dashboard and cannot see the hompage. However with that IsPostBack test, the redirect after initial login doesn't work.

I know this is extremely basic and simple, but I am restarting with this stuff after a year away, and I need a nudge.

View 4 Replies

MVC :: Page.user Info - Register User Logs Logs Table - Use Userid

Dec 28, 2010

i use formsauthentication for login. but i wanna register user logs logs table. i can access username page.user.identity.name, but how can use userid?

View 4 Replies

Security :: Login Status - Login Returns Bad URL

Sep 18, 2010

I have a website secured using Forms:

[Code]....

My login page is the usual login.aspx so I don't need to set the loginurl.I have a standard loginsatus control to display the current status and allow the user to login/logout.

[Code]....

On the my development machine this works fine. However when I release it to a test site when I click the "login" link the request sent to the server includes as number of percentage-coded / so the request looks something like this:

http://wwwmysitehere.com/%2flogin.aspx%3fReturnUrl%3d%252fDefault.aspx

(returns a "A potentially dangerous Request.Path value was detected from the client (?)." error)

or without the "Default.aspx" returnurl:http://wwwmysitehere.com%2flogin.aspx%3fReturnUrl%3d%252f

(returns page not found)

View 4 Replies

MVC :: Strongly Typed User Control On All Pages Based On Login Status And User Role

May 9, 2010

I want to display a menu (which will be strongly typed with it's own unique model) across all pages only if a user is logged in.What menu items are available depend on the user's role and also I'll need to hit the repository to get numbers like "x Messages", etc

Been scratching my head for a simple solution here. Don't want to create something that need changes all over the place.All my controllers derive from a BaseController, all my Models from BaseViewModel....probably where I'll be implementing functionality for this.

View 3 Replies

Security :: To Logout The User When He Logs In On Another Machine?

Sep 8, 2010

i'm using ASP.NET membership for a silverlight application that makes use of Wcf Ria Services.

my problem is that i don't want multiple logins on the same account and i need to logout the user when he logs in on another machine. (I don't want the account to be used by many people at the same time, and the last who logs in must kick out everyone else)

View 4 Replies

Security :: Log Off Current User When He Logs In From A Different Computer?

Sep 26, 2010

I want to log out the user when he (or someone else) logs in from a diferent computer using the same user name.

Basicaly i want to prevent multiple individuals from staying loged in under a single user name by signing out the previous users. Any ideeas about how i can acomplish that ?

View 8 Replies

Security :: Find If User Logs In For First Time In C#?

Mar 22, 2011

I need to show the user a different page when he loggs in for first time alone..

How can i do this..

View 3 Replies

Security :: When The User Logs In Then They Are Able To View Their 'profile' Such As Their Name, Address Etc?

Jan 13, 2010

I've been trying to work out this error for a while now and i still dont understand it because i have been following a tutorial online step-by-step but i recieve this error when i log in ?

What i am trying to acheive is when the user logs in then they are able to view their 'profile' such as their name, address etc. The login is validated against a table in a database, ...this is the error i am recieving:

Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

[Code]....

View 3 Replies

Security :: Logout From Site Without Login Status

Jul 12, 2010

How to logout from web site without any login status? i mean when my loginstatus control is not visible i want a method that makes the user loged out.

View 1 Replies

Security :: Login Status And Control Not Logging In?

Oct 10, 2010

Is there something here messing up my login functionality? I can't log in. Before when I was logged in, I couldn't log out. It seems to have started when I clicked on "Remember me". Could there be something conflicting with web.config and the aspnetdb profile provider service setting that was initially set regarding profiles/roles/access?

[Code]....

View 5 Replies

Security :: How To Get Login Status Controls To Display A Log In Option

Jun 17, 2010

I have the following log in status controls on the top of my master page. It displays the logged in as, manager log in, and Log out options.However, when a user is not logged in, there is nothing displayed there. When the user is NOT logged in, is there a way to display a "Login" text link that takes you to the log in page and then "disappears" once the user is logged in?

[Code]....

View 1 Replies

Security :: Display Confirm Message Using Javascript After User Successful Logs In

Sep 22, 2010

I need to display a javascript confirm box after the user successfully logs into the application. If the select 'yes' of the confirm box then I need to navigate them to a different page and if they select 'no' the default.aspx page should be displayed. I am using the login control.

I tried to use ClientScript. RegisterClientScriptBlock on Login1_Authenticate event, it didn't work. I tried the same thing on the Page_Load event of Default.aspx as well as Master Page load event, that also didnt work.

View 6 Replies

Security :: Impersonation / Getting Error / Login Failed For User 'NT AUTHORITYANONYMOUS LOGON

Aug 16, 2010

I'm running IIS 6.0 on a Windows 2003 server and running an ASP.NET 4 application which connects to an SQL Server 2005 database on another server. I have my Default.aspx page set to Windows authentication with anonymous access disabled.

When I load up the page it asks for a username and password (as expected), I enter my credentials and it comes up with the following error:Login failed for user ''. The user is not associated with a trusted SQL Server connection.

If I add the following to my web.config file: <identity impersonate="true"/> then I get the following error:

Login failed for user 'NT AUTHORITYANONYMOUS LOGON'.

And if I add the <identity impersonate> tag set to true and with my username and password included it connects successfully.

I can't leave this in there as I want each user to connect as themselves, so why is the server not using the credentials that I enter when prompted to connect to the database ?

View 5 Replies

Security :: User Login Control - Launch The Web Administration Tool - Getting Some Exception Error?

Jun 22, 2010

Im using Visual Studio 2010. I'm new to asp.net. I'm trying to do a simple user login page but whenever I try to launch the Web Administration tool, I keep getting some exception error. The below images is the error I encountered.

View 4 Replies

Web Forms :: Change Contents Of Page Based On User Login Status

Jun 11, 2012

i want to change contents in content place holder based on the user logged in or logged out

View 1 Replies

Security :: How To Redirect User To An Error Page From Login Control Upon Entering Wrong Username

Mar 1, 2011

I wanted to know how to add the feature- that user should be redirected to an error page where the error will be display, upon entery wrong username/password when trying to login through an asp.net login control?

1. how to redirect the user to an error page upon entering wrong username/password (from a login control which is placed on master page)?

2. how to pass the error to the error page so it can be displayed there?

View 28 Replies

Security :: HTTP Status 403: Forbidden Error When Trying To Access Webservice?

Feb 10, 2011

I hace created a webservice, that is on one server and then I created a web application on another server to consume that webservice. My web application uses threading. In my web application, I call the webservice and it returns me the response. Then my thread sleeps for 20 minutes and then it again calls webservice, but when i call the webservice second time , it fails. Here is the error and stack trace:-

Stack Trace:- at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at TransactionExport.LocalWebService.TransactionExportStaging.GetDays(String projCode) in C:inetpubwwwrootTransactionExportWeb ReferencesLocalWebServiceReference.vb:line 102
at TransactionExport.TransactionExport.LoadDays() in C:inetpubwwwrootTransactionExportExport.vb:line 267

View 4 Replies

Security :: Register New User - Login Failed "Server Error In '/' Application"

Feb 10, 2011

I created online store following MvcMusicStore tutorial in MVC 2. Used standard login view as shown in tutorial. I created database on new server and it's working well - I can search for albums etc. The problem is when I am trying to register new user - I am getting error listed below (can't log in too). I created new database using aspnet_regsql.exe. Server authentication is set to SQL Server and Windows authentication mode. Server Error in '/' Application. Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. Source Error:

[Code]....

Line 125:Line 126: MembershipCreateStatus status;Line 127: _provider.CreateUser(userName, password, email, null, null, true, null, out status);Line 128: return status;Line 129: }

[Code]....

View 3 Replies

Security :: Create User Wizard Login Error Message Dont Show In A Message Box?

Aug 19, 2010

i am using create user wizard and capturing other information within content template when a new userregisters. Some of the textboxes are binded to required field validators.there is a validation control on the page and ShowMessage box is True.If they dont complete some of the text boxes then the message box pops Up with the error message.It does not however include information errors like "User already exists" or Email address already existsfrom the create user wizard membership UserName and Password Textboxesis it possilbe to hook all of these up so I get one message box with all errors including membership ones?

View 3 Replies

Security :: Create A Login Window From Where User Could Login From Their Gmail Or Others Id And Write

Aug 13, 2010

i m currently creating an article module, and i want if user wana comment on to the any particular artical, than he should login any of his mail id like gmail, yahoo hotmail etc and than post his or her comment and after than comment should go into the DB.

View 3 Replies

Security :: Using ASP Tools For Login And Create User / Login Tool Is Going To Get Userid And Password Info?

May 25, 2010

I've created a page to add users, using the CreateUserWizard, I use the Login Control to login.

I have setup the config file to use my SQL server, not express

<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=xxxx.xxxx.xxxx.xxxx;Initial Catalog=aspnetdb;Persist Security Info=True;User ID=xxxx;Password=xxxxxx" providerName="System.Data.SqlClient" />

I go to the create user page, add a user.

I can SEE the user on the database using Server Management Studio...

I go to signon and get "Your login attempt was not successful. Please try again."

I have not customized the login control in any way. (OR the createuserwizard)

HOW can I tell where the Login tool is going to get userid and password info?

How can I tell if it is not finding the user or the password does not match?

View 2 Replies

Security :: Digest Authentication In Web Service Error / The Request Failed With HTTP Status 401

Apr 20, 2010

I am connecting to remote server for web service using ASP.NET 3.5 web site. something like, [URL]. Remote server is providing digest authentication to access the web service. I dont have access to modify authentication on the remote server but I have an windows account on that server. If I try to Access service WSDL through programming I get the following error:

The request failed with HTTP status 401: Unauthorized. Same web service if I try to access through browser, [URL], it asks for user name and password. Entered windows account user name and password, still getting error: You are not authorized to view this page, HTTP Error 401.1 - Unauthorized. How to pass the digest authentication credentials to the web service through visual studio or any other programmatic method?

View 1 Replies

Security :: How To Authenticate And Login A User Without Using The Login Control

Feb 7, 2011

I have built a login form that does not use the asp.net 'login' control.

in my code behind i have this:

[Code]....

but this does not seem to maintain my user loged in... as soon as the user navigates to the next page he is loged out again...

View 3 Replies

Security :: User Login And Admin Login On The Same Site?

Oct 21, 2010

I have a login page for my users. And I want my admin login to have its own page. Right now I have to login as an admin in the same page as the users.

How can I have 2 login on my site? I get an error if I have authentication forms on both my web.configs.

View 6 Replies







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