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


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

FBA with custom database structure

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

Hi, 

I'm trying to setup FBA for SharePoint 2010 in my environment. 

I've written my  custom membership provider that communicates with my custom SQL database - i'm not using default SQL FBA database for this. 

I've implemented login/registration controls for user creation and authentication. 

I'm using only membership not role provider (i don't need to validate any roles !)

When i debug the application, everything seems to work fine as far as communicating to my custom database is concerned, i can debug my application properly. perfect

but somehow, i'm not able to setup the FBA working. 

in my extended web application - when user is validated - i get 500 error - saying that user could not be validated. As far as i have seen - this is because claims authentication fails for that user !

i've followed all the steps to configure FBA for SharePoint 2010 but still this is not working fine. 

 

I've modified the web.config for central administration site 

added in web.config  - connection string and membership provider

same for STS web.config- my web application and extended web application 

in extended web app i've setup default claims membership provider as the default (i) - as it was mentioned in many of the blogs. 




View Complete Post


More Related Resource Links

FBA with custom database structure

  

Hi, 

I'm trying to setup FBA for SharePoint 2010 in my environment. 

I've written my  custom membership provider that communicates with my custom SQL database - i'm not using default SQL FBA database for this. 

I've implemented login/registration controls for user creation and authentication. 

I'm using only membership not role provider (i don't need to validate any roles !)

When i debug the application, everything seems to work fine as far as communicating to my custom database is concerned, i can debug my application properly. perfect

but somehow, i'm not able to setup the FBA working. 

in my extended web application - when user is validated - i get 500 error - saying that user could not be validated. As far as i have seen - this is because claims authentication fails for that user !

i've followed all the steps to configure FBA for SharePoint 2010 but still this is not working fine. 

 

I've modified the web.config for central administration site 

added in web.config  - connection string and membership provider

same for STS web.config- my web application and extended web application 

in extended web app i've setup default claims membership provider as the default (i) - as it was mentioned in many of the blogs. 


Toolbox: Database and OR/M Tools, Oren Eini and Custom Visual Studio Tabs

  

This month we look at tools for enhancing the LINQ to SQL and Entity Framework designers, Oren Eini's .NET development blog, Visual Studio tab customization, and more.

Scott Mitchell

MSDN Magazine December 2009


Data Deployment: Streamline Your Database Setup Process with a Custom Installer

  

Database setup can be a tough and time-consuming process and sometimes fall victim to human error. Microsoft Installer or InstallShield can help, as can your own custom installer. In this article, the author tackles one approach to writing database installers and demonstrates the process with a working code sample.

Alek Davis

MSDN Magazine September 2004


Custom Entity Framework template and access to the database type

  
First and foremost ... I already made a few changes in the template, the most important one changing the methods generated for stored procedures with OUTPUT parameters and no resultset so that instead of instantiating a few OutputParameter objects, passing them to the method and extracting the values (all without any type checking) you just call the method with a few "out someType?" parameters so I do not need the very basics. I am totally confused by all those GlobalItem, EdmProperty, BuiltInTypeKind, TypeUsage and all this made of objects, all alike and all different though so as soon as I need more data than what's already used by the template I run into problems :-(What I would like is to change the WritePrimitiveTypeProperty() so that it outputs [StringLength(xxx)]  for all char, varchar, nchar and nvarchar properties. But I can't find a way to get from an EdmProperty in the model to the database type in the store.Can anyone help me?In case anyone is interested here's the modified stored procedure mapping code for the template. The first code replaces the original in the .tt: //////// //////// Write EntityContainer and ObjectContext Function Import methods. //////// region.Begin(GetResourceString("Template_RegionFunctionImports")); foreach (EdmFunction edmFunction in container.FunctionIm

Form Based Authentication with Custom database

  
Hi, I have a Sharepoint 2010 web application and I want to implement FBA(Form Based Authentication) for that. I don't want to use any membership providers and role providers. I have a SQL server database where we will maintain users and roles. I want to use this database for validating user credentials and authenticating them. Is this possible in Sharepoint 2010? Please reply ASAP.

How to submit data to a SQL Server database table from a custom page ?

  
Using SPD, I have created a custom page. It has a form with ASP.NET controls textbox, radio buttons, dropdown, submit button etc., Also, I created a Database connection (to the SQLServer database table) under Database Connections. But not sure how to connect this form to the database connection so that when form data is submitted, the data will be inserted into the table.

claims authenticated (FBA) user cannot open a connection to our custom application database

  
We have designed a custom sharepoint site. This site uses a membership provider that I implemented, and the users are stored in our custom application database. These are the steps I follow to reproduce the error: 1. Browse to our site. Select Forms Authentication from the default.aspx selection. 2. Enter in a username from our DB table. This user I have configured as a site collection administrator. 3. Login to the site. The user is authenticated by our membership provider and allowed access (ValidateUser returns true) 4. Browse to a page that attempts to connect to the custom app DB. 5. I get the following error when the page attempts to open a connection to our DB: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server NOTES: The code that opens the DB connection is running with SPSecurity.RunWithElevatedPrivileges. Our application pool account has access to the database. My user can connect to the database fine as well as the user that our  application pool is running as. I have validated the connection string that is being used in the debugger, and that is correct.

ASPNetSQLProvider - Changing it from the default to a custom SQL Database

  

Hi,

 

I am new to ASP.NET and need some help.

 

What I am trying to do is to create a login for a new site that I am developing, and I need the users etc to be contained within the SQLEXPRESS database that I am using.

Can someone please help me to work out how to point the default ASPNETSQLProvider to my SQL database and not the default APP_Data one?

I am using Visual Studio 2008 and SQLExpress 2005.

Many thanks,

 

Mark 


How to add custom field into registration page and save it to database?

  

Hi all,

I try to construct a membership system using Walkthrough: Creating a Web Site with Membership and User Login. The membership system is going to be added to umbraco cms. I should admit that I am still in the learning process and need your guidance for my question.

On my registration page other than standard fields which comes with CreateUserWizard, I need to add some extra fields in addition to that and those fields should be saved to database along with standard fields.

Is it possible? If it is, how can I manage to do that?

thanks,

ds


Convert user.config to database storage via my custom settings provider

  

Hi,

I've created my own custom settings provider to save user settings (formerly in the user.config) to a database. To point the particular settings that are to be saved to the database I specified

[SettingsProvider(typeof(BlobSettingsProvider))]
for each property to point to the BlobSettingsProvider instead of allowing them to default to the LocalFileSettingsProvider.
Now I need to convert existing user.configs to save to the database on the fly - a one time conversion. Because I've now specified the properties to use the BlobSettings provider they can no longer access the local user.config.
Does anyone have any thoughts on how best to accomplish this conversion (i.e. read the local user.config and populate the BlobSettingsProvider). The app can be run as a ClickOnce installed app or as a simple .net app - finding the correct local user.config looks to be a problem.
Thoughts, ideas,...?
Thanks,
Glenn

Glenn

creating custom table in share point database in sqlserver is fine ?

  

we are creating custom table in share point database in sqlserver.


is it fine to create custom table?

are we violating any rule  because of the creation of custom table ?

does share point recommended to create custom table  ?


Copying a database structure (with or without data)

  

I designed a database on my local machine (cert.mdf), and attached it to SQL Server Mgmt Studio.  I signed up with a db hosting company and copied it to their site (using "script database as / create to") and got it set up out there.  Since then I've made further changes to the design, but only to the web-based version.

Now I'd like to bring the web-based design back to my local cert.mdf so I can do some further development & testing but I can't seem to find a way to do that.  (I don't mind being destructive on my local machine).  If I try the same thing but in reverse, I get a 'metadata unreadable' error.  If I just try a copy (via mgmt studio) I get a message about 'unable to connect to local server'.

Suggestions?


Database structure visualization

  

Hi All,

Please be patient with me, as I am new to the forums!

I am currently developing an application that creates a database such as the following:

DatabaseRoot

  Model1

      Point1

      Point2

      Line1

      Line 2

  Model2

    Point1

    Line1

  Results1

  Results2

I would like to display this data in a treeview so that I can expand / collapse each level of the database at a group level (Models / Results at the first level, Points / Lines etc at the next sub-level).

My database objects all derive from a base object class, and each database object stores it's type (from an enum).

What is the best way to approach this, i.e. nested collectionviewstructures etc? Or should I consider re-coding the database structure itself to make it lend itself to WPF?

Cheers

Chris


Database structure for Rating articles

  

I'm trying to construct a article page, where people can rate the article. Currently, I have a table Articles, that stores the articleId, articleContent, and few other information. And a Rating table where I store userid, articleid and rating.

Article_Table

articleId, articleContent


Rating

userId, articleId, rating


My worry is, there can be several users rating, several articles. The Rating table is growing exponentially. There are NxM entries in my rating table for N users and M articles.

Is there a better way to design my database, so I won't run into a huge Rating table, and help reduce the time the below query takes to run.

select sum(rating)/count(*) where articleId = 'x' -- to calculate the average rating for a give article


Thanks in Advance!!!



Using a Custom Action to Create a Database at Installation

  
Hi, I am using Custom DB Instalation By using Installar Class and Sql.txt, When I execute Bulk Stored Procedure Script I am Getting Error, Incorrect Syntax near Set, Can any one help How to Execute Stored procedure

Using a Custom Action to Create a Database at Installation

  
Hi, I am using Custom DB Instalation By using Installar Class and Sql.txt, When I execute Bulk Stored Procedure Script I am Getting Error, Incorrect Syntax near Set, Can any one help How to Execute Stored procedure

Custom action to actions- menu on "manage content and structure" sitemanager.aspx page

  

Hi all

 

I need to add custom action to actions menu of document library when user is in "content and structure" and can multiselect items from doclib. (doc lib is active in left side)

 

Any ideas how to add that?

 

By default the Action menu contains items copy,move,delete|checkout,discard checkout, checkin,publish,unpublish

 

Other option would be to add multiselect support to doc libraries.

 

Thanks for the ideas in advance,

 

br,

-hkossu


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