.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

mixed mode authentication

Posted By:      Posted Date: October 01, 2010    Points: 0   Category :ASP.Net

I'm trying to build the mixed authentication and have the following problem:

I have a sub application of main application. The main application has the forms authentication enabled and sub- application has windows authentication enabled.

When I start debugging in main application I get nothing and when I start debugging from sub application (name = WinLogin) - after string user = Request.ServerVariables["LOGON_USER"];


FormsAuthentication.RedirectFromLoginPage(user, true);

I'm redirected to   /Wholesale/WinLogin/Admin/Order.aspx instead of  /Wholesale/Admin/Order..

<authentication mode="Forms">

View Complete Post

More Related Resource Links

SSRS 2005 "Mixed" Authentication Mode


I have a web application where users can authenticate using either SiteMinder or Windows domain accounts.  This is actually configured as two separate virtual directories within IIS 6.  Both applications need to use the same instance of SSRS.  Is it possible to configure the SSRS web application so that if a user is authenticated by SiteMinder it impersonates a Windows account, but if they are already Windows-authenticated that account is used instead?

Mixed mode authentication in sharepint 2010



Is it possible I have two mixed FBA in sharepiont 2010? For example, one custom membershipprovider reads data from Database1, the other custom membershipprovider reads from Database2?

Thank you



Website Windows Authentication fails when enabling SQL Mixed Mode.


Hello all,

Just to describe the scenario. I have a website. This lives on a webserver. On that webserver is an SQL server. The website connects to this database using windows authentication. I have written a windows form application that connects to the SQL Server on the webserver. This application is being run from a location on out intranet. The Winform application use SQL authentication to connect to the database. The SQL Server didn't have mix mode authentication enabled. So I enabled it. The winform application could now connect to the SQL Server.

This is where it starts getting a little strange.

The Website that was already connecting find using integrated authentication starts failing with:

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

When you are enabling mixed mode authentication, you are adding another authentication method, why would the original Windows authentication fail?

Thanks for any suggestions and sorry if this is completely the wrong place to be asking this question,


Web Q&A: Locking Pop-Up Blocker, Mixed Authentication, and More


Edited by Nancy Michell

MSDN Magazine June 2005

How to enable Mixed authentication for single webapplication in sharepoint 2007?


Hi All,

      I have requiremnt to enable Mixed mode ( Windows & Forms Based) authentication on Single web application( with out extending). I have done it in Sharepoint server 2010, It is so simple also. But my requirement is on Moss 2007. I have found some Post and gone through Those posts, in those posts, all are suggesting to extend the default webapllication and enabling forms authentication on extending/Default application another one is on Wondows authentication.

  Is it way to suggest the client or any other alternative to enable the mixed mode authentication?

please suggest me with right solution. Thank you in advance.

Thanks & regards,

Naresh Kapa.


Mixed Mode application suddenly stops loading assemblies

I have a mixed modes application that will occasionally stop executing managed code assemblies after a Windows update. This has been occurring for over a month now so I have not been able to identify any particular update as the problem. We see the problem predominately on XPSP3 but have also seen several times on Vista and once or twice on 7. On a machine that stops working the Fusion log will show a file not found error on the last assembly loaded. LOG: This bind starts in default load context. LOG: No application configuration file found. LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config. LOG: Post-policy reference: AProvider.Data.SqlClient.resources, Version=, Culture=en, PublicKeyToken=c84cd5c63851e072 LOG: The same bind was seen before, and was failed with hr = 0x80070002. ERR: Unrecoverable error occurred during pre-download check (hr = 0x80070002). If I delete this assembly, the application will run although not correctly since the data layer has been removed but it does execute as expected instead of hanging. If we run Procmon and watch the probes the correct folders are searched and the images show as loading. But execution fails, either the application hangs or exits. If we move the assemblies to a 'special' folder such as Program Files or Documents, regasm the p

"Mixed mode assembly is built against version 'v2.0.50727'.... " issue and use custom config file

Hi, My Winform applilcation has used Microsoft.SqlServer.Management.Common namespace(assembly :Microsoft.Sqlserver.smo.dll/Microsoft.Sqlserver.ConnectionInfo.dll) and developed in .NET 4.0. Problem:Application is throw an exception when it tries to use above assembly reference methods. Full error text is shown below, "Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information. " Error is resolved when we include "app.config" file with below code, <?xml version="1.0"?> <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> </startup> </configuration> But, I need to keep configuration file as "renamed.config" and not to include app.config file as of the project requirement.I have set configuration file as "renamed.config" file using below code, //AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", "d:\\reanmed.config" ); I have also included <Startup> element in this "renamed.config" configuration file and removed the app.config file.But it raise me below error, it always expect app.config file with <Startup> element to resolve this iss

Mixed Mode assemblies

Does anyone have a good tutorial on how to make the compiler package a mixed-mode assembly?  Specifically:I have a piece of non-trivial C code maintained externally.  I would like to compile that and distribute it with a managed wrapper in a single assembly.  Im looking at the build files for a project which does something similar but right now im at a loss as to how to set this up. 

Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in t

First, yes I've read every article I can find including this one: http://msmvps.com/blogs/rfennell/archive/2010/03/27/mixed-mode-assembly-is-built-against-version-v2-0-50727-error-using-net-4-development-web-server.aspx Of course it's for web server stuff, but I found this in my config file and added it. However, my problem now is that if I build in release mode I get a hard error in the error list telling me the same thing, even though it runs fine in debug and has the information in my app.config file. The really anoying part is that the error doesn't tell you WHICH assembly is the offending one. Anyone have any ideas?

Web service authentiation when mixed authentication methods are used

I am trying to pull data from the list.asmx web service from a console application. I am using clams based authentication, and whenever only integrated Windows Authentiation is checked everything works fine. Whenever I also check Enable Forms Based Authentication I start getting an Acccess is denied error when I try to connect to the service. I can login successfully using FBA so I don't think the problem is caused by the FBA configuration. Does anyone have any ideas to what might be causing this?

SQL changes from Mixed to Windows auth mode after SQL updates

We run a SQL 2005 cluster on Windows 2008 in Mixed authentication mode.  The last two times we have applied a SQL security patch, it automatically changed the auth mode from Mixed to Windows-only, taking our applications offline.  Most recently was today, when we applied KB970892. Can someone explain why this is happening and how we can prevent it?

SQL Server 2008 Windows Authentication Mode fails for Database Engine, error 18456

I installed SQL Server 2008 Developer Edition (10.0.1600.22.080709-1414) on a Windows Vista 32-bit development machine with Windows Authentication Mode only (no SQL Server Authentication).   Since this is a development machine, I saw no need for Mixed Mode when I did the install.  The SQL Server Management Studio allows me to login to Analysis Services, Integration Services, Reporting Services, BUT NOT the Database Engine!Windows Authentication for the Database Engine gives the following error: EventID: 18456Login failed for user MYDOMAIN\MYLOGIN'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: <local machine>]The 'fix' I have found online is to login as SA in SQL Server Authentication mode & add MYDOMAIN\MYLOGIN as a administrator for the Database Engine.  Unfortunately, I can't since I didn't install SQL Server Authentication mode (only Windows Authentication Mode).  It appears my only recourse is to uninstall, then reinstall in Mixed mode, then to login as SA in SQL Server Authentication mode & add MYDOMAIN\MYLOGIN as a administrator for the Database Engine. Before I do so, does anyone know of a better approach?Scott D Duncan

Login issue using authentication mode="Forms"

Hi,I am using authentication mode="Forms" with ldap, i manage to login and logour fine but when user 1 is logged and when user2 logs, user1 gets the user2 session. Any idea why this might be happening? Here is some code:     <authentication mode="Forms">            <forms name="login" loginUrl="Login.aspx" />        </authentication>        <authorization>            <allow roles="auditor"/>            <allow roles="approver"/>            <allow roles="user"/>            <deny users="?"/>        </authorization>        <identity impersonate="true"/>protected Boolean ValidateUser(String strUsername, String strPassword)        {            //Return true if the username and password is valid, false if it isn't             &n

.NET 3.5 built Mixed mode assembly unable to load in .NET 4 (even after using app config) without .N


I am trying to run a .NET 3.5 built mixed mode assembly in .NET 4. I was able to do that by adding an app config file with the following content:

<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
The problem is that I used an XP machine and installed .NET 4 on it (without any other previous versions of .NET). When I tried to run the same thing, it gives me an error saying it is unable to load the assembly in .NET 4.

Any idea why this is still depending on .NET 3.5?

SQL 2008 - Switching to Windows Authentication Mode


I'm thinking of switching to Windows Authentication on my SQL 2008 server.  Here's my first draft at a plan:

1.  Create Windows accounts matching the exiting SQL accounts.
2.  Grant the new Windows accounts the appropriate database permissions.
3.  Change applications to use the new account information.
4.  Remove the SQL accounts
5.  Switch SQL to Windows Authentication

Is is that simple?  Or am I missing something?

Mixed Authentication Using IIS 7 On Windows Server 2008


Hi Mike,
I have read your workaround for mixed authentication mode, and it works fine here on my own solution when i tried it, but my scenario for mixed authentication mode is a little bit different, it was working fine on IIS 6.0 ,but when i tried it on IIS 7 it didn't work.
My Secuirty settings for the app as follows:
- am using forms authentication and my login page called "Login.aspx".
- am using your custom module called "Mvolo.FormsAuthenticati

Basic Authentication using security mode TransportCredentialOnly


i am trying to achieve username/password authentication using Basic as security mode in my config file. i have a requirement to make my service available on HTTP so HTTPS is not an option. The other requirement that i have is that the client should be authenticated (from a database so Windows authentication is not an option) using username and password that he will provide.

following is the code:

A class added in the service project:

public class ServiceValidator : UserNamePasswordValidator
        public override void Validate(string userName, string password)
            // This isn't secure, though!
            if ((userName != "mohsin") || (password != "mohsin"))
                throw new SecurityTokenException("Validation Failed!");

my service.config looks like this


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