.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

Adding Twitter authentication support to ASP.NET application

Posted By: DigiMortal     Posted Date: September 01, 2010    Points: 0   Category :ASP.Net
In my last posting I introduced my idea about common membership provider for ASP.NET that is able to support multiple authentication providers. Before writing membership provider we need support for some authentication providers to get an better idea how to use them together. In this posting I will introduce you how to use OAuth protocol with Twitter. Before we start . . let me make some important notes and give some advises so you know better what is going on: OAuth is secure open-source authentication API that is used by Twitter and many other providers. You can find out more details about OAuth from their homepage at http://oauth.net/. There is also official specification for OAuth by Internet Engineering Task Force (IETF): The OAuth 1.0 Protocol. To make our sad lives easier there is library for .NET that makes it for us easier to support OAuth and OpenID protocols in our systems. This cool library is called DotNetOpenAuth. This library is also used by stackoverflow and MySpace. We will use the same library, so go and download it before starting with code. You need to register Twitter application. Go to page Twitter's application registration page and register new application. You need consumer key and consumer secret parameters of your application later. Copy "Sign in with Twitter" to some of your web application's folders where other images are. You need

View Complete Post

More Related Resource Links

Web Security: Part 2: Introducing the Web Application Manager, Client Authentication Options, and Pr


This article, the second of two parts, continues coverage of Web security for Windows. It introduces the Web Application Manager in IIS that allows Web processes to be isolated, decreasing the security risk associated with running in a logon session. The article then picks up where Part One left off-it discusses authentication methods such as basic authentication, digest authentication, integrated Windows authentication, and anonymous logons, and the benefits and drawbacks of each.

Keith Brown

MSDN Magazine July 2000

Error in / Application after adding employee search in webpart


Hello everyone,

I am working on sharepoint 2007 and I was editing the webpart of the software and after adding the predefined employee search table, the server has crashed while trying to access the server remotely with the following error message:

Error in / Application

However, while trying to login locally I have no problem and can easily login.

What will be the course of action in fixing this error.

Also the site is complaining of an invalid certificate even after adding an exception.

Any help would be greatly appreciated.

Thank You,

Chris Stanko

Possibility of Windows authentication in Windows application

Hi, I have developed Windows form application( C#). I need to authenticate user using Windows Authentication mode. i.e When a user tries to access the developed Windows form application , the windows authentication log on screen should pop up asking for the user credentials ( user name , user password, domain). Our requirement is to use the default windows logon screen which generally pops up to get the user credential instead of the custom developed logon screen.This is similar to Windows authentication in ASP.Net but for Windows form application , Is it possible to authenticate user using Windows authentication mode? If so how?

Visual Studio asp C#.NEt web application publishing tweet/status on Twitter/Facebook

Hi guysIf you could give me some guidelines It would mean a lot to me. what type of authentication I use, how to do  id from localhost, how to modify web.config file etc 

Using Windows Authentication for connecting sql server from web application using froms authenticati

Hi Experts, I have one web application which is configured to be use froms authentication. But, I don't want to use SQL Authentication to connect to SQL server, I want to use windows authentication. Can somebody plase give me detailed setps for how to implement this? Thanks for your help in advance. -Chintak. 

Customize windows authentication for Web Application

Hi All, I am using Windows Integrated Authentication with impersonation for all my web applications (on IIS 7 and 7.5), and everything is perfect. Now I would like to enhance the authentication procedures bypassing the login prompt from IIS, and supplying a custom page to collect the Username + Password inputs from Users, but still mantaining the Windows Authentication support (I rely on the WindowsPrincipal in my application for many core activities). I just would like to replace the IIS popup with my custom authentication page. First of all I have tried to mix the WIA with Forms Authentication, but - even if I succeed in authenticating users against the Active Directory - the result is not what I was looking for, because I want to mantain Windows Authentication and not migrating the mechanism to Forms Authentication (even if implemented with the AD provider). The first step I am trying is to use the "LogonUser" function to create the correct WindowsPrincipal and then the "Impersonate" method, but after this step I have no idea about how to persist the authentication data and\or to pass the User information to the Windows Authentication. As a result, when I execute the first redirection to another page the information about the user manually logged are lost.   Any idea? Thank You very much in advance. Alberto

No support for SQL Server Authentication and SSIS !!!!

Hi I want to manage my servers from a central location and have the ability to manage my packges too.  Unfortunatley my servers are across domains which means I have to use SQL Server Login, which isn't a bad thing.  However for some bizzare reason I can't connect to Integration Services using this method, only windows authentication which is a complete pain in the butt from a management stand point as I have to copy packages to various servers rather than add them from a central point. Does anyone know if this bug/feature or what ever Microsoft is calling it will be fixed or know of any workarounds.  Thanks    

WCF Membership Authentication and Winform Client Application Services

I am needing more validation of what I am doing versus solving a problem. I have a winforms application that uses Client Application Services to validate a user against a customer membership provider all over SSL.  This works fine.  My winforms application validates correctly. The winforms application uses WCF to call services that are installed on the same IIS server that is providing the membership services for the Client Application Services.  The WCF services use wsHTTP binding, transport security, username credentials, and validate against the same membership provider as the Client Application Services. It appears that although the service and Client Application Services are at the same URL, they do not share credentials between them.  Ideally, once I log into Client Application Services, any calls to a WCF service at that location would be automatically authenticated.  However, this is not true.  I have to pass the username and password into the credentials for the WCF service.  This works as expected where the username and password are validated prior to allowing a service call.  On subsequent services calls, it does not validate again since it has established the secure channel. So, does this sound like the best approach?  Is there a way to pass credentials from the Client Application Services to WCF automatically?  I

IIS 6 Windows Authentication + ASP.NET Impersonation when application resides on a UNC share

When the application resides on a local folder, the current user ((System.Threading.Thread.CurrentPrincipal.Identity.Name) is the windows authenticated user. OK. But..when the application resides on a UNC share, the current user is the windows user configured in IIS virtual directory to access the UNC share. This is not the desired behavior in my case, what I want is to have the same behavior as in the case where the application is in a local folder (current user matches the windows authenticated user)This is configurable in some way in IIS 6 or IIS 7?   thanks in advance,Alexander Wolff  

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.  

how to change the web application Database connection form Windows authentication to SQL Server acco

Hi, I have a web application created and Database connection authentication was given as Windows authentication. how can i change it to a SQL server account in MOSS 2007. Thanks in advance.

Enabling Windows Authentication to SQL Server using Application Pool Credentials

I have created a WCF Service (VS2008), an application pool account which has the access to the SQL Server(in remote machine). Configured the App Pool account to the Virtual Directory in IIS (Version 6.0). Once I browse through the SVC file, I can see the WSDL file. I have the "Windows Authentication" and the 'Anonymous authentication" Checked in the Properties for the Virtual Directory. But when I access service through Client, I get "The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'.". Binding that is being used is HTTPBinding. I have set the Identity Impersonate to True as well. Bottom line is - I need to use the App Pool account to connect to the SQL Server. Could some one please help me in this?  

Forms Based Authentication on Extranet Application

I have a web application that is using classic authentication. I have extended it to my extranet so I can use https from the outside. All of this works, except I would like to have the extranet users not have to type domain\username. I am guessing I need to use claims based authentication with forms. It seems the only way to do this, would be to go back in time, and tell my original application to use claims based instead of windows. Is there a way I could have just my extended site use forms? I would really like to keep my extranet users out of active directory, as they are not part of my company.

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

Adding UpdatePanel in Application Page


Hi Folks,

      I have a ApplicationPage where i have dropdown and a commandButton.I need to use updatepanel for on dropdown Ctrl and Button ctrl.How can we do it?

have addeed the below code for adding updatepanel for

              <asp:UpdatePanel ID="upTroubleCode1" runat="server" UpdateMode="Always" >

        <ContentTemplate >
        <asp:Button ID="btnSubmit" runat="server" Text="Submit" Width="89px" Font-Size="Medium" BackColor="#CF0000" ForeColor="White" OnClick="btnSubmit_OnClick" />

 so when we click on Button nothing is happening.

How we can add updatepanel for DropDown and as well CommandButton


Thanks & regards


Adding a SQL Server Table to Windows Form Application (c#)



I have created forms in the past that have connected to a SQL Server database and done a variety of manipulations.

This time I have a static table in SQL server that I want to add to the project and load into an array without having to connect to SQL Server i.e. the windows form application will have this datatable embedded within it so any user can use it. How do I add the table to the project in this way?

I know how to load the data into the array.




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