Skip to main content

Posts

Showing posts from April, 2009

Email Alerts are not received...

In one of application, Email alerts are sent using SQL sp_send_dbmail stored procedure. Email alerts were working properly, but suddenly noticed email alerts are not received.

To troubleshoot the issue, first I checked the msdb.dbo.sysmail_event_log table using the below query.

SELECT log_id, event_type, log_date, description, process_id, mailitem_id, account_id, last_mod_date, last_mod_user
FROM
msdb.dbo.sysmail_event_log 
ORDER BY
log_date DESC

If there is any error, you should see records with the event_type value as error.
In my case there are records with event_type value as error, and the description value for those records is same as below

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 3 (2018-02-01T10:41:27). Exception Message: Cannot send mails to mail server. (The SMTP server requires a secure connection or the client was not authenticated. The server response was: Authentication required).  )

As per the error descript…

Scoring and Ranking in Lucene.Net

Scoring feature is used to prioritize and sort the search results by considering their relevance to the search query. For the scoring formula several facts are used. Below the formula which is used to calculate the score value is shown.
Score for term t in document d = ∑ tf (t in d).idf(t).boost(t.field in d).lengthNorm(t.field in d)Below table is listed how those functions are calculated and the description of those functions.
FunctionDescriptiontf (t in d) = sqrt(freq)Term frequency factor for the term (t) in the document (d).
This factor result to have high score value for a document
where more frequent a term occurred.idf(t) = log(numDocs/(docFreq+1)) + 1Inverse document frequency of the term.
Common terms are less important than uncommon ones.
This factor gives high value to a term which occurs only in few
documents and low value to a term which occurs in most
documentsboost(t.field in d)Field boost, as set during indexing. Boosting is used to give high priority for a term or …

Did You Mean Feature for a Search Application

This article describes how the suggesting word feature is used for a Searching application which uses Lucene.Net for indexing and searching.
Suggesting word feature is mainly useful when a user input some misspelled words and to suggest the correct word to the user.

To implement the Did You Mean feature by suggesting words, n-gram method is used. n-gram method divides the given misspelled word into sub words by considering the length of the word.
The idea behind with the n-gram method for suggesting word feature is that the misspelling occurs due to mainly one or two letters. Therefore it will only affects few n-grams. Therefore we can recognize the correct word by taking the word which share high proportion of n-grams with the misspelled word.

n-grams are created considering the length of the word.
If the word length greater than five, two grams are created having the length of three and four.
If the word length is five, then the length of the grams are two and three.
If the word length is…

Integrate SQL Server Reports with MS CRM

To integrate SQL Server Reports with MS CRM, select "Reports" under MS CRM "Workplace" as shown below.















Then click on "New" to add a new report as shown in below figure.















After that click on "Browse" button which is shown in below figure, and select the report to be added. Enter the details of the report like Name, Description,etc.
















Finally click the Save button to save the report. After that the added report is displayed under Reports in MS CRM Workplace.

Unable to edit my information using “My Settings” link in the SharePoint Site

We can find two links at the top of the SharePoint site as "My Settings" and "My Site". But I was unable to edit my information using "My Settings" link. Also when I clicked on "My Site" link it displayed an error message saying that cannot create a site because site is already created. Other users also had those two problems

I was able to solve those two problems by changing the "My Site Settings" from SharePoint 3.0 Central Administration. User Name in "My Site Settings" was changed to the Domain Users as shown in the below figure.















By changing User Name to Domain Users, it allows every user in the domain to create and maintain for him or her and maintaining his or her own profile. My Site Settings is appearing in the created Shared Service page

Creating a Sample Custom Web Part for SharePoint

We have to create custom web parts for SharePoint sites according to our requirements. Because web parts required for a site may not available in the Web Part Gallery of the SharePoint.
I created a simple web part which displays who the current user is logged in to SharePoint. To create and use it in SharePoint site below steps were used.

• Created a Class Library project in Microsoft Visual Studio 2005
• Then the below code is added to get the current user and show it

public class SimpleWebPart : WebPart
{
private string displayText = "Hello World!";

[WebBrowsable(true), Personalizable(true)]
public string DisplayText
{
get { return displayText; }
set { displayText = value; }
}

protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
writer.Write(displayText);
}
}

• Assembly.cs file in the class library project was modified by adding below code
[assembly: AllowPartiallyTrustedCallers()]


• Then gave a strong name to the assembly by selecting project properties and then selected “Si…

Lucene.Net Logical Index Structure

In the index file data are kept as Documents. Each document contains several fields that consist of name and value pairs. Therefore index file have several documents stored and each document contains several fields.
Fields are used to keep information in different ways in the indexed file. There are four types of field types.They are listed in the below table with the description of the field type.Field TypeDescriptionKeywordConstructs a string value field that is not tokenized, but is indexed and stored. Therefore it is useful for non-text fields and for fields which we want to keep information as it is. Therefore name of the video file is keep in a this type of fieldTextConstructs a string value field that is tokenized, indexed and stored. Information in this type of field will return with hits. These types of fields are useful to keep content in a video frame.UnIndexedConstructs a string value field that is not tokenized nor indexed, but is stored in the indexUnSto…

Lucene.Net Index Building Process

Index building process is the process of indexing given to the index files. Before index given data, those data are analyzed by an analyzer. During the analyzing process given data strings are tokenized to tokens. Then the case of the all the tokens are turned to the lower case using the lower case filter. After that stop words are removed using Stop word filter. The below English words are considered to be Stop words.
"a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "no", "not", "of", "on", "or", "s", "such", "t", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "…

IPL 2009 Match Schedule

April 2009


Sat 18
12:30 local, 10:30 GMT, 16:00 IST
1st match - Chennai Super Kings v Mumbai Indians
Newlands, Cape Town

Sat 18

16:30 local, 14:30 GMT, 20:00 IST
2nd match - Bangalore Royal Challengers v Rajasthan Royals
Newlands, Cape Town

Sun 19
12:30 local, 10:30 GMT, 16:00 IST
3rd match - Delhi Daredevils v Kings XI Punjab
Newlands, Cape Town

Sun 19

16:30 local, 14:30 GMT, 20:00 IST
4th match - Deccan Chargers v Kolkata Knight Riders
Newlands, Cape Town

Mon 20

16:30 local, 14:30 GMT, 20:00 IST
5th match - Bangalore Royal Challengers v Chennai Super Kings
St George's Park, Port Elizabeth

Tue 21
12:30 local, 10:30 GMT, 16:00 IST
6th match - Kings XI Punjab v Kolkata Knight Riders
Kingsmead, Durban

Tue 21

16:30 local, 14:30 GMT, 20:00 IST
7th match - Rajasthan Royals v Mumbai Indians
Kingsmead, Durban

Wed 22

16:30 local, 14:30 GMT, 20:00 IST
8th match - Bangalore Royal Challengers v Deccan Chargers
Newlands, Cape Town

Thu 23
12:30 local, 10:30 GMT, 16:00 IST
9th match -…