Presenting at DevTeach/SQLTeach Toronto 2008
DevTech team has released the name of final speakers and their topics here and it seems that I also made the cut to speak at this event. DevTeach / SQLTeach Toronto 2008 will be the biggest developer, DBA and ITPro conference in Canada. It’s jam-packed with advanced sessions (level 300 and 400) all on the latest versions of Microsoft products and technologies. I am presenting two topics in the SharePoint track:
1) Accessing External Data Sources Through SharePoint:
Imagine that your SharePoint sites must contain structured data in a high volume and you need to perform complex queries and actions against it. Obviously, there are pros and cons of storing such information in SharePoint lists or in a custom SQL database. Realistically speaking, neither of these approaches alone nor Business Data Catalog (a.k.a BDC) is the answer to all of your data integration woes. You like the versioning, approval, bulk editing , rich UI and other good features that SharePoint lists offer but you are also concerned about the performance of your complex cross-list queries, CAML limitations (like ‘join’ , ‘Select distinct’) and optimized searching. You need to provide a common metadata repository and a hybrid framework for accessing external data sources through SharePoint utilizing all your options including BDC, Data View Web Part and custom code to keep both data structures in sync. In this session I will show you how you can surface information from your backend databases into your SharePoint sites, when to keep structured data in SharePoint lists and when not and eventually how in real world implementation you will end up combining all your options to come up with a robust solution with much better performance!
2) Forms based authentication in SharePoint with the SQL Server membership provide :
In ASP.NET 2.0 , there is an important concept called provider model which is used for many new feature such as Membership/Role Management, Profiles, etc. SharePoint is built on the top of ASP.NET 2.0 which means it can utilize everything that ASP.NET 2.0 offers including SQL Membership provider. In this session learn how to set this up, get yourself familiar with issues/workarounds, managing your custom profiles and finally how to leverage this solution for exposing your SharePoint sites to external users. This is an advanced session, targeting both IT Pros and Developers and attendees will receive fully commented source code with step-by-step walkthroughs for the exercises shown during demo.
Hi,
I have two web applications in moss2007, each of one uses an independent database and the authentication is based on Forms using Sql Provider, I would like to know if it is possible to have different Membership Providers in the Central Admin web config in order to change the administrator of the sites created under the web applications.
Like I mentioned before, I already changed each site to work with forms and I changed the name of the providers in the central admin on each site.
After that I modified the web config of each site and include the membership provider name and connection string, in the PeopleWildCard I added the provider.
Then I modified the web config of the central admin, added the two providers, connection strings and then added the providers to the PeopleWildCards.
Then I tried to changed the administrator of the site in the central admin but I couldnt find any user in the database. After that I decided to modify a provider of one of the sites changing the name to AspNetSqlMembershipProvider, modified this name on each web config and then in the site where I changed the name I FOUND a user.
If you can provide any information on how to accomplish this I’ll be very greatfull.
Best Regards,
Carlos
Carlos,
Yes , you can potentially have multiple providers set up in Central Admin and based on the settings you make in the Authentication Providers section , where you assign auth providers to zones, CA knows which auth provider to load when working with that specific zone (for example when your defining policies for zones or when you are specifying site collection admins for the web applications). To me it looks like your central admin is only picking one of you auth provider, so there should be a conflict somewhere . When you say it doesn’t resolve the name, does CA resolve the names for the other application? or you can’t resolve the names at all when you have two auth providers set up in CA?
Hi, thank you for your answer, I can only resolve the names when the auth provider for one of the sites it is named (in the web config for the CA and for the site) AspNetSqlMembershipProvider and the name of the connection string is named LocalSqlServer, if I change the name for the connection string for any other name (LocalSqlServer -> MyLocalSqlServer) then I cannot resolve any user name :S
Try to use different names for your providers , not
AspNetSqlMembershipProvider.Add an explicit “clear” directive before your “add” statements within your providers and Connection String Sections.This will ensure that your application doesn’t inherit any default provider or connection string registrations.
Hi Reza,
The only way I could make it work was adding the providers and connection strings to the MACHINE.config file which is in the following path: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config this is a solution that I dont like it because I create the web app and sites programmatically and modify their configuration files in the same way, if I take this solution I will have to modify the machine.config file as well every time i create a new web app and site.
These are the web configs modifications:
Central admin:
And i added the corresponding provider and connection string to each site.
But the solution, like I mentioned before, was adding the providers to the machine config file. Do you know why is this happening ?
Best regards,
I believed the XML that I pasted is blocked, please let me know if there is any other way that I can use to send it
Did you use explicit “clear” directive?
If I add the “clear” directive in the connection strings (in both, central admin and site web config) an error appears:
The connection name ‘LocalSqlServer’ was not found in the applications configuration or the connection string is empty.
How about if you use “Clear” for providers only and use different connectionstring names than “LocalSqlServer”?
It seems that the web config of each web application it is not overwriting the machine config file. I removed the connection strings and membership providers (I only left the originals) from the machine config file that I added early and when I try to log in to the site I got this error:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
I dont know why the web config it is not overwriting the machine config file
The minute you add a web.config file it would override some of the settings (including Providers and connection strings) in machine.config file. Has anyone edited the machine.config before you started working with it? Does this work if you move your providers to another machine?
Let me try doing this with another machine that has Moss2007 installed, I really appreacite your help. I will keep you posted.
Hi Reza,
I made a test with another machine with moss2007 installed, I have created a new web app and a new site within the web app, I modified the auth provider in the central admin web page for the site, then I modified the web config of the new site adding the provider with name “ProviderSite1” and then modified the web config of the central admin adding the new provider and connection string as well. Then I went to central admin web page and tried to change the administrator of the new site, but I couldnt find the user, I checked the LOG file of sharepoint and i found this:
Cannot get Membership Provider with name ProviderSite1. The membership provider for this process was not properly configured. You must configure the membership provider in the .config file for every SharePoint process.
You have an error in your provider config settings.
I am getting the following error when tryong to log in the externet site on moss 2007. I have data base server in adifferent system.
Err Details:
“An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by
the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 –
Error Locating Server/Instance Specified) at
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) “
I think error is self-explanatory , your sql server 2005 doesn’t allow remote connections. Go to SQL Server management studio , connect to your database engine , right click on the server , go to server properties tab , go to connections and make sure “Allow remote connections to this server ” is selected.
Thanks for u r answer.
I have 2 application server(containing moss) & two clustered database and one index server for the data base. From one server I can connect the data base properly & have access the same data base. Running one intranet & one extranet server.
From the second server (application server) if I try to open the intranet site it is working fine but in case of extranet site getting the same error.
The extranet is the extended part of the intranet site.
I have checked the data base with the remote connection but still same error.
Plz help me.
The clustered index server of the sql server does not allow me to… create the
Enable remote connections for SQL Server 2005 Express or SQL Server 2005 Developer Edition
You must enable remote connections for each instance of SQL Server 2005 that you want to connect to from a remote computer. To do this, follow these steps:1. Click Start, point to Programs, point to Microsoft SQL Server 2005, point to Configuration Tools, and then click SQL Server Surface Area Configuration.
2. On the SQL Server 2005 Surface Area Configuration page, click Surface Area Configuration for Services and Connections.
3. On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Remote Connections, click Local and remote connections, click the appropriate protocol to enable for your environment, and then click Apply.
Note Click OK when you receive the following message:
Changes to Connection Settings will not take effect until you restart the Database Engine service.
4. On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Service, click Stop, wait until the MSSQLSERVER service stops, and then click Start to restart the MSSQLSERVER service.
so how to proceed
Is application pool identity for extranet site different than intranet site? How about the connection string?
extarnet & Intranet are using different applicatin pool in iis & please tell me how to find the connectin string for moss. I have checked web.config but not get anything like connection string. where from i can find the connection string in moss?
plz help me.
Connection strings should be in web.config file , if can’t find them , then they are not there. You should be clearer in exactly what your problem is , otherwise I can’t help you.
I am able to add users to Site collection Administration (using custom membership provider). but still can’t login to my web application. I have error:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. Help.
If the exact same connection string and MemberhipProvider is working in Central admin and not working in your web application , then this is a false exception. Please let me know if in your connection string is using pass through (Integrated Security=SSPI;) or standard security (Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;)?
I use standard security (Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword)
Ok. I wrong with my web.config file. But now when i try to log on I get error HTTP 403 Forbidden. When i remove my dll from gac i get error Could not load file or assembly. I add my ddl to app_bin folder in my site and central administration. What is problem?
Please ping me via my email [myfirstname] AT devhorizon dot com. I will have a look at your code.
I have one extranet site in moss In the log in page if users type wrong user id & password it shows “The server could not sign you in. Make sure your user name and password are correct, and then try again.”
I need to change the same test message. the page referas core.js & init.js.
<asp:Login ID=”login” FailureText=”” runat=”server” Width=”100%”>
ACTUALLY I NEED TO CHANGE THE “login_pageFailureText”
SO PLEASE HELP ME TO FIND OUT THE SAME? WHERE SHOUD i FIND THE SAME?