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


Top 5 Contributors of the Month
david stephan
Asad Ali
Fauzul Azmi
Post New Web Links

How to deploy custom membership provider dll in STS web config in SPS 2010

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :SharePoint
 

i am having a custom membership provider dll which i want to deploy in the STS webconfig file in sps 2010. i donno how to deploy it. since sts webconfig doesnt have any <system.web>, <sharepoint> entries and where shoudl i add these? will that suffice to deploy my custom membership provioder assembly? also  i am NOT  using any oob membershi p providers. am using a CUSTOM PROVIDER.  can anyone help by what are the steps and where & wher to add those entries.  below one isused for  aspnetsqlmembership provider.                       

can i use the same pattern with changes in the name of the assembly withmy  custom provider will work for me/

<system.web>
  <membership>   <providers> <memberships>  </membership> ....

any sample code with the sts web.config format /src code will be helpful

 thanks

 




View Complete Post


More Related Resource Links

How to deploy custom membership provider dll in STS web config in SPS 2010

  

i am having a custom membership provider dll which i want to deploy in the STS webconfig file in sps 2010. i donno how to deploy it. since sts webconfig doesnt have any <system.web>, <sharepoint> entries and where shoudl i add these? will that suffice to deploy my custom membership provioder assembly? also  i am NOT  using any oob membershi p providers. am using a CUSTOM PROVIDER.  can anyone help by what are the steps and where & wher to add those entries.  below one isused for  aspnetsqlmembership provider.                       

can i use the same pattern with changes in the name of the assembly withmy  custom provider will work for me/

<system.web>
  <membership>   <providers> <memberships>  </membership> ....

any sample code with the sts web.config format /src code will be helpful

 thanks

 


Web.config for Custom Membership Provider

  
I am trying to set-up the connection strings to my Membership Provider. I am using the Sql server database and not the default aspnet_db. Iam giving the Fully Qualifying namespace+class in my "type"  and it still throws an error msg "connection string cannot be blank". Web.config: < < < < membership defaultProvider="CustomMembershipProvider">providers>clear />add connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="RavLoginApp" description="Stores and retrieves membership data from the local Microsoft SQL Server database" name="CustomMembershipProvider" type="MyNamespace.CustomMembershipProvider" />  </providers> </membership <connectionStrings > <remove name="LocalSqlServer" /> <add name="LocalSqlServer" connectionString="data source=127.0.0.1;database=MyLocaldb;uid=xxxxx;pwd=xxxxxx" providerName="System.Data.SqlClient" /> <

Custom membership provider not returning values from my web.config

  

I created a custom membership provider in my ASP.NET 4.0 web site, stored  in App_Code, and referenced in my web.config.

However, it doesn't appear to be pulling values out of web.config during initialization.

The code was taken from http://www.asp.net/general/videos/how-do-i-create-a-custom-membership-provider, and the only modifications were changing "connectionStringName" here to the name of my connection string:


    Dim ConnectionStringSettings As ConnectionStringSettings = _
      ConfigurationManager.ConnectionStrings(config("connectionStringName"))

The connection string always comes back as nothing in this line:


    If ConnectionStringSettings Is Nothing OrElse ConnectionStringSettings.ConnectionString.Trim() = String.Empty Then
      Throw New ProviderException("Connection string cannot be blank.")
    End If




No matter what I change the password format to in web.config, the default value here is always used:


    Dim temp_format As String = config("passwordFormat")
    If temp_format Is Nothing Then
      temp_format = "Has

Custom Login Page , with custom membership provider for sharepoint 2010

  

Dear All,

I am new to sharepoint, i am developing a custom application on sharepoint 2010. i need to create a custom login page in sharepoint 2010 with a custom membership provider which will authenticate against a 3rd party web service. 

Can anybody guide me with the steps i need to do for this. do i need to write a custom claims provider for this or is it enough if i write a custom authentication provider and use it for my login page which we do for asp.net.

i am confused about these. 

thanks in advanace 

UB


Sharepoint 2010 Custom Membership Provider

  

Hi,

I'm trying to create a site with fba using my own memebership and role provider.
The problem i have is when i am creating the sitecollection from the central administration, my web app has windows and fba authenticacton turned od, in the membership provider and role mananer i put my own providers. When i am creating the sitecollection for that web app in the administrator textbox is not finding the windows user... I don't understand why...
My web application authorization is windows with FBA turn on. If i turn off the fba authentication in the web app, the windows user is working as the administration....
I don't understand why is happening this..

 

UpDate: I checked the eventviewer and i have this error when i want to put the windows user:

An exception occurred in Forms Auth claim provider when calling SPClaimProvider.FillResolve(): The configuration section cannot contain a CDATA or text element. (E:\inetpub\wwwroot\wss\VirtualDirectories\48079\web.config line 457).

This line on the web.config is where i have my membership provider:

 <add name="LMSMemberShipProvider" type="Company.LMS.LiveMembershipProvider, Company.LMS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=464df6932833bbb2" applicationName="/"/>

 

Th

Can i reuse MOSS custom membership provider in SPS 2010

  

I have a MOSS 2007 site which uses the fba  with ustom membership provider. and now i want to reuse that membership provider in the new SPS 2010 claims based authentication which supports FBA.

Here, my question is  can i reuse the DLL which created the custom membership provider and deploy ti in the new sps 2010 environwemt?

will that suffice? i will  deploy the dll in new sps 2010 central admin web.config and sts toen service webconfig and my custom web appln's web.config. wil  tyhat enoughto up& runnning the new web appln with FBA enabled?

i am validating the users against a web service in teh MOSS envmnt.

Can anybody help me the right appraoch with links/resources.

 

 

 

 


PrasadWT PrasadWT

Custom Login Page , with custom membership provider for sharepoint 2010

  

Dear All,

I am new to sharepoint, i am developing a custom application on sharepoint 2010. i need to create a custom login page in sharepoint 2010 with a custom membership provider which will authenticate against a 3rd party web service. 

Can anybody guide me with the steps i need to do for this. do i need to write a custom claims provider for this or is it enough if i write a custom authentication provider and use it for my login page which we do for asp.net.

i am confused about these. 

thanks in advanace 

UB


problem using custom membership provider in sharepoint 2010, please help!

  

hi,

My company developed a custom membership provider using .net framework 4 which causes the problem. As you know, all web application in sharepoint 2010 is running on .NET framework 2, so when a web application is configured to use our .net 4 custom membership provider, .NET CLR version 2 is loaded to run the web application but our membership provider assembly binds to .NET CLR version 4. So it is not surprising to see the following exception:

Could not load file or assembly '[our membership provider assembly]' or one of its dependencies.This assembly is built by a runtime newer than the currently loaded runtime andcannot be loaded.

Logically, there are two ways to solve this problem, but neither of these ways actually works.

1. Change the application pool under which the web application runs to use .NET 4 rather .NET 2. But this causes a lot of web.config exceptions. I don't quit understand those config exceptions because in asp.net it's framework backwards compatible.

2. Redirect our membership provider assembly to be executed under .net framework 2. But this way also doesn't work because if our membership provider assembly uses some classes available only in .net framework 4, that part of code has no way to be executed.

Can you give

Implementing a custom Membership Provider vs. using aspnet_Profile table - Which should I do?

  

I wanted to expand the amount of information that is associated with each user(MembershipUser) in the ASPNETDB.MDF database file. Adding columns like FirstName, LastName, etc. So I began implementing my own custom Membership Provider. I created a derived MembershipUser class with the extra private variables that I wanted each MembershipUser record to store. Its basically done. Almost after I did this I stumbled across the columns in the ASPNETDB.MDF->aspnet_Profile table called "PropertyNames" and "PropertyValuesString".  Could I have simply used these two columns to accomplish what I was attempting to do or are these columns for global application configuration settings?  

Is the aspnet_Profile table purpose to store expanded/related information about users such as personal information? Or is it for something else? Thanks.


Adding additional fields to my custom membership provider

  
Hi, i have been playing around with the membership provider model for the last week and have it got it working with a basic table schema.  The trouble i have is that i wish to add an additional field (eg First Name) but am not sure how i can do this.  Here's what i have so far: public override MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)    {        MembershipUser user = new MembershipUser(Name, username, providerUserKey, email, passwordQuestion, null, isApproved, false, DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now);        string sql = "INSERT INTO USERS(USERNAME,PASSWORD,EMAIL,ISACTIVE) VALUES(@UID,@PWD,@EMAIL,@ISACTIVE)";        db.AddParameter("@UID", username);        db.AddParameter("@PWD", password);        db.AddParameter("@EMAIL", email);        db.AddParameter("@ISACTIVE", (isApproved == true ? "Y" : "N"));        int i = db.ExecuteNonQuery(sql); 

Overriding web.config in sharepoint webpart/using custom membership in web part

  
I'm developing a web part for MOSS 2007. The web part is being deployed to a web application which utilizes forms-based authentication, and role/membership providers to control users. The membership table has been edited to include addition user info (I am aware, that this isn't the best way to handle additional user, i.e. profiles etc., however, this is a requirement from another department). Since my web part needs to access this information, I was thinking of implementing a custom membership provider. So far I've followed: http://msdn.microsoft.com/en-us/library/6tc47t75.aspx and I've got my custom membership class, and a very stripped down membershipprovider-class. But how do I enable/use this membership provider in my web part? I've tried creating a simple web.config in the "WebPartCode" folder of my solution, next to my webpart code file, with connection string and membership provider tags. But I don't even really know how to build/reference/use the membership provider itself, so I don't know what else I need to do. I've built a C# class library project with the two classes (membershipprovider and custom membershipuser) and compiled it and installed it in the global assembly cache - is this correct? and how do I access them from here? Hope someone can help

Custom Membership Provider Problem

  
Hi there, I'm writing a web app using C# and .NET 2.0 (corporate environment, so I can't use 4.0) and I'm running into an issue with custom membership providers. Everything compiles, and looks like it should work, but I get this error when viewing the WSAT Security tab:  Could not load type 'BinCSF.Security.CUser' from assembly 'App_Code.f4qdas9h, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' <membership> section of web.config: http://illogi.ca/l/snippets/bincsf_web_config.html BinCSF.Security.UserProvider: http://illogi.ca/l/snippets/bincsf_userprovider.html BinCSF.Security.CUser: http://illogi.ca/l/snippets/bincsf_cuser.html Any help would be greatly appreciated.

Custom membership provider and FormsAuthentication.

  
Hello folk, I've implemented my custom membership provider. I use third server for authentication (call web method that validates user/password). I need this user/password for retrieve some additional data from this server. Asp.net MVC uses FormsAuthentication and cookie for keep 'login state' by default. It works well when I login on site first time. But when I close and open site again sometime after, cookie keeps it 'login' but I don't have credential for access to server data. I can change cookieless attribute (to 'UseUri' for example) in configure file but in this case I should login again if I open second tab with this app in same browser. My questions: Is way to call SingOut of FormsAuthentication (remove authentication ticket from browser) when user closes asp.net mvc app?Is secure way to pass user/password data through session? Because server is unstable and interrupt connection often and app should have possibility for silent reconnect.

How to write a Custom Membership Provider

  
Hi guys, Can someone please tell me where to start with creating a custom membership and roles provider? I've found tons of information on how to implement a custom provider but not how to actually create it. I have an Oracle database with a users table. In this table I have a "Platform" column. I would like to authenticate through FBA only the users from this table who have a specific Platform value. Now I know i need to write a custsom membership provider that handles all sorts of requests but i really dont know what to base it on, where to add it in the sharepoint solution etc.   your help will be soooo greatly appreciated!The world is the mollusc of your choice

Custom membership provider using MYSQLMemberShipr Provider

  
hi, I am implementing my custom membership provider for MYSQL for this I write thi code: public class CustomSqlMembershipProvider :MySQLMembershipProvider {   public override void Initialize(string name, NameValueCollection configs) { base.Initialize(name, configs); } } When I am compiling this class, getting an error: 'Project.Models.CustomSqlMembershipProvider': cannot derive from sealed type 'MySql.Web.Security.MySQLMembershipProvider' C:\Workarea\\Project\Models\CustomSqlMembershipProvider.cs Why I getting this error. I have added the MySql.web and MySql.Data assembly references thanks in advance Aayushi

membership provider with custom login form problem / question

  
Hi all, I am using the .net membership provider, and I can get past the membership.validate user ok and into my secure page.   The problem I have is that when I reach the secured page, I have a login status control which isn't changing from login to logout.   Below is my login code:If Membership.ValidateUser(txtUsername.Text, txtPassword.Text) Then Response.Redirect("/auth/Default.aspx") If chkRememberMe.Checked Then FormsAuthentication.SetAuthCookie(txtUsername.Text, True) Else FormsAuthentication.SetAuthCookie(txtUsername.Text, False) End If Else lblLoginStatus.Text = "Oops! Login not found!" End If    Thanks in advance.

custom membership provider with WSS API problem

  

Hi, I just ran into a weird problem when writing a custom membership provider for a wss site.

This is how we validate user, since the authentication is using webserivce, we need to call the web user and passing user name and password to the webserice then update the WSS Profile based on the webservice call. This is how we do for ValidateUser(string username, string password)

 public override bool ValidateUser(string username, string password)
    {
      edwsusermaintWS.edwsusermaint usermgt_ws = new ASP.NET.CustomMembership.edwsusermaintWS.edwsusermaint();
      bool isvalid = false;
      try
      {

        string userinfo = usermgt_ws.validatePassword(username, password);

        if (userinfo != null && userinfo.Length > 0)
        {
          SPWeb siteEval = null;
          try
          {
            
            SPSecurity.RunWithElevatedPrivileges(delegate()
            {
              using (SPSite siteCollection = new SPSite(SPContext.GetContext(System.Web.HttpContext.Current).Site.Url))
              {
                SPWeb site = siteCollection.OpenWeb();
                siteEval = site;
                
              }

            });
            siteEval.AllowUnsafeUpdates = true;
            //This is not efficient process, because everytime, people logs in,it queries the webservice to update
            //th
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