Search


Tuesday, January 20, 2009

Using Application block 3.1.0.0 in sharepoint

Using Application block 3.1.0.0 in sharepoint: - install application block 3.1.0.0 - put Microsoft.Practices.EnterpriseLibrary.Common.dll ,Microsoft.Practices.EnterpriseLibrary.Logging.dll, and Microsoft.Practices.ObjectBuilder.dll from C:\Program Files\Microsoft Enterprise Library 3.1 - May 2007\Bin to GAC (c:/windows/assembly) and sharepoint application bin (ex: C:\Inetpub\wwwroot\wss\VirtualDirectories\intranet.finance.com80\bin) ===================================================================================== modify web.config: add safe controls: ===================================================================================== - use "C:\Program Files\Microsoft Enterprise Library 3.1 - May 2007\Bin\EntLibConfig.exe" to modify web.config - add logging application block - in trace listerer folder, add listener (flatfile, email, database, or etc) ============= use the logger. - add following wrapper class to the infopath project. - add this line inside function to trace: MessageLogger.Log(Category.Trace);

Tuesday, January 13, 2009

Open Source Logging Tools in C#.

Open Source Logging Tools are free, open-source logging tools in C#.

AppLog
AppLog is a simple application logging utility. It is written in C#, and makes use of the ByteFX MySQL data access library.
C# Logger
The C# Logger (CSharp Logger) is designed after the log4j project by apache. It is a logging tool that can be used to write events such as debug, info, warn and error messages to the Windows event log.
C# .Net Logger
C# .Net Logger (CSharp Dot Net Logger) is an extensible .NET Logger written in C# with advanced message queuing allowing for completely asynchronous use.
log4net
log4net is a tool to help the programmer output log statements to a variety of output targets. log4net is a port of the excellent log4j framework to the .NET runtime.
Logger.NET
Logger.NET is a logging framework which enables you to include code which contains logging information.
logthis
The logthis .NET logging framework is a C# logging framework as a drop-in logging tool module for .Net applications.
LogZipper.NET
LogZipper.NET is a console application which rotates log files according to several command-line switches to allow scheduling.
NLog
NLog is a simple logging library similar in concepts to log4net, designed with simplicity and flexibility in mind.

shell execute in C#

http://www.codeproject.com/KB/shell/csdoesshell2.aspx

Monday, January 12, 2009

deployment administrator-approved infopath form templates

General deployment procedure uploading, upgrading, and removing administrator-approved form templates : http://technet.microsoft.com/en-us/library/cc262921.aspx

Tuesday, January 6, 2009

sharepoint web services lists

WSS Web Services

Web Reference URL

Administration

http://www.MyServer:Port_Number/_vti_adm/Admin.asmx

Alerts

http://www.MyServer/[sites/][MySite/][MySubsite/]_vti_bin/alerts.asmx

Copy

http://www.MyServer/[sites/][MySite/][MySubsite/]_vti_bin/copy.asmx

Document Workspace

http://www.MyServer/[sites/][MySite/][MySubsite/]_vti_bin/dws.asmx

Forms

http://www.MyServer/[sites/][MySite/][MySubsite/]_vti_bin/forms.asmx

Imaging

http://www.MyServer/[sites/][MySite/][MySubsite/]_vti_bin/imaging.asmx

List Data Retrieval

http://www.MyServer/[sites/][MySite/][MySubsite/]_vti_bin/dspsts.asmx

Lists

http://www.MyServer/[sites/][MySite/][MySubsite/]_vti_bin/lists.asmx

Meetings

http://www.MyServer/[sites/][MySite/][MySubsite/]_vti_bin/meetings.asmx

People

http://www.MyServer/[sites/][MySite/][MySubsite/]_vti_bin/people.asmx

Permissions

http://www.MyServer/[sites/][MySite/][MySubsite/]_vti_bin/permissions.asmx

Search

http://www.MyServer/[sites/][MySite/][MySubsite/]_vti_bin/search.asmx

Site Data

http://www.MyServer/[sites/][MySite/][MySubsite/]_vti_bin/sitedata.asmx

Sites

http://www.MyServer/[sites/][MySite/][MySubsite/]_vti_bin/sites.asmx

Users and Groups

http://www.MyServer/[sites/][MySite/][MySubsite/]_vti_bin/usergroup.asmx

Versions

http://www.MyServer/[sites/][MySite/][MySubsite/]_vti_bin/versions.asmx

Views

http://www.MyServer/[sites/][MySite/][MySubsite/]_vti_bin/views.asmx

Web Part Pages

http://www.MyServer/[sites/][MySite/][MySubsite/]_vti_bin/webpartpages.asmx

Webs

http://www.MyServer/[sites/][MySite/][MySubsite/]_vti_bin/webs.asmx

How to get the full name of the user who is logged in to a asp.net website using integrated authentication

to get the full name of the user who is logged in to a asp.net website using integrated authentication need to add reference to System.DirectoryServices.dll

    private string GetFullName(string strLogin)

    {

        string str = "";

        // Parse the string to check if domain name is present.

        int idx = strLogin.IndexOf('\\');

        if (idx == -1)

        {

            idx = strLogin.IndexOf('@');

        }

 

        string strDomain;

        string strName;

 

        if (idx != -1)

        {

            strDomain = strLogin.Substring(0, idx);

            strName = strLogin.Substring(idx + 1);

        }

        else

        {

            strDomain = Environment.MachineName;

            strName = strLogin;

        }

 

        DirectoryEntry obDirEntry = null;

        try

        {

            obDirEntry = new DirectoryEntry("WinNT://" + strDomain + "/" + strName);

            System.DirectoryServices.PropertyCollection coll = obDirEntry.Properties;

            object obVal = coll["FullName"].Value;

            str = obVal.ToString();

        }

        catch (Exception ex)

        {

            str = "";

            Trace.Write(ex.Message);

        }

        return str;

    }