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


Post New Web Links

Adding users with SPweb.EnsureUser("Username"); where Username does not come from the Network/LAN/Ac

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :SharePoint
 
Like the title states, I can add users who are listed in active director.  However,  for some testing issues i have going on with permissions and security, I would like to add a list of 'Users' from a database table i created;  programmically of course. How do i get my sharepoint application to understand this?   Regards, max


View Complete Post


More Related Resource Links

When Adding users some show as domain\username others as full name

  

When adding users to SharePoint site some show as Domain\Username while others show as "First Name Last Name". once of the users that show as Domain\Username is noticing some strange thing with his access.

I tried to remove the user that shows as domain\username and add again but still appeared as domain\username.  Also, when I click on the link for domain\username I get message "the webpage cannot be found", while for the users that show as First Name Last name I am able to view their User Information page.

Out of some 40 users I only have 4 that show as domain\username.

Anyone know what is the cause or a fix?

UPDATE: I went to SharedServices1>User Profiles and Properties>View User Profiles and there are 10 profiles listed inlcuding my owne. :)  For some reason when I go to our http://sitename and go to site settings>people and groups and click on one of the 10 user names I get page cannot be displayed.  Maybe now I have two issues instead of one.

Thanks,
B


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.

 


how to make login control allow users to login by either username or email address

  

how to make login control allow users to login by either username or email address 


Users display as "domain\username" rather than "firstname lastname"

  

Hi All,

     In my new 2010 setup, I see domain\username instead of their firstname lastname in the top-right-hand corner. How and where can I set up to show firstname lastname. I apprciate your response.

Thanks

moss


Finding username

  

Im running a query where it selects a property from the user with the matching username but i dont know how to find out the username of the currently loggedin user.

Please Help!


Password recovery by entering email not username

  

Hi,

I am using the ASP.Net password recovery control.  By default the user needs to enter their username before an email gets sent out to them.

If it possible instead of entering the username, email is used instead?  Alot of my users forgets their username but not email.

thanks


Get current username

  

Hi, I have the following code which I want to get the current username of the user logged in and use it as the @username parameter:

aspx file:

<asp:SqlDataSource ID="SqlDataRegionalUserAreas" runat="server" ConnectionString="<%$ ConnectionStrings:DevCPSdocshare %>"
        SelectCommand="SELECT d.doc_area_name
                        FROM document_area d,document_area_user_access a
                        WHERE a.doc_area = d.doc_area_id
                        AND and a.username=@username">
        <SelectParameters>
        <asp:Parameter Name="username" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>

 

aspx.cs file:

string username = Request.QueryString["username"];
        Membership.GetUser();
        SqlDataRegionalUserAreas.SelectParameters[<

Accessing Username, password, roles in xml file

  

Currently I am storing my username and password (passwordFormat="SHA1") credientails in my web.config.  I would like to figure out how to access them in an xml file that I have stored in my App_Data directory rather than the web.config file because I do not want my application restarting everytime I manually add a user (small list of 5 authorized users for the CMS section).

Here is what my web.config section looks like:

 

<authentication mode="Forms">
      <forms name=".Administration"
            loginUrl="~/SiteAdmin/Default.aspx"
            defaultUrl="~/SiteAdmin/Administration/Default.aspx"
            protection="All"
            timeout="30"
            path="/"
            requireSSL="false"
            slidingExpiration="true"
       &n

How to Pass UserName & Password to codebehind page using jquery

  
here is login form I would like to use.
Right now it is not communicating with my codebehind page.
How do I modify the jquery  login code to post the username and password to the codebehind?
 
Thanks
 
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>sourcedealsheet</title>

<link rel="stylesheet" type="text/css" href="styles/chop1.css" />
<script type="text/javascript" src="js/chopjs/jquery-1.3.2.min.js"></script>


<script type="text/javascript" src="js/chopjs/three.js"></script>
<!--[if IE 6]>
<script type="text/javascript" src="js/ie_png_fix.js"></script>

System.Data.SqlClient.SqlException: Login failed for user . Reason: The account is disable

  

Hi All,

Thank you for advance.

I created a widows service for mail schedule with c#.net and sql server 2005 and it is working fine for past one year.

now sometimes i am getting the "System.Data.SqlClient.SqlException: Login failed for user '<UserName>'. Reason: The account is disabled." error.

then i restarted the windows service manually and working.

what is the problem in my sql server connection and how to fix that issue?


How to setup db diagram to automatically insert username into table?

  
 I have a table setup in the database for users who are basically going to create a classified listing.  How can I setup a diagram that would easily create a table relationship with the Users table, so that it automatically inserts the users username when they submit a new ad?  If so, how?  I've tried adding a UserName row to my table and creating a relationship with the Users table "UserName" row, but it wasn't accepting the relationship when I tried to save the diagram...apparently because the UserName row in the Users table isn't a primary key?Also, one this is setup, what's the best way to provide the user a way to see a list of their ads and have the ability to edit them?

how do i create a windows form application login for to validate username and password from sql serv

  
 I would like to know how I can create a login form for my windows form application. The login form must be linked to a SQL server 2005 express edition database (in which the username and passwords are stored). The login form must validate the user using the database and allow them to access the program. 

Script error in adding users in sharepooint Site

  
I seem to have a problem when trying to enter new users on a newly built site (SharepointSite). I cannot select the new user option the grant permissions dialog doesn't appear. I'm running MS office 2003 sp3 and ie 7 regards Alan Bateman.

Display Full Name in SharePoint instead of Domain\Username

  
My SharePoint 2010 server started displaying the users with the Domain\Username standard instead of using Full Name (as it did up to yesterday). This in all pages of the sites (persmission settings, document libraries, tasks, etc.) Does anybody knows how to force SharePoint to display users with the "full name" standard? Thank you.Plo

Unable to get current username via data connection

  
I'm trying to use a browser enabled form.  I've followed the directions on this site to get the current profile username. http://baigadil.blogspot.com/2008/07/get-current-user-for-infopath-and-set.html When i open the form, i get the following error message: An error occurred accessing a data source. An entry has been added to the Windows event log of the server. Log ID:6932    

Unable to get current username via data connection

  
I'm trying to use a browser enabled form.  I've followed the directions on this site to get the current profile username. http://baigadil.blogspot.com/2008/07/get-current-user-for-infopath-and-set.html When i open the form, i get the following error message: An error occurred accessing a data source. An entry has been added to the Windows event log of the server. Log ID:6932    

Getting windows username using windows authentication

  
Hi,I am developing one intranet website. Being an intranet application, one of the requirement is to have a single sign on feature. It means that the windows PC username (i.e the "ctrl + alt + delete" username) is going to be the username for the system.How do i fetch that username?I tried the following two ways which are working in debug mode but not on live site.System.Security.Principal.IPrincipal user = System.Web.HttpContext.Current.User;        Response.Write(user.Identity.Name);&Response.Write(Request.ServerVariables["AUTH_USER"].ToString());Both the above method works when i run the page from visual studio.However when i run the page from IIS or any other server, it gives me a blank valuePlease help me as i cannot begin this project without solving this issue
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