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


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

Help: Authenticate Plus More

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

I have a secure site where users login with their credentials. If proper credentials are provided, I call the RefirectFromLoginPage method. 

However, now I want to redirect authenticated users to another page where they must accept the company user policy before they can proceed. Also, once they accept it, i don't want this page shown again. Any ideas on how I can implementing this? 

Thanks in advance.




View Complete Post


More Related Resource Links

How to authenticate local user usin ldap or non domain authentication

  

hiiii

I created one application, and I need to authenticate local user. This user is the user who is login to his/her Personal Computer.. Main thing his that he/she does not in any DOMAIN... I want NON-DOMAIN authentication.. any how.... please help...


Security: Authenticate Users Across Organizations Using ADFS

  

Jack Couch looks at how to set up ADFS and when to use it; he then shows how to connect to an outside organization to offer single sign-on.

Jack Couch

MSDN Magazine December 2007


How to Authenticate two different folders

  
How to Authenticate two different folders and send anomius users to two diffrent login pages in .net 3.5

How to authenticate automatically to the external portal from Page viewer?

  
Page viewer web part gives iView to the website eg. http://www.test.com. This works fine! Our customer would like login to the external portal with attaching user name in the ur like http://www.test.com/abc?name=John. Or user single sign on to login to the external portal. Authentication to the external system should be automatical to the end-user so that they don't have to login manually to the www.test.com portal. How to do it?Kenny_I

Unable to authenticate to web services for a SharePoint 2010 logged in user

  
Hi, I have a requirement to connect to a webservice from SharePoint 2010 without passing Network credentials explicitly. If i am already logged into the SharePoint 2010 portal , I should be able to click on Search (which is a web service(wsdl file) which retrieves search results from Oracle UCM) and retrieve the result. I tried localhost.ServiceX myProxy = new localhost.ServiceX(); myProxy.Credentials = System.Net.CredentialCache.DefaultCredentials; also myProxy.UseDefaultCredentials = True Still i am unable to authenticate. Default credentials returns null value.   Kindly help.

Unable to authenticate to web services for a SharePoint 2010 logged in user

  
Hi, I have a requirement to connect to a webservice from SharePoint 2010 without passing Network credentials explicitly. If i am already logged into the SharePoint 2010 portal , I should be able to click on Search (which is a web service(wsdl file) which retrieves search results from Oracle UCM) and retrieve the result. I tried localhost.ServiceX myProxy = new localhost.ServiceX(); myProxy.Credentials = System.Net.CredentialCache.DefaultCredentials; also myProxy.UseDefaultCredentials = True Still i am unable to authenticate. Default credentials returns null value.   Kindly help.

Custom Authenticate Attribute with Constructor (Dependency) Injection

  
  I have a [BeastAuthenticate] attribute on my controller.  The following code works fine but I would like to use Contructor (Dependency) Injection with Unity.  The problem is that the attribute will run the contructor with no parameters.  Interfaces ITMSLogger and IADGroups are setup to use Dependency Injection with TMSLogger and ADGroups respectively.   The following code works fine but doesn't use dependency injection for class ADGroups. public class BeastAuthenticateAttribute : AuthorizeAttribute { private ITMSLogger logger = new TMSLogger(); public BeastAuthenticateAttribute() { ADGroups adGroups = new ADGroups(logger); Roles = adGroups.GetRolesWithGroup("BEAST"); } } I tried the following but I'm getting an error ("Object reference is required...") with "this (adGroups). public class BeastAuthenticateAttribute : AuthorizeAttribute { private ITMSLogger logger = new TMSLogger(); private IADGroups adGroups;// = new ADGroups(new TMSLogger()); public BeastAuthenticateAttribute() : this (adGroups) { // adGroups = new ADGroups(logger); // this(adGroups); } public BeastAuthenticateAttribute(IADGroups adGroups) { //ADGroups adGroups = new ADGroups(l

HOWTO: Authenticate Active Directory account over VPN from C# client?

  

Hello,

I have some code that authenticates a user in Active Directory from a C# client but it does not work through a VPN connection, though it works just fine when I'm connected to the network.  How can I get this to work over a VPN?

These are the three functions I've used that ALL work, just not when I'm connected through a VPN.

FUNCTION 1:

        public static bool ValidateUser1(string strDomain, string strUsername, string strPassword)
        {
            try
            {
                DirectoryEntry entry = new DirectoryEntry("LDAP://" + strDomain, strUsername, strPassword);
                object nativeObject = entry.NativeObject;
                return true;
            }
            catch (DirectoryServicesCOMException) { }
      

Authenticate users using email id instead of username in FBA

  

Hi,

We have a web appliaction configured with FBA (sql and LDAP) and users are authenticated using their username. Now we have a requirement to authenticate users using email id instead of username. we have one solution also that requires to change entry in web.config file for membership provider but it doesn't suffice as it works only for newly added users and not existing ones and site is already in production environment with large user base. Any suggestions to meet this requirement?

Regards.

 


Click here to authenticate

  

I have a sharepoint 2010 site using claims-based authentication. On my site, I have external data in the form of performancepoint charts, and an external list in my bdc store. For some reason, when I try to access my external list, I get a link telling me to "click here to authenticate." When I click there, I get a message about not using a certificate, and I click continue to site.  After that I can authenticate using my domain admin account, but none of the accounts tied to sharepoint.

The external list is supposed to be authenticated using the impersonated identity from my secure store service, and it should work for anyone I have added to said secure store service.  I know this works, because it worked in the past, and all of my performancepoint web parts function correctly.  I have made sure everyone has permissions in both the secure store, and the bdc service, and everything looks as it should.

Once I authenticate with the admin account, the list works indefinitely. I obviously can't give the keys to the domain to my users, so this isn't really a good solution. Can anyone point my in the correct direction?


Can't authenticate into Central Admin via IE but ok in other browsers on client PCs

  

This is an odd one - I have a SharePoint 2010 installed on a server and standard Windows authentication is used (via Active Directory). Locally on the server I can access Central Administration web site in IE with no problem.

On other PCs, whenever I try to access central admin in Internet Explorer (7/8) it fails to authenticate. IE quite happily automatically authenticates into the normal sharepoint sites, but not central admin. Yet if I use Firefox, then that quite happily authenticates into Central Admin. I've tried this on quite a few PCs with the same result - IE can't authenticate, Firefox can.

Any idea why this would be? The connection settings in IE appear the same as other browsers (i.e. no proxy).

Thanks.


Authenticate users by Request.UrlReferrer

  

Hi All,

I am working on an app where users are only allowed access if they click through from certain URLs. I.e. I need to authenticate by using the referral url and I am using Request.UrlReferrer to achieve this.

I am guessing that the Request.UrlReferrer can be tampered with by malicious users to gain access...

Is there any way I can achieve the above scenario securely?

Look forward to your replies.

Andrew


Authenticate user against particular OU

  

Hi,

How to authenticate an user against a particular OU in Active Directory. If the AD holds 50 OUs I don't want to look into all 50 OUs , instead it should look into a particular OU( for eg: OU=dotnet users) to authenticate the user.

How to achieve this? 

Thank you


How to Authenticate User on External Site Using IFrame (Dynamically created in SharePoint WebPart)

  

Hi

I've a situation,

- External Site : This site has its own user store (user/password) to log-in to.

- SharePoint WebPart : This webpart will get some readonly data from External Site but for performing any CURD operation on the External Site the user has to Log-in to External Site using IFrame Mechanism (This login form has to be of External site, and UserName/Passwordd should be posted to login-form of External site) sharepoint shouldn't be collecting any user/password credentials. (how can we do this?)

How user gets authenticated in External Site:

1. user Provides username/password.

2. Once authenticated to User Store it set an Authentication Cookie in use browser, thus uses this cookie with every request to perform any CURD operation.

I've to have the similar functionality in SharePoint Webpart. using IFRAME.

Hope i covered all the points in my explaination, if you can provide any blog/code which is dealing with similar kind of approach.

 

 


Thanks
Akhilesh Nirapure

Can't authenticate SharePoint OOTB web services from Visual Studio 2008.

  
Hi, If I try to add a SP OOTB service reference (for instance the list service) into a Console application from VS 2008, I can't read data. It raises following exception

"The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'.


My SharePoint server is allowed for windows integretated auth, and anonymous access is disabled (this is the default settings  I believe). Spent few hours googling and found a similar problem into the following blog post.


http://www.trentswanson.com/post/2008/01/Calling-SharePoint-web-services-using-Visual-Studio-20082c-WCF2c-and-Windows-Auth.aspx

In this blog the author is suggesting to use the following block into the config

<security mode="TransportCredentialOnly

How to automatically Authenticate User on External Site once Authenticated on SharePoint Site

  

We analyzing the implementations approach, for a scenario.

  1. External Site: To log-in to external site which has its own user store and is hosted on different domain. So user has to provide his user id and password for logging in to external site like e.g.  DOMAIN1\UserName & Password

  1. SharePoint Site: This site is hosted on different domain other than DOMAIN1 and has got windows/forms authentication. So the user to login to SharePoint site has to provide SharePoint site Credentials DOMAIN2\UserName & Password.
  2. SharePoint Web Part which shows external site in IFrame and allows user to perform CURD operation once the user is authenticated in external site.


What we want is once user login to SharePoint site using (Forms/Windows) authentication, he should be automatically authenticated in External Site (using some mechanism) the logged in user credentials are picked up from some store based on his sharepoint username and system authenticates the user on external site.

Any pointers to code/blogs/articles would be really helpful.


Thanks
Akhilesh Nirapure

Trying To Automatically Authenticate basic HTTP using VB .NET

  

Hi

I am trying to create a program which interfaces with a HTTP page which needs basic authentication. I have created the basic web browser controls etc but have not been able to get the authentication working.

I have the idea that I could "handshake" with the site first before entering the username and password as an ICredential. Does this sound possible? The code I have is below:

Dim request As System.Net.HttpWebRequest
request = System.Net.HttpWebRequest.Create(WebAddress)
request.Credentials = (New System.Net.NetworkCredential("username", "password"))
     
request.GetResponse()


Me.RPanel.Navigate(WebAddress)

The above doesn't seem to work, giving me a 401 error and URL malformed exception. ( My url is an IP address eg http://10.1.1.1/ )

 

Does anyone have any idea how to do this? Help! :)


Categories: 
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