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

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

Implement both Forms and Windows Authentication

Posted By:      Posted Date: October 22, 2010    Points: 0   Category :Sql Server

I have two web sites that will be hitting the same reporting services instance.  One is external facing (internet), the other intranet.  The external site is unable to use windows authentication because some of the devices to not support the challenge popup to enter their credentials (think: blackberry without enterprise server).  The other site is just normal windows machines who can pass their credentials normally.  From the research I have found it sounds like [for the external site] I have to have a form that collects their credentials, authenticates (via LogonUser) and they can go on their merry way.  I do not want to do this step for the internal site - I would like to rely on normal windows authentication.

The question is:  Is it possible to specify both types of authentication (custom extension and windows) on the same instance, or do I have to use 2 instances, or use forms for both?

Thank you in advance,


View Complete Post

More Related Resource Links

Forms based users being prompted for windows authentication login for My Sites photos in user lists

Here's an issue I didn't see coming for our forms based authentication users. 

We have a web application extended to an external url to handle forms based authentication for users outside of our domain. Our setup looks like this...

Internal Users/Windows Authentication - moss.domain.com
External Users/Forms Based - mossext.domain.com
My Site for Internal Users - mysites.domain.com

When our forms based users are accessing user lists, or discussion pages that display user pictures, they are getting a windows authentication login for our internal users (mysites.domain.com) who have populated their my site with personal photo.

How do we fix this? 

Automatic expiration of forms authentication when user closes the browser windows without signing ou

Dear all, can u tell me how to automatically sign out a user if he/she closes the browser window without signing out. I'm using Forms Authentication.   Thanks 

Change from Forms Authentication to Windows Authentication

What do I need to do in order to change an application from Forms Authentication to windows authentication?

ASP.NET Forms Authentication connecting to SQL Server with Windows Authentication

Hi everyone, I am not sure if this is the correct forum - apologies in advance - I could not identify where it should go! I have an ASP.NET Web Application that uses Forms Authentication using System.Web.Security.ActiveDirectoryMembershipProvider for signing on using Windows credentials.  This works nicely and is solid. The problem I have is connecting to SQL Server.  I need to be able to connect to SQL Server using Windows Authentication (trusted_connection=yes or Integrated Security=SSPI).  This is critical so I can record the user that created/last modified specific records and also to collect "Task-based" records that are relevant to the currently authenticated user. I have tried Google and a tonne of variations of web.config entries, using Win API to impersonate etc...  The only way that I could make it happen was to:- 1. Use the web.config entry:   (please entry at the bottom of the post.  For some reason it won't go into the right spot in this post!) 2. Log on specifically as the user specified in the above web.config entry.  If I log on as anyone else (ie Authenticate as anyone else), then SQL server simply gets the ASPNET service account as the Windows user. I have laboured over this for hours upon hours.  I really would appreciate some assistance. Thanks in Advance, Joe     "<identity

migrate from windows to forms in claims based authentication


Hi friends,

               I am using sharepoint2010 forms based authenticaion (claims based) configure all the web.config files and its working fine.Now I want to change this applicaion to windows authentication (claims) what are the things to follow to change the application to windows and vice versa.I refer few links but they are referring from  classic to claims and many other things not my req..!



Trying to implement Forms-based authentication



I have a web-application that is set to windows-authentication and is created as anonymous. This is at default zone. I want to change this to forms based authentication.

I tried extending web-application and creating new zone as Extranet but it is asking me to specify the url (within load-balanced url) that should not be same as the url of the default zone url. Dont' know why. Please suggest.

But for now, I had a question. If I modify the default zone to be forms based, will it cause any problems? I am assuming that this will be default for any type of user (internal, external etc) ? Please let me know.  

Also as far as web.config changes (considering changes to default zone ),  is it fine if I modify web.config of this site plus the central admin web.config? If there are another 5 web-applications (that are totally different but reside in same farm), do I need web.config of those web-application also?


Please suggest.


Our goal is that this website (even when accessed internally) will be through form-based authentication only. So 

Building a custom Login Page which does not use forms or windows authentication



I would like to build a custom login page which doesnt uses the windows or forms authentication but I am troubled as to how I should do that. I tried to follow the default AccountController.vb file but it doesnt help me much as it doesnt show where its connecting with the database.

What is need is:

Database Table User

columns are userid, email, password

to write a login page that will use my sql server to login rather than using the forms or windows authentication

Application Architecture in Windows Forms 2.0

Applications have special support in Windows Forms. For starters, you can manage and tailor your application's lifetime, and, when the work flow is disrupted by an unhandled exception, you can choose from several methods of response. Then, there are several application models that you can employ, including Single Document Interface (SDI) and Multiple Document Interface (MDI) applications, each of which can support either multiple-instance or single-instance mode, the former the VS05 default and the latter requiring special consideration. All applications, however, can discover and use a wide variety of information about the system and environment they execute in.

Application Architecture in Windows Forms 2.0-Single-MDI Applications

Consider an MDI application like Microsoft Excel; files opened from the file system (by double-clicking) are all opened as separate child windows within the parent Excel window.7 For the first instance of an MDI application to open a new child window to display the file that was passed to the second instance of the application, the second instance must be able to communicate with the initial instance.

Explained: Forms Authentication in ASP.NET

This module explains how forms authentication works in ASP.NET version 2.0. It explains how IIS and ASP.NET authentication work together, and it explains the role and operation of the FormsAuthenticationModule class.

Using Forms Authentication in ASP.NET - Part 1

Classic ASP developers often had to "roll their own" authentication scheme, however, in ASP.NET much of the grunt work has been taken out. This article outlines how things have changed and how FormsAuthentication can be used to secure a Web site with a minimal amount of code.

ASP.NET Forms Authentication - Part 1

Often, in legacy Web applications, users authenticate themselves via a Web form. This Web form submits the user's credentials to business logic that determines their authorization level. Upon successful authentication, the application then submits a ticket in the form of a cookie, albeit a hard cookie or session variable. This ticket contains anything from just a valid session identification access token to customized personalization values.

ASP.NET forms authentication with roles

.A timeout is specified in minutes. This is "time since last request" not the "time since login". If a login is indicated to be persistent (described later) this is ignored.
.A protection method is specified for the cookie.
Next I wanted to specify a folder to which access is restricted to people who have logged in. To do this I entered the following code in the web.config file (beneath

Forms Authentication in ASP.NET

In this tutorial you will learn about Forms Authentication in ASP.NET 2.0 - Forms Authentication class, Cookie Domain, Forms Cookies, The Login Control, Signin, Signout, Authenticate, Redirect, Login Status, Login Name and Login View Controls.

How to programmatically add controls to Windows forms at run time by using Visual C#

Create a Windows Forms Application
Start Visual Studio .NET or Visual Studio 2005 or a later version, and create a new Visual C# Windows Application project named WinControls. Form1 is added to the project by default.
Double-click Form1 to create and view the Form1_Load event procedure.
Add private instance variables to the Form1 class to work with common Windows controls. The Form1 class starts as follows:

How to Localize Windows Forms and Change the Language at Runtime

Localization is the process of customizing your application to a particular language, culture or locale. Visual Studio provides support for localizing Windows Forms with much ease. In this article, we will see how to localize windows forms and give the user the ability to change to his preferred language at runtime.
When you run a localized application, the appearance is determined by two culture values. The UICulture property is used to specify which resource files will be loaded for the form. The Culture property, on the other hand, determines how strings such as dates, numerals, and currency amounts are formatted.
Let us see the steps required to create a localized form. You can then expand this example and adopt the same approach for the rest of the forms in your project

Localizing Windows Forms

The Visual Studio project system provides considerable support for localizing Windows Forms applications. There are two ways to generate resource files using the Visual Studio development environment: one is to have the project system generate the resource files for localizable UI elements such as text and images on the form. The resource files are then built into satellite assemblies. The second way is to add a resource file template and then edit the template with the XML Designer. A reason for doing the latter is to make localizable strings that appear in dialog boxes and error messages. You must then write code to access these resources.

This walkthrough topic demonstrates both processes in a single Windows Application project.

You can also convert a text file to a resource file; for more information, see Resources in Text File Format and Resource File Generator (Resgen.exe).

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