.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

how to logout a user from an application?

Posted By:      Posted Date: October 27, 2010    Points: 0   Category :WCF


I have created tow forms and applied form authentication by using asp.net config application. When user login, based on the user role form will be redirected to respective form which is consisting its own master page. now, my question is how can user can logout from the application? each master page consist logout button. How can I logout from the application with out going back to the application bt clicking back button in web form?

View Complete Post

More Related Resource Links

Reporting: Deliver User-Friendly Reports from Your Application with SQL Server Reporting Services


SQL Server 2000 Reporting Services--a server-based reporting platform built on the .NET Framework and integrated with SQL Server 2000--lets you easily add reporting from diverse data sources. Using Visual Studio and Reporting Services you can integrate reports from any data source that has an OLE DB, ODBC, or ADO.NET provider into your Web applications. This article explains how it's done.

John C. Hancock

MSDN Magazine August 2004

ASP.NET: Nine Options for Managing Persistent User State in Your ASP.NET Application


ASP.NET provides many different ways to persist data between user requests. You can use the Application object, cookies, hidden fields, the Session or Cache objects, and lots of other methods. Deciding when to use each of these can sometimes be difficult. This article will introduce the aforementioned techniques and present some guidelines on when to use them. Although many of these techniques existed in classic ASP, best practices for when to use them have changed with the introduction of the .NET Framework. To persist data in ASP.NET, you'll have to adjust what you learned previously about handling state in ASP.

Steven Smith

MSDN Magazine April 2003

Need Form Application to allow user to review spreadsheets and email

I need an application to allow a user to see a list of documents/spreadsheets in a directory, click a link to the file, have it open, then review it, close it, then from the form choose to accept or deny it, then have it emailed to a recipient contained in a db or list any good ideas how to accomplish this?  maybe a windows form?    

User Profiles Service Application and Import of SharePoint 2007 SSP data

I have setup a test SharePoint 2010 Farm. I will be using this as a test upgrade of a current live SharePoint 2007 Farm. The database attach method will be used. I have replicated the web application and AAM settings of the SharePoint 2007 Farm to the SharePoint 2010 Farm and have made the 2010 Farm a DC in a new Forest. I don't want to join this to the current domain at the moment. It also has SQL server 2005 with SP3 and cumulative update 3 installed. I have just setup the User Profiles Serice Application and when I go to Manage it, I get this. Error An unexpected error has occurred.   Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: a1760e87-372f-4711-afac-3ceba34bc599 Date and Time: 8/31/2010 4:22:56 PM I have verified and configured the following. Created the Managed Metadata Service. The status is started via Service Applications and Services on Server. Created the User Profiles Service Application and ensured status is started via Service Applications. I started the User Profile Service and User Profile Synchronisation Service via Manage Services on Server.      

User Profile Application Failing in SharePoint 2010 (14.0.4514.1004)

I keep getting the following error "This User Profile Application's connection is currently not available. The Application Pool or User Profile Service may not have been started. Please contact your administrator.". As sugested by Travis at http://blogs.pointbridge.com/Blogs/nielsen_travis/pages/default.aspx I tried commenting the two security nodes, removing its' allowInsecureTransport attributes, and setting then False. As Lionel wrote in his comment I tried also modifying "Central Administration / Application Management / Configure service application associations / Application Proxy Group" of my share point web application. My application pool for User Profile Service Application seems working and User Profile Service status is Started.One thing I remember about my issue, first I tried creating User Profile Service Application I got some error message and tried creating User Profile Service Application again. It gave me some other exception and than I navigated somehow to the "Manage service applications" page and there the desired User Profile Service Application was magically on the list with status Started. I thought - that's great! But when I clicked the User Profile Service Application link I got the nasty red error I mentioned at the beginning. Any ideas?Regards,Dawid Ireno

User Profiles Error - Failure trying to synch web application... No User Profile Application availab

Hello, everyone, I've got an issue I can't seem to figure out. every since I set up my farn and configured the User Profile Service Application, I've been getting the following error every morning at 6:11 AM: Log Name:      Application Source:        Microsoft-SharePoint Products-SharePoint Portal Server Date:          9/3/2010 6:11:23 AM Event ID:      5555 Task Category: User Profiles Level:         Critical Keywords:      User:          NS\spfarm Computer:      jxnpvsp01.NetworkStreaming.local Description: Failure trying to synch web application 3f3f96cc-8bbd-439c-ae80-1ed633c6ec1d, ContentDB 6ef952b5-3312-46a2-b3e1-1b5218b5d209  Exception message was Microsoft.Office.Server.UserProfiles.UserProfileApplicationNotAvailableException: No User Profile Application available to service the request. Contact your farm administrator.    at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.get_ApplicationProperties()    at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.get_PerfmonInstanceHandle()    at Microsoft.Office.Server.UserProfiles.ContentDBS

ASP.NET MVC2 Empty Web Application creates ASPNETDB database when I try to add user to my own databa

I created ASP.NET MVC2 Empty Web Application, I added my own database called 'Database1' and I added to this database Microsoft users, permissions etc. tables but when I create user in ASP.NET Configuration - it creates in catalog /App_Data database called 'ASPNETDB' and adds users to this database - I don't want that - I have my own database for that - what is going on ??In Web.config my ASP.NET MVC application I have only one connectionString - my own:<add name="Database1Entities" connectionString="metadata=res://*/Models.Model1.csdl|res://*/Models.Model1.ssdl|res://*/Models.Model1.msl;provider=System.Data.SqlClient;provider connection string="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database1.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" /> so what is going on ? How can I add users to my database 'Database1' ?

Same Application On The Same IIS Logs User Out

Hi,I have identically same applications on the same IIS. But when I login one, the other logs me out by IIS.Event Viewer logs this error:Event code: 4005 Event message: Forms authentication failed for the request. Reason: The ticket supplied was invalid. Event time: 07.09.2010 17:00:51 Event time (UTC): 07.09.2010 14:00:51 Event ID: a87e86a77ab641a99dcb2904765eb658 Event sequence: 24 Event occurrence: 21 Event detail code: 50201  Application information:     Application domain: /LM/W3SVC/1/ROOT/ECZKariyer-5-129283414711424580     Trust level: Full     Application Virtual Path: /ECZKariyer     Application Path: C:\inetpub\wwwroot\ECZKariyer\     Machine name: BIZALPERE  Process information:     Process ID: 2040     Process name: w3wp.exe     Account name: NT AUTHORITY\LOCAL SERVICE  Request information:     Request URL: http://localhost/ECZKariyer/loginpage.aspx?ReturnUrl=Forms authentication failed for the request. Reason: The ticket supplied was invalid.fECZKariyerForms authentication failed for the request. Reason: The ticket supplied was invalid.fscreen.aspx     Request path: /ECZKariyer/loginpage.aspx     User host address: ::1     User:      Is authenticated: Fa

Oulook.exe hangs when Domain User launches application through Interop windows 2003 sp2

Hello,I have a problem using Interop.Outlook on a win2k3 sp2 server. For windows 2003 version prior to sp1 i could use a specific identity for application pool and i had no problems launching outlook.User was authenticated and delegated correclty. With sp2 the Outlook.exe process is launched by the domain user specified as identity (also visible on Task Manager Processes) but no exception or time out is ever thrown.  The only way that i can make this to work is when i set impersonate=true in web config (without setting userName and password as this would have exactly the same affect with the application pool identity).Are there any permissions that i can set to overcome this?Help would be greatly appreciated. Normal 0 false false false EL X-NONE X-NONE Appreciate

Create user account for web authentication from non-web/local application

Hi, I have an application which is installed on local pc and is using SQL db. It is a client management system where I want to add capability to register new clients and give them access to my web site which is sharing the same SQL database with local application. At the moment clients can register on the web site and I have ASP.NET authorisation system set up with aspnetdb_user, aspnetdb_membership and etc tables. But sometimes it happens that I need to register clients on my local application on PC and ideally would like that registration to create online account for the client as well. Then I want to be able to send him user id and password by email and let him know that he has been registered in my database and online account is ready for him as well. Basically I want to have full synchronization between asp.net membership service and local application through SQL db. As I said both online and local apps are shareing the same SQL database. I would like to know if it is possible at all and what would be the best practice to implement it. Thank you.  

claims authenticated (FBA) user cannot open a connection to our custom application database

We have designed a custom sharepoint site. This site uses a membership provider that I implemented, and the users are stored in our custom application database. These are the steps I follow to reproduce the error: 1. Browse to our site. Select Forms Authentication from the default.aspx selection. 2. Enter in a username from our DB table. This user I have configured as a site collection administrator. 3. Login to the site. The user is authenticated by our membership provider and allowed access (ValidateUser returns true) 4. Browse to a page that attempts to connect to the custom app DB. 5. I get the following error when the page attempts to open a connection to our DB: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server NOTES: The code that opens the DB connection is running with SPSecurity.RunWithElevatedPrivileges. Our application pool account has access to the database. My user can connect to the database fine as well as the user that our  application pool is running as. I have validated the connection string that is being used in the debugger, and that is correct.

general error login failed for user '' on windows 2008 in application that runs correctly on windo



we have a web application that one company prepared for us. this application read connection string from registery key in hkey_local_machine and connect to sql server 2005 database.

It worked correctly in windows server 2003. we changed our Server'OS to windows server 2008. but we have a problem to login. after try to login we see this error :

Login failed for user ''. The user is not associated with a trusted SQL Server connection.

Server Error in '/dabir' Application.

Login failed for user ''. The user is not associated with a trusted SQL Server connection.

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 for user ''. The user is not associated with a trusted SQL Server connection.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be

adding windows user control in asp.net application


hi fri i had created one user control in c# and i want to add this user control in asp.net application pl tel me how to do this

thanks in advance

"Use Social Features" permission in "User Profile Service Application"



We wish to disable the "Tags and Notes" feature on our SharePoint 2010 site.  When I remove the "Use Social Features" permission from the "User Profile Service Application" this also removes the "My Site" link from the drop down at the top of the page.

Why on earth would this happen?  According to the TechNet page on social features (http://technet.microsoft.com/en-us/library/ee721063.aspx) the Use Social Features permission "Includes social tags, Note Board, and ratings."  Nothing in there indicates that it would remove the link to My Site.

My Site continues to work of course, it is just that the link is removed (which confuses users).

We want to disable Tags and Notes but leave the link to My Site.  Is there a way?


Issue using Managed Metadata with custom fields in the User Profiles application


Hi there,

I've created several custom properties in my User Profile Application.

I've also created several Term Sets in the Managed Metadata service application Term Store for use with these custom properties. Some of the Term Sets contain terms and have a closed submission policy whilst others have an open submission policy.

If the user hasn't already populated any of these custom fields in their profile, when they click on the Edit My Profile link from their My Site Profile page everything seems okay (for the first time).

The user is then able to successfully select values for these custom fields - the metadata is available. They can click on the "tag" icon to select values, or start typing and the suggestions appear. They are also able to enter new values into custom property fields where the term set is open to submission.

If they then Save and Close then go back into Edit My Profile, often not all of the existing data is populated in the metadata custom fields. On different occasions different fields may be blank. Sometimes this is accompanied by the error "Message from webpage / The server method 'ValidateTerms' failed", but not always.

Has anyone else tried this or have any suggestions are to what the issue might be?

Thanks in advance.

SQL Server Express 2008 idling user logout facility


please let me  know whether there is a  facility in SQL SERVER EXPRESS 2008 to logout idling users automatically.My problem here is that due to limited no of license other needy users can not log in to the system 


Problem hosting a WPF user control in a windows form application

I have a windows forms application and want to to use WPF inside this application. So I have add a WPF user control into my project. Then I take a ElementHost from the toolbox and put it on my windows forms. The problem is now, when I want to add the WPF control with "Edit Host Content" I get the message "This ElementHost is currently not hosting any editable content....." What's wrong? How can I embed my implemented WPF control into the ElementHost ?
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend