.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

AspNetActiveDirectoryMembershipProvider & mixed logins

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :ASP.Net
Hi All,I'm creating a WPF application, for which all users must be authenticated to an Active Directory.- Clientside, i'm using Client Application Services.- Server-side, i have an asp.net web application with a AspNetActiveDirectoryMembershipProvider.All is working as expected.There's one catch however.Some of the wpf application users log in with their windows in to the domain, others don't.So for the users which are logged in to the domain (group A), I do not want to ask for their username/password at application startup.The other users (group B) of course have to supply their Active Directory Username/password at application startup.This group B just perform Membership.ValidateUser(userName, password), ending up in the AspNetActiveDirectoryMembershipProvider and be authenticated.However, how can I check for group A that they have been succesfully authenticated to the AspNetActiveDirectoryMembershipProvider, without havingto ask their username/password?Thanks,Koen

View Complete Post

More Related Resource Links

Prevent Concurrent Logins ? [ Already logged in or currest session is still active implementation] ?


Hi Experts ,

I searched over the web but no luck so far and thought of getting some help form gurus .

Did any out really implemented a way to handle concurrent logins ?

Please not that i'm no using either forms authentication or Roles/Memberships , I do have custom authentication for my website .

I'm sure it is someway related  with global.asax file handling something in application events and session events but unable to figure this one out .

Any pointers will highly be valued and appreciated .

Thanks a tonne in advance .

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?

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.


Only allow 2 Logins per UserAccount


Hi there...

I am sitting with a senario where the client wants a User account only to be logged-on a maximum of 2 concurrent sessions. I am just putting this out to please ask the pro's what ways there are to do this?

I know that one way is to write the Userinfo into a database table ie. UserName,IpAddress and some other usefull info but then when it comes to the time when the user just closes the browser then how am i going to update the database table?

What is the advantages of using your preferred method and what is the cons.


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

XMLSerializer don't handle mixed contents properly

mixed content model allows a combination of text and elements in the XML document. we use .net xmlserializer to serialize/deserialize the XML. XmlSerializer don't handle mixed content properly. XmlSerializer handles mixed content models to a degree. XmlSerializer add the text in the xml document, but the position of text is not exactly where they appeared in the original XML document. Let's take a example here is original xml <employee xmlns="http://example.org/xmlserializer">   here is some text...   <id>333-33-3333</id>   here is some more...   <name>Bob Smith</name>   and here is even more... </employee> We deserialize above xml using the xmlserializer then we serialize it back into xml. Now xml document is changed as follows <employee xmlns="http://example.org/xmlserializer">    <id>333-33-3333</id>   <name>Bob Smith</name>   here is some text...   here is some more...    and here is even more... </employee> You see the position of text is changed. I have seen the Microsoft code to serialize/deserialize the xml through reflector. They put text in a string array but position is not saved. Is there any solution or workaround? I don't want to parse the xml by xmlReader. I want fix in the Microsoft generated classes that ar

"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?

Need to allow user to view all logins on SQL Server

SQL Server 2005/2008. By default, on SQL Server any user can see only his login or NT Groups, which he belongs to (both through Security\Logins in SSMS and sys.server_princapals DMV). I need to permit one power user to see all SQL Server logins. But only see, not change. Can you help me? P.S. VIEW ANY DEFINITION helps, but this permissions are too much.

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?

ASP.NET 5.0: Multiple logins and login types in default ASP.NET membership provider

What do you think about an ability of having multiple logins and login types to be attached to the same user? Let me explain this by showing how database schema can be re-factored to support this model:Remove [Password], [PasswordSalt] columns from [Users] database tableAdd [Logins] table with one-to-many relationship between [Users] and [Logins] tablesThis will allow one user to have multiple credentials attached to his or her account of different types such as Username&Password, Windows Live ID, Open ID from different providersYou will be able to restrict allowed login types and OpenID providers in web.config So.. do you think it is a good idea to add support of this model into ASP.NET 4.5/5.0 membership service?http://aspnet.codeplex.com/workitem/7149

Mixed authorization on one webiste

I have an ASP.NET application that can be installed with either Forms Authentication or Windows Authentication.  All of my customers install using Windows Authentication.  I use Forms Authentication in-house as it is easier for me to work with different clients.  But enough about that. I have a module as part of my application for Mobile Users.  It displays a very simple HTML interface for low bandwith phones and air cards.  It seems that some phones when going to this type of site that is Windows Authentication, it throws an error saying that you aren't authorized to view the page.  From a computer, it will ask for credentials. What I would like to do is use Windows Authentication Or Forms for my Main Application, but in the MOBILE folder, it would be nice if I could use FORMS Authentication.  Can I mix the two?  Can I just add a Web.Config to the folder for the Mobile Files and put FORMS Authentication? The only other way I thought of doing this is: 1)  create a seperate installable application that is always FORMS Authentication that is not part of the main application.  Which sucks, as I now have to manage two applications. 2) In the main Web.Config I can set that folder to have no authentication and it will be avail to anyone, and then enforce my own authentication

preven multiple logins on same account

Hi, 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)   is this possible?  

Problem: Sessions got mixed up when open multiple tab for a sigle application

We got a problem that Sessions got mixed up when open multiple tab in a single application. We could change the code that do not use session variable in a that level, but a tons of page need to be modified. We need to find a quick fix for this problem. Is any thing we can do in code level to prevent user open multiple tab in a single application? O any thing we can do to keep its own session for a single tab?
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