2008-12-10

Search Issue when using Visual Studio 2003 on Windows Vista Operating system


A couple days ago, I faced a small issue when I tried to search specific value inside VS 2003 solutions while I have MS Windows Vista OS installed on my PC…. Doing searching will cause VS 2003 to be hanged and stop responding.. I overcome this issue by Disable Visual Themes for VS 2003.. To do so please follow the following steps

..... Click here to read more!





2008-11-13

Develop .Net 1.1 Web Application on windows Vista (IIS 7)


To develop Web application using .Net 1.1 and Visual Studio 2003 on Vista OS (IIS 7), follow the below steps:

  1. First of all you have to install Visual Studio 2003. this will install .Net 1.1 also
  2. Install all service packs for .Net framework 1.1.



2008-07-23

Content Management System (CMS)


Contenet Management System (CMS)

What is CMS?

Computer management system (CMS) is computer software that is used to create, edit and publish contents of websites. Typically, CMS is used to store, control, versioning and publish industry-specific documentations such as manuals, guides, articles…etc........ Click here to read more!



2008-05-15

How to know the physical path of executing .Net assembly


In some cases you may come to a point where you want to know the physical path on your hard drive for the current assembly.. For example you might want to know the physical path of an Configuration XML file, .....

Click here to read more!







2008-05-12

Substring Java Script function (left and right)

There is no built in functions inside Jscript to extract left or right substring from specific string… the following functions are customized to do so..


function LeftSubString(stringValue, length){

if (length <= 0)

return "";

else if (length > String(stringValue).length)

return stringValue;

else

return String(stringValue).substring(0,length);

}


function RightSubString(stringValue, length){

if (length <= 0)

return "";

else if (length > String(stringValue).length)

return stringValue;

else {

var iLen = String(stringValue).length;

return String(stringValue).substring(iLen, iLen - length);

}

}

2008-05-11

How to know SQL Server version and SP

Many time I stuck with a question… what is this DB Server version and what Service pack is installed on it? What is the easiest way to know DB edition? I asked this question to a friend of mine and he gave me the following simple Select statement that answered my questions.

--------------------

SELECT SERVERPROPERTY('productversion') AS version

, SERVERPROPERTY ('productlevel') AS SP

, SERVERPROPERTY ('edition') AS DbEdition

--------------------

I hope you will find it useful :)

Reading Data from Excel by using SQL Statements & ODBC

In many cases I had to query data from excel sheet with large number of records … of course I can do this by using filtering feature from MS excel, many developer prefer writing sql statements instead of using filtering feature built into MS Excel. Using Sql statements to query data from Excel sheet will make developer life easier. You can load this sheet into DB server then query it using the ordinary tables, actually this is not the optimum solution for this case.. You can query excel sheet without load it into DB server.


By using ODBC you can query excel sheet's data without loading it into DB from inside Query analyzer or MS Sql Management studio…. It is very simple query and u can even filter by writing your own WHERE condition.


To query data form MS Excel 2003 you can use the following Select Statement:

----------------

SELECT *

FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;DATABASE=FileNameWithPath.xls',

'Select * from [Sheet1$]')

----------------


And form MS Excel 2007 you can use the following select statement:

---------------

SELECT *

FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 12.0;Database=FileNameWithPath.xlsx;HDR=No;IMEX=1',

'select * from [Sheet1$]')

----------------



For example:

Suppose you have an excel sheet with 3 columns; firstName,lastName and Email.And this sheet is stored at C:\Filename.xsl on your hard drive… to query this file:

-----------

SELECT *

FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;DATABASE=c:\filename.xls',

'Select * from [Sheet1$]')

------------


2008-04-30

How to register a Plugin inside MS CRM 4.0 using Registration tool shipped with Crm Sdk 4.0


Plugins on CRM 4.0 replaces Callouts on CRM 3.0.. Mainly Plugins/Callouts is a custom code that should run to response for an action taken place against specific entity. actions like : Create / Update... and so on. Plugins can response to more events than Callouts.. the more events mean more complexity on registering Plugins if we comparing it with Callouts. Thanks for MS, MS released a registration tool with CRM Sdk 4.0 to make out life easier. I listed below main steps to register Plugins inside CRM 4.0.

To register Plugins on CRM 4.0 Please follow these steps:

1) Your assembly should be strongly named.
2) The Class that wills response to actions on activity should be implements IPlugin Interface.
3) Move your assemblies to C:\Program Files\Microsoft Dynamics CRM\Server\bin\assembly\ folder with any resources needed[like XML configuration file, and so on.].
4) Open Plugin Registration tool that is shipped with CRM Sdk 4.0
5) Connect to CRM server, then to CRM instance [NB: Your User Should be in Deployment Manager group.]


6) Register your assembly... to open Register assembly dialog Press (Ctrl +A)


7) Add step to your assembly to open Register new step Press(Ctrl + T).. Step is representing a response to an Action happened on CRM Entity..
For example: to response to an Update Event for Contact Entity.. You have to add a step like the following Picture:


2008-04-29

Test Run deployment issue: The location of the file or directory is not trusted... Error Message

Today I faced small problem while I am building Unit testing project to test my class library. in my class library I was using a DLL file located on a shared folder on my company's network.. when I tried to run the test project I got this error message:
Test Run deployment issue: The location of the file or directory is not trusted

the solution of this issue was about adding the network path to my trusted sites.. to do so I followed the following steps:
1) open "Microsoft .NET Framework 2.0 Configuration" from administrative Tools
2) Go to "Runtime security Policy" --> Machine --> Code Groups --> All Code
3) right click --> New .. then give a name and description for the new group --> click Next
4) in the new form choose "URL" and then type your Network path. you can type it in 2 ways:

a) Y:\* --> for the whole folder
b) y:\AssemblyName.dll --> for single DLL

5) Choose Next... and then choose "Full trust"
6) click Next and then finished
7) finally close you VS and reopen it again
8) have fun in using unit testing :)


Thanks Microsoft for such a nice integration between tools:)