.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

Webform authentication and access

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

I'm not getting much help from the security group so I'm goign to post it here.

Basically, I like to use Integrated Windows authentication so that I can authenticate all users who are at my company to access my web application in the browser.  Each user resides on different domains and some are on the same.

So in order to authenticate them, the first thing I would do is to add them to my web root's security tab?  I assume this is the virtual directory folder of which the web application (default.aspx, etc.) runs on the Windows 2003 web server? So I give each user a read security permission to access the folder? (which would mean that they can then access the web application?)

Is my understanding of this correct?  Therefore, If i don't add users to the security tab of the virtual folder, then other users will be rejected by the browser?

Next, assuming I want them to log on as a Network Service user, and not impersonate any other user or impersonate as themselves such as LA\Bob (domain\user)  and instead just be NT Authority\Network Service, I would set impersonation to false and I would also set anonymous access in IIS to false.

I want to set up the fastest/easiest way to add users/remove users to access my application and be able to authenticate whether or not they can get on.  Is this the right way

View Complete Post

More Related Resource Links

Using windows authentication to access SQL when using ASP.NET 4.0 via COM+


I am using SQL Server 2008 under windows authentication, front end is ASP.NET which uses COM+ to access database.

COM+ components are configured to run as domain user.

When looking through the logs (SQL Profiler), I can see the login name as the configured identity instead of windows indentity.

I have got Website running under "Intergrated Windows Authentication" and database is running locally on webserver.

Web configure contains entry for <identity impersonate="true"/>.

My connection string is

connectionString="data source=db01\test01;initial catalog=test; integrated security=SSPI;persist security info=False; Trusted_Connection=Yes"

Any ideas?




Authentication for External Users to Access MOSS 2007 Resources

Our MOSS 2007 supports users from two domains that authenticate using windows.  Our clients WindowsXP in domain#1 and WindowsVista in domain#2 (which has presented problems authenticating to MOSS 2007.  I would like to give access to external users outside of those two domains.  However, our management does not want to establish trusts between domains.  What would be the best practice to accomplish this?  Additionally, will MOSS 2010 or Forefront resolve these issues?

Authentication Providers button greyed out. Trying to turn on anonymous access

Please can you assist. I am trying to enable anonymous access. Tutorials point me to: 'Central Admin > Site Actions > Site Settings > Application Management > Manage web applications > Sharepoint - 80' I should then click on 'Authentication Providers'. This button is greyed out. I am running in dev on windows 7 64bit. Thanks.

Changed to claims based authentication, now I can't access my site. Please help! Time is of the ess

I am in a pretty big bind. I have a sharepoint 2010 site, that was using classic windows authentication. It worked fine from the inside, and I was able to extend it to the outside and it was using https with an SSL certificate. However, my performancepoint reports and my external lists weren't working when the site was accessed from the outside. Apparently this is a known issue with using classic authentication on the outside, so I tried to switch over to claims based authentication. I followed this guide: http://blogs.technet.com/b/wbaer/ar...point-2010.aspx I obviously changed the contoso stuff to my domain name, and changed all of the config files. The problem is, now I can't access the site at all from the inside or the outside. Here is the error I get in my logs: code: An exception occurred when trying to issue security token: Could not connect to [url]http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas.[/url] TCP error code 10061: No connection could be made because the target machine actively refused it . My Sharepoint Central Administration site gives me this warning: code: The Security Token Service is not issuing tokens. The service could be malfunctioning or in a bad state. Remedy Administrator should try to restart the Security Token Service on the boxes where it is not issuing tokens. If problem persists, f

How can I access a webform control from another external class/namespace?


Currently, I have many controls and objects such as Chart1 of mschart as part of the public partial class _Default : System.Web.UI.Page.

At the bottom, I've created a second class that is not part of the _Default webform class.  How can I access the webform controls from this second class?

For example, I want to do

Chart1.Series["Series1"].Points.AddXY((pointIndex + 1) * 40, datapoints[pointIndex]);

I want to pass pointIndex integer and the datapoints array.

I know that Chart1 was created protected global access modifier in the designer.cs but when I changed it to public, it still had a problem.


Should you let external classes access webform controls?


I was wondering if you should write code so that external classes and functions of that external class can access the webform controls in the main class???

Or should you only use the external class to process some data, return that data back to the main class (that instantiated that external class object) and then have an internal function in the main class to deliver the data to the control? (back to the screen)

Claims Authentication : Access Denied


I have a custom SecurityTokenService implemented and the SPTrustedLoginProvider added to my farm.  I've also implemented a custom SPClaimProvider that allows me to use the People Picker to give users permissions on the site.  Everything seems to be working fine up to a point.  When I go to my site and choose the correct login method I am redirected to the STS, login there and then get redirected back to my SharePoint site.  The problem is that I get an access denied error with message 'You are currently signed in as:  <Unique User ID FROM STS>'.  I get this even after adding the associated user as a member of the site.  If I add 'All Users (Custom STS)' as a member of the site I can login just fine.


So, what could be the disconnect between giving a user permissions and then logging in as that user?

Claims Based Authentication - Access Denied for NTLM - Network Related



We have setup a test SharePoint environment on a single box. If we create a new classic authentication web application using NTLM the site works fine, and recognizes AD users correctly. Users can then login successfully. If we create a new claims based authentication web application using NTLM all users receive an Access Denied error when trying to view the site. The application will recognize AD users when applying permissions in Central Admin's User Policy section, but none of those users are able to access the site.

If I turn on Fiddler Capture, the sites will work fine. Once I turn it off the sites no longer work and we are again presented with an Access Denied exception (or sometimes 403 Forbidden in Firefox and Chrome). I know that Fiddler create a local proxy so I'm curious what that proxy is doing that allows claims based to work correctly.

Has anyone seen this before? Does this sound Firewall/Antivirus related? Client or server?

Thank you,



Some users are unable to access my intranet site with windows authentication


Hi All

I have an intranet site that i set up to windows authentication. It works fine most of the time but some departments wont be able to access the site and will be asked to enter user name and password.
I checked their Active Directory account and the only difference i could see was that the  organizational unit parameter was different than the rest of the users. But im puzzled on what i can do to fix it and have them accessing the application.

Any ideas?

Urgent: Webform insert into Access (multiple tables)


hello all, 
i have a webform that I am sending to and Access database and i am using dreamweaver cs4. The form consists of fields that would be sent to multiple database tables. I have tried creating server behaviors to insert the record, and have gotten it to add the records to the various tables, HOWEVER the foreign keys of the tables were not linked (i am using autonumbers for the Primary keys). 

i was thinking to split the web form into 3 forms...a form for each table, as i would have to retrieve the autonumber from the database after the first form is sent.  Could someone help me achieve this?

The code that was created by dreamweaver for the first webpage is as follows

<!--#include file="Connections/RequestBooking.asp" -->

Claim Authentication - access denied for central administration sites



I have configured Sharepoint 2010 für claim based form authentication following all steps in technet articel. But after modification of web.config of central administation site, access to adminitration is denied for my windows administator account.

I am not sure that Sharepoint connects to LDAP server correctly. I have not understood the mechanisme Sharepoint connects to LDAP server. No user account/password for authentification Sharepoint server against LDAP server have to be configured!? Is that true or do I have to make additional settings in LDAP server?

Thank you for any hint.


SQL Server 2008 -- MS Access 2003 Linked server -- Authentication failed


I am trying to link SQL Server 2008 - 64 to an MS Access database on a network share. I can get the link to work from the SQL management studio but when I try to do a ODBC query (from another machine)  of a view table pointing to the access db through a linked server using the "Microsoft.ACE.OLEDB.12.0"driver.  The error from the odbc trace is:

"        DIAG [01000] [Microsoft][SQL Server Native Client 10.0][SQL Server]OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "STPRD" returned message "Not a valid account name or password.". (7412) "

Yes the login to the password are good.  I have tried various setting using sp_addlinkedsrvlogin function but nothing will handle the extra hop.

MVC architecture in ASP.Net using C# and Microsoft Data Access Application block

The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes [Burbeck92]:

Model. The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller).

View. The view manages the display of information.

Controller. The controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate.

ASP.NET 4.0: WebForm Routing (quick n dirty version)

One of the things we're adding in ASP.NET 4.0 is built-in support for using Routing together with WebForms. Now, I'm totally aware that this is possible to do already and that a number of people have posted ways of doing this with the Web Routing feature which shipped with ASP.NET 3.5 SP1. We're just adding some features to make it easier to do

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.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