Sunday, April 08, 2012

Spicy matter

Now i am wainting to board spicejet from madurai to mumbai.
I am very fond of spicy masala from my wife's hometown.Here in Mumbai I used to put the readily available and packaged masala on mutton.I end up unsatisfactory dinner.This time,my wife prepared the handmade and exactly mixature of the masala.Actually i forgot and boarded the bus to airport. when computer scanned my bag,I was told to come otherside to openup the bag.First moment I really shocked and security cop asked me "what  was inside my package". I simply replied
a couple of SharePoint related books and an book titled Cloud computing on SharePoint.He again insisted me that I had any food items to have on board.I smiled at him and continue my coversion with him in Hindi.
I remembered after Few minutes thai i had 2 packages of coriander powder and red chilli powder.Despite I aware of these stuffs are not allowed pn board ,i simply forgot.They cancelled my boarding pass and asked me to put my bag in luckage and made new boarding pass.Today this flight was late by one hour.:)-

Saturday, April 07, 2012

SharePoint content databases

configuration db:
This db contains informations about the sharepoint databases,iis websites and web applications,trusted solutions,web part packages,site templates and farm settings of sharepoint farm settings.This must be reside on where the Central Administration content database residing.This is read-heavy database once production begins.

Content db:
this contains all of the site contents like lists,libraries,properties of webparts,audit logs,user names and their rightes on the site.It can contain multiple sites or single site.If single database larger than microsoft recommended limitaion 200GB then storage must be carefully consider.Sql enterprise edition's table partioning could be used.Part of databases can be reside different RAID array.

Property
Crawl
Search Administration
Web analytics reporting
Web analytics staging
Profile
Synchronization
Usage
Business  connectivity Database
Application Registry
Subscription settings
Social tagging
Secure store
Word automation services AND performance point.

Wednesday, April 04, 2012

Outlook appointment using EWS API

Recently I developed the small utility to send the outlook based appointment invitation using Exchange Web Service Managed API. You need to download the file "EwsManagedApi.msi"[786KB] from this link EWS Managed API download link Add the Microsoft.Exchange.WebServices.dll to your project and include the namespace Microsoft.Exchange.WebService.Data Always exchange server protected through SSL,you need to validate the certificate for trusted relationship with your client application.
        ExchangeService service = new ExchangeService();
        service.Credentials = new WebCredentials("UserName", "Passw0$rd", "Domain");
        service.Url = new Uri("https://owa.yourDomain/EWS/Exchange.asmx");

        System.Net.ServicePointManager.ServerCertificateValidationCallback = CertificateValidationCallBack;
        //Response.Write(service.RequestedServerVersion);
        Appointment appointment = new Appointment(service);
        appointment.Subject = "EWS Managed API hooked";
        appointment.Body = "Discuss over Exchange Web Service API";
        appointment.Start = new DateTime(2012, 7, 20, 10, 00, 00);
        appointment.End = appointment.Start.AddHours(1);
        appointment.RequiredAttendees.Add("emailID");
      
When I am adding this Web Service URL to my visual studio project,It required my login credentials for this domain.Interesting point I've found on this,my client certificate got expired.To suppress this I simply change boolean value on the CertificateValidationCallback method. First moment I am not aware of my WebService URL.I put the debug mode on Autodiscover method,It listing out my webservice URL for the Exchange Server 2010.
Validating the X509 certificate
private static bool CertificateValidationCallBack(
        object sender,
        System.Security.Cryptography.X509Certificates.X509Certificate certificate,
        System.Security.Cryptography.X509Certificates.X509Chain chain,
        System.Net.Security.SslPolicyErrors sslPolicyErrors)
    {
        // If the certificate is a valid, signed certificate, return true.
        if (sslPolicyErrors == System.Net.Security.SslPolicyErrors.None)
        {
            return true;
        }

        // If there are errors in the certificate chain, look at each error to determine the cause.
        if ((sslPolicyErrors & System.Net.Security.SslPolicyErrors.RemoteCertificateChainErrors) != 0)
        {
            if (chain != null && chain.ChainStatus != null)
            {
                foreach (System.Security.Cryptography.X509Certificates.X509ChainStatus status in chain.ChainStatus)
                {
                    if ((certificate.Subject == certificate.Issuer) &&
                       (status.Status == System.Security.Cryptography.X509Certificates.X509ChainStatusFlags.UntrustedRoot))
                    {
                        // Self-signed certificates with an untrusted root are valid. 
                        continue;
                    }
                    else
                    {
                        if (status.Status != System.Security.Cryptography.X509Certificates.X509ChainStatusFlags.NoError)
                        {
                            // If there are any other errors in the certificate chain, the certificate is invalid,
                            // so the method returns false.
                            return true;
                        }
                    }
                }
            }

            // When processing reaches this line, the only errors in the certificate chain are 
            // untrusted root errors for self-signed certificates. These certificates are valid
            // for default Exchange server installations, so return true.
            return true;
        }
        else
        {
            // In all other cases, return false.
            return false;
        }
    }
Few line of codes really useful for certain situation. The one EmailMessage class is the simplest and hassle free when comparing with System.Net.WebMail and SMTP configuration based email.
   //EmailMessage message = new EmailMessage(service);
        //message.Subject = "EWS Managed API";
        //message.Body = "The proposition has been considered.";
        //message.ToRecipients.Add("email Address");
        //message.SendAndSaveCopy();

        //Response.Write("Sent");

Sunday, April 01, 2012

Nintex First WorkFlow

To download the Nintex Workflow 2010 you must provide your web email address,they will not accept if you provide any of the public email address such as Yahoo,gmail and hotmail. You will get the download link along with .nlf file which is mandatory to activate the product. After downloading this .msi file and installed,You need to deploy the solutions nintexlivecore.wsp and nintexworkflow2010.wsp through your Central Administration. Apart from these you need to configure the mandatory settings like "Content Database,managed allow path,and webapplication activation. I made it a very simple Approval workflow and found lot of features those are not available in SharePoint 2010 out of box workflow. "Delegating the task to someone" is a really nice feature in Nintex workflow.Later I will explore all the enchanced features in this workflow.
Leave approval Process workflow.