Skip to main content

Posts

Showing posts from 2007

Possible solution for : Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral,

I was browsing for a solution for the error thrown by the MOSS when you are using a webpart which uses connection to database... "Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed." a possible solution is like this : This is due to SharePoint Portal Server and Windows SharePoint Services implementation of .NET Code Access Security (CAS). A solution that addresses the aforementioned error is cited below: * Locate and open the wss_minimaltrust.config file (NOTE: If you've gone with the default SharePoint or WSS install, this file is located at :\Program Files\Common Files\Microsoft Shared\Server Extensions\60\Config) * Add the following element to the SecurityClasses section of this config file: < name="SqlClientPermission" description="System.Data.SqlClient.SqlClientPermission, System.Data, Version=1.0.5000.0, Culture=neutra

Connecting to Active Directory - AD - using c#

Hi all, This is one of the most important and basic things a developer has to do in his life. Here I will show how to connect to the AD and get some basic information required. I also have covered fetching manager's information in this topic, I faced problem while working with this. When you search AD with UserID, it returns a path to the manager's information. We have to use the path and search the AD again to get manager's mailid and other information... public string GetManagerMailID(string UserName) { try { Hashtable hsEmpData; string sManagersMailID = ""; hsEmpData = SearchLDAP(UserName); foreach (DictionaryEntry deSearchDataKey in hsEmpData) { if (deSearchDataKey.Key.ToString() == "manager") { sManagersMailID = getManagersID(deSearchDataKey.Value.ToString()); break; } } return sManagersMailID; } catch (Exception ex) { throw ex; } } private static Hashtable SearchLDAP(string userID) { //Pass a connecetion string of sorts to the DirectoryEntry, //Her

Everything that I want to say!!!

Yes, thats what I chose to be the title of my blog. I am not sure how much sense it makes, but it stuck to my mind while entering the title. Myself Vighnesh Bendre, working as Programmer Analyst in a multinational consulting firm. I am located in Bangalore, India. I have been banging my head in software consulting industry for over 6 years now, and I am successful in doing so :) . Hope I will keep this blog alive. You can reach me at vikram.bendre@gmail.com Cheers, Vighnesh Bendre,