.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

user login & secured access pages via web part?

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :SharePoint
The client wants to have certain sharepoint-driven pages available only to their end customers who login to the site via secured login (to the site content, not the sharepoint CMS).  Can this be done via a web part somehow?  We're not a sharepoint house, and have been asked to take over management of this sharepoint driven site! Normally we'd write an ASP chunk to validate against a database but not sure how to do this (or by some other method) in the Sharepoint CMS. Thanks...

View Complete Post

More Related Resource Links

Anonymous access - User prompted for login after click in web part area

I have a MOSS2010 site, internet-facing using anonymous access. I've found workarounds to many of the anonymous access issues I've come across, but I don't know how to fix this one. Any ideas or assistance would be appreciated. A user visits one of my pages with a OOB webpart. If they click within the area for that web part, essentially selecting the web part, it prompts for a login. I don't want my users getting prompted for a login, but I don't know why they're being prompted in the first place. According to the logs, it looks like it is trying to access _layouts/wpribbon.aspx. They aren't clicking on the items (titles aren't clickable), it's the area within the web part box. Can I make that area non-clickable?? Go to: www.carlile.biz/careers/pages/current-openings.aspx Click on the area around the Locations or the Current Openings listed. Either will prompt for a login. Even with a valid login, the view does not change and no further options are presented.

How do I allow some .net pages to be used from a login page before the user is authenticated?

Ok, I have a .net homepage (viewable and useable to everyone) which is "login.aspx".  There is a header with a menu and three columns under that.  The header has a "home" button which will display a page (standings.aspx) with data from a gridview control which gets its data from an access db in a directory called Access_DB from the root level of the site. The next menu in the header is "Schedules", which uses the same db and a set of .aspx files (i.g. MondaySched.aspx, ThursdaySched.aspx, etc) to populate NFL schedules in various formats, and the last column "About" is just some html files.  All of this data is placed in an IFRAME in the middle column of the page.  The left column is where the login textboxes/submit button reside, the last column is just some html.I am using form level authentication as follows:<authentication mode="forms"><forms name="BTGAppSec" loginUrl="login.aspx" protection="All" timeout="30" path="/" /></authentication><authorization><deny users="?" /></authorization>The problem is when you go to the site and it tries to load the "standings.aspx" into the IFRAME on page load, it sees that as an unauthorized user and sends the IFRAME back to login.aspx.  So what you get is a &qu

Login failed for user: Reason:Token-based server access validation failed with an infrastructure err



I have installed a named instance of SQL Server 2008 R2 Enterprise 64 bit on Windows Server 2008 R2 Enterprise 64 bit. The os is running as a VM ware virtual machine.

I have created an AD security group for database engine sys admins on that machine. I added my user to that group.So for example;

domainname\machinename_SQL_DBE_SysADmins is a user with SysAdmin server role permissions. User domainname\MichaelEFF is a member of this group.

When I log onto the machine as this user and run the management studio with run as administrator I cannot log into the database engine. The log shows the error:

Login failed for user: Reason:Token-based server access validation failed with an infrastructure error

I've read many posts where the MVP says that the UAC is not passing the group membership. Is this the case? If so then how will role based access ever be possible with windows authentication? How can this be resolved?




Login failed for user:Token-based server access validation failed with an infrastructure error


I would appreciate help with the following issue:


I have created a local group in our SQL 2008 server and added two Windows user accounts "DOMAIN\UserName"  I  then added the local group to the database and granted read only access.


The users are trying to link tables using MS Access using and ODBC connection and getting the following error.

Users are not system administrators.


Date                      6/30/2010 1:01:54 PM

Log                         SQ

How to check (login Credentials) user name and password to access sharepoint server 2007 programmati

my issue is...

while user entered his/her Username:xyz
i need to check programmatically either username & password exists ot not in sharepoint server 2007 from windows form application.

and i know how to check username,but i don't know how to check password.

you can check username in below ways..

 SPSite SharepointSiteObj = new SPSite(SiteUrl);
 SPWeb SharepointWebObj = SharepointSiteObj.OpenWeb("/");

 SPUserToken token=SharepointWebObj.AllUsers[userName]

from this i can get user name..




Anonymous Access - Web Part Pages with Web Part Connections

Basically, I have a SharePoint Foundation site I'm building out with lots of lists and libraries being related with lookup columns and metadata.  After getting everything setup and all my items associated with the proper metadata, I created a web part page.  On this page, I put each of my associated lists/libraries with special views to optimize screen usage.  Lastly, I connected them all with web part connections - they all are filtered by the main web part.  The filter works wonderfully, and I can browse to it with an authenticated user, but anonymous users get a Windows prompt every time.

- On the web app, I have no policy set for Anonymous Users, and Anonymous Access ie enabled
- On the Site Collection, Anonymous Users allowed to see the "Entire Web Site"
- On the Site Pages library, Anonymous Users have the "View Items" permission
- On every page, list, and library in the site, Anonymous users have access and can see data except my one page with web part connections
- In the Site Pages library, Anonymous Users can see the page shown as a file
- If I remove all web part connections, then the Anonymous User no longer gets prompted and can see the page

Here is the version of the page without web part connections:


assign different asp pages to users with different user types (database used is ms access)



hello.. i'm a bit stuck with my project and i hope anyone out there could lend a hand.. im completely new to asp.net so please bear with me.. =)

i have a table in ms access where i have username, password and usertype.. i wanted to use that table so that when i log in, the user with the "admin" usertype will go to the admin page while the user with the "user" usertype will go to the members page.. i can log in so the only issue is how to redirect them to their respective pages.. any help would be appreciated.. =)

SharePoint Application and Site Pages - Part 1 of 2

In this first part of the two part series, Steven covers the differences between Site and Application pages in SharePoint 2007, why each may be used in various circumstances, and prepares for the construction of a menu located application page. After a brief introduction he examines the concept of Site Pages and Application Pages separately in detail with supported screenshots.

SharePoint Application and Site Pages - Part 2 of 2

As the second article in a two part series, Steven examines the attributes and details of a SharePoint 2007 application page, including the construction and feature deployment of the same page based project. Since this is a WSS level objective, as opposed to MOSS, you will not need MOSS to work with the code included in this project. Windows Server 2003, WSS, and Visual Studio 2005 are all that is needed, with no additional add-ons. He provides a detailed analysis of each step involved in the creation and deployment of the project.

Choosing Between a User Control or Web Part for SharePoint

SharePoint will only display Web Parts on a page. However, there are publicly available shims that allow you to write user controls and have them be displayed as a Web Part. From SharePoint's point of view, the shim is a Web Part. From the point of view of the user control, the shim is simply a control in .NET that is including the user control

create user wizard login error message dont show in a message box?




i am using create user wizard and capturing other information within content template when a new user

registers. Some of the textboxes are binded to required field validators.


there is a validation control on the page and ShowMessage box is True.

If they dont complete some of the text boxes then the message box pops Up with the error message.

It does not however include information errors like "User already exists" or Email address already exists

from the create user wizard membership  UserName and Password Textboxes


is it possilbe to hook all of these up so I get one message box with all errors including membership ones?




Foundations: Adding Code Access Security to WCF, Part 2


This month's column continues the discussion around code access security in WCF and partially trusted services.

Juval Lowy

MSDN Magazine July 2008

Foundations: Code Access Security in WCF, Part 1


Here we discuss code-access security in Windows Communication Foundation (WCF) and present a solution for enabling partially trusted clients for WCF services.

Juval Lowy

MSDN Magazine April 2008

Cutting Edge: Subclassing and Overriding ASP.NET Pages-Part I


There are a number of techniques that allow you to modify a running ASP.NET page without touching its source code. Dino discusses some this month.

Dino Esposito

MSDN Magazine April 2007

Data Points: The Enterprise Library Data Access Application Block, Part 3


E nterprise applications can have a wide variety of data update requirements. Sometimes you need to save multiple rows of changes at once within a single transaction. Other times, the user must be allowed to enter multiple rows of data, send them to the database in a batch; and if a row or two fails, only the rows that succeeded should be committed and remain committed.

John Papa

MSDN Magazine October 2005

Data Points: The Enterprise Library Data Access Application Block, Part 2


Last month I explored the foundation of the Enterprise Library Data Access Application Block (DAAB) including how it all fits into an architecture (see Data Points: The Enterprise Library Data Access Application Block, Part 1).

John Papa

MSDN Magazine August 2005

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