.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

Map Asp.net website Roles and Users to Sharepoint website roles and users

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :SharePoint
Hi I have created an asp.net website with SQL Server based form authentication and authorization. Now, we are moving this pure asp.net website to Sharepoint 2010 website. I have developed 5 webparts for my asp.net website to migrate to Sharepoint. All these webparts are avilable for access in the same page. Now I need to implement authentication and authorization for access to these webparts in Sharepoint. I am newbie to sharepoint. Can someone provide me how can I provide authorization and authentication in Sharepoint, which should use the current SQL Server based form authentication and authorization(roles and users of my existing asp.net website) and how can I map roles and users of my existing asp.net website to Sharepoint. Please reply ASAP. Thanks & Regards Mahendra Babu

View Complete Post

More Related Resource Links

accessing sharepoint sitecollection groups, users, roles and displaying them in sqldatabase



I am working on sharepoint groups, users, roles and permissions. my task is to display all groups,users,roles and permissions from a sharepoint sitecollection in sqldatabase table.the table for groups contains following columns ID,Name,Description,OwnerID,Ownerisuser. the table for users contains following columns ID,Name,Sid,LoginName,Email,Isstieadmin,isdomaingroup. the table for roles and permissions is ID,Name,Description,Type,BasePermission. can someone please help with the code. i have started in the following way using a windows application

private void button1_Click(object sender, EventArgs e)
            using (SPSite osite = new SPSite("http://servername//"))
                using (SPWeb oweb = osite.OpenWeb())

IP addresses of the users who are visiting my website



I want to know IP addresses of the users who are visiting my website.

Is it possible to know their computer names?




Checking SQL Server User Roles and Creating SQL Server Users using VB.NET

Hello gurus!Firstly I want to apologies if this question is out of place here.. if someone can direct me to the correct forumn great and Thanks!I have a VB.NET application which uses its own Backend Database (MSSQL Server). I need to distribute this application to sites where there will be an existing SQL Server.So I will need to Create the Database on this server. The Application includes methods for building the database on startup if not already connected to one.However the users windows logon may not have the correct permission to connect and create a Database on the Server. I have a DB Setup form in my application which asks for the Servname, Username, Password and Database name. I have catered for Windows Authentication and SQL Server Authentication within the form - the user makes the choice.Assuming they enter a Username and Password for SQL Server Athentication then I will be trying to connect using this user and create the database on the given server. The following is my outline logic:-                                                                  Create db Process                                                                             |                                                                             |                                                               Check Credentials                                                                   / 

Login goes to Sql server for users and to sqlExpress for roles

Hi all,I have a site witl forms authentication using te login control. I altered my sql server, I added a connectionstring and used the connectionstring in both, <rolemanager> and <Membership>. That part of the web.config is listed below.The pronlem is that the login control goed to SQLserver to check the users and their passwords, but it goed to the SQLExpress database for the roles..... who can help me because it's driving me crazy!!!!!!<connectionStrings>    <clear/>    <remove name="Conn"/>    <add name="Conn" connectionString="Server=SERVER;Database=DBNAME;User Id =USERNAME;Password=PASSWORD;Integrated Security=False"                       providerName="System.Data.SqlClient"/>    <remove name="LocalSqlServer"/>    <add name="LocalSqlServer" connectionString="Server=SERVER;Database=DBNAME;User Id =USERNAME;Password=PASSWORD;Integrated Security=False" providerName="System.Data.SqlClient"/>  </connectionStrings>  <system.web>    <membership>      <providers>     &nbs

Edit users roles in gridview

I am trying to implement a page for an admin to edit other users details including roles and profile. I have a custom profile provider that stores data in database. My implementation is a page that shows username and allows an admin to reset user password, unlock users and approve and disapprove the users. I wanted to add a column in the gridview to allow the admin to remove or add a user to a role with the constraint that a user should be added only to one role.Any idea please?

Grab a users/roles list?

Just wondering how to implement a user's list into my website ? im using ASP.NET C#. I want to be able to:add/delete usersadd/remove roles

Admin page to manage users, need help with adding roles to this layout


Currently i have a page that has the following  code / layout.. as it is now, i am only displaying the roles and they cant be edited. Since this would be the admin page to manage users, what i would like is to have the Roles display as a checkbox list that shows all our roles and have the roles that the user is assigned to checked. Can that be done, if so are there any examples or tutorials i can review?


            <asp:GridView ID="GridView1" runat="server"  AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="UserName" DataSourceID="ObjectDataSource1" AllowSorting="True" Width="80%">
                    <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ShowSelectButton="True" />
                    <asp:CheckBoxField DataField="IsOnline" HeaderText="IsOnline" ReadOnly="True" SortExpression="IsOnline" />
                    <asp:CheckBoxField DataField="IsLockedOut" HeaderText="IsLockedOut" ReadOnly="True" SortExpression="IsLockedOut" />
                    <asp:BoundField DataField="UserName" HeaderText="UserName" ReadOnly=&quo

logging out users when user opens website in two browsers or two tabs of same browser.



We have the implement the following scenario in our application:

  1. We use windows authentication. User opens our website in tab1 and does some action but with out clicking on save he opens a new tab tab2 and opens the same website again.
  2. Now, if the user session in tab1 is active i need to warn users that the he is already logged on to application in some other browser and go to some log out page. But if the user session in tab1 is timed out then he must be able to continue with the website in tab2 as usual, but if he tries to do anything in tab1 he should go to session expired page.

I tried implementing it in following way.

  1. I have a hidden field in each page which will be set to unique Id using GUID.NewID().
  2. when user requests for a page the following code is executed.
  3. if (Request.Headers["Cookie"] == null)
                    //this means user is requesting hte page for first time.
                    //Generate a new GUID store it in session and also in the hidden variable on page.
                    Session["DefaultPage"] = Guid.NewGuid().ToString();
                    ((TextBox)page.FindControl("hiddenGUID")).Text = Session["DefaultPage"].ToString();
                else if (Reque

implementing roles on live website


I have an live website and I need to enable roles and add it to a folder.  What's the best way to go about it?  Do I add code to web.config?  Do I add code to individual pages?  Do I use the membership provider service with V W D and recopy the website?  Please  help.

Setting the size of my website as a percentage of users monitor and asp.net2.0 and c#



Hi Guys

Can anyone show me how to set the size (Height and Width) of my website so that it will be displayed as a percentage of the user's  monitor? Please a working code would be useful. I am using c# and asp.net 2.0.





Save Workflow Runtime as Application State or Session State for a website with multiple users?


I used Windows Workflow Foundation 3.5 as a page flow navigation for a ASP.NET website's Previous and Next page navigation.

The site acts like a shopping cart and each user has his own session and user data.  The app only has one WF.  I am not sure if I should generate one Workflow Runtime for every user or for simply generate one workflow Runtime for the entire application in my case?   

In the global.asax:

void Application_Start(object sender, EventArgs e)

void Application_End(object sender, EventArgs e)
    void Session_Start(object sender, EventArgs e)
        // Code that runs when a new session is started
        System.Workflow.Runtime.WorkflowRuntime workflowRuntime = new System.Workflow.Runtime.WorkflowRuntime(WorkflowManager.WorkflowRuntimeKey);


List all users roles, permissions


is there a system stored proc that will allow me to list all the users for a database and their roles permissions?


If not does some one have a script or something I can use...I am relatively new at this and need it for an auditor ASAP!!



Enabling Users to Maintain SharePoint Content

When SharePoint is installed as a corporate intranet, there is a considerable amount of effort involved in maintaining the content to keep the site relevant. As we discussed in the first few parts of this series, SharePoint has many built-in features to reduce the burden on the site administrator.

Some areas of the site usually contain less-dynamic information. Internal memos and corporate policies are common examples of this information. One option for this information is to post these documents in a document library. Documents in a library are often stored in a few different formats: Word, Acrobat (PDF), or HTML. Each of these formats has its drawbacks.

Enabling Users to Maintain SharePoint Content

When SharePoint is installed as a corporate intranet, there is a considerable amount of effort involved in maintaining the content to keep the site relevant. As we discussed in the first few parts of this series, SharePoint has many built-in features to reduce the burden on the site administrator.

Item cannot be found.(rsItemNotFound) when executing a report from a sharepoint Website

I have managed to integrate Report server with Sharepoint .
I created a report with it's data connection with microsoft Visual Studio 2005 , tested it , than deployed it to the specified document libraries in sharepoint.
Everything works fine till now.But when i try to execute the report from the document library in sharepoint the Message :
  • The item 'Reports/Report1.rdl' cannot be found. (rsItemNotFound) '. Even though the report1.rdl is inside the website and is returned when i do the search. Regards.

  • Code to get how many users are logged in to the sharepoint site

    How to get the users of my sharepoint who are online.....

    Thanx in advance,


    creating different sub page design template in sharepoint website


    I know very little about sharepoint and have outsourced the design of a master page and sub page design for a new website using sharepoint. i received a site master file with all of the necessary images and the home page works just fine. However the file i received for the sub page design template was an ASPX file with the following instructions:


    Here I enclosed the inner page layout file. You upload this file by using following instructions. you can change & edit the blue menu section in the master page itself. If I change into modifiable section you need to add the menu in each and every page, otherwise it will show as empty block. Please let me know your comments.


    Steps for uploading inner page layout page.


    1.Select the Site Actions button and click on Site Settings->Modify All site settings

    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