Wednesday, December 29, 2010

Moved my blog to Wordpress

Guys, i have moved my blog to http://ammarfassy.wordpress.com/

Tuesday, December 21, 2010

MCTS : BizTalk Server 2006

Well i sat for the MCTS 70-235 (Developing Business Process and Integration Solutions using Microsoft BizTalk Server 2006) exam yesterday and glad to inform that i have passed. mmm.. with regard to the paper, most of the questions were related to BAM, BRE, deploying a BizTalk application, debugging BizTalk applications (ex: debugging orchestration, etc), some of them related to schema creation (ex: minoccurs, validating a schema, etc), role links and general BizTalk questions.

Before sitting for the exam just go through the sarvanas’ preparation diary. It helped me a lot in addition to the following Apress and Wrox eBooks :

  • BizTalk 2006 Recipes - A Problem-Solution Approach - Mark Beckner, Benjamin Goeltz, Brandon Gross,
    Brennan O’Reilly, Stephen Roger, Mark Smith,
    and Alexander West
  • Foundations of BizTalk Server 2006 - Daniel Woolston
  • Wrox Professional BizTalk® Server 2006
  • - Darren Jefford, Kevin B. Smith, Ewan Fairweather

hope i can use the following image. :)

mcts-biztalk

Thursday, November 04, 2010

Rule "Reporting Services Catalog Database File Existence" failed

Due to some reason i had to reinstall the SQL Server 2008 and when setup validates the installation it prompted for following 2 errors as below :

  • Rule "Reporting Services Catalog Database File Existence" failed
  • Rule "Reporting Services Catalog Temporary Database File Existence" failed.

clip_image004

so what you have to do is to delete following files

  • ReportServer.mdf
  • ReportServer_log.LDF
  • ReportServerTempDB.mdf
  • ReportServerTempDB_log.LDF

from the location : C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA and re-run the setup.

Monday, July 26, 2010

Error: This row already belongs to another table

I came across a situation where i had to loop through one of the DataTable and to import the same data into another datable where the data order is different. I was trying to do it but the data is not getting copied to the new DataTable. What I have found out is that you can’t just add rows from one DataTable to another. Initially the table structure must be Cloned and then the rows has to be imported. Cloning the DataTable clones the structure including all DataTable schemas and constraints.

DataTable newTable = new DataTable("Sorted");

newTable = transactionHistoryTable.Clone();
for (int j = transactionHistoryTable.Rows.Count - 1; j >= 0; j—)
{
  newTable.ImportRow(transactionHistoryTable.Rows[j]);
}

_dsResponse.Tables.Add(newTable);

as a summary what i am doing is, initially the data what i have is some data in some order which was populated from AS400 API. I need the same data other way around, bottom to top (For ex: transactionHistoryTable has some data and i need to traverse it back).

Wednesday, July 14, 2010

Failed to connect to the SQL database 'SSODB' on SQL Server

When you tried to configure BizTalk after the successful installation, if you prompted for an error like the one mentioned above, Execute the following command in Visual Studio command prompt.

explore to the following folder:

C:\Windows\Microsoft.NET\Framework64\v2.0.50727>

and run the following command :

RegAsm.exe "C:\Program Files\Common Files\Enterprise Single Sign-On\SSOSQL.dll"

Note : As i am using the Windows 2008 R2 Server, i had to explore to the Framework64 folder.

image

Sunday, May 30, 2010

Calling AS400 RPG Programs using C#

Throughout last few months i had a chance to work with AS400, Equation APIs. The purpose of these equations calls are that we have to develop WCF services on top of these API calls. These calls will be consumed by the BizTalk. Initially it was too hard as i couldn't find any resources online. When i searched in gOOgle about the errors which come across at the time of developments, it does not return anything! It was some hard times and thank for my team lead for helping out on those situations. Hope to write something about  AS400, C# in coming days…

Here is the lovely interface of Equation.

image

As the starting point refer following links :

http://www.netsplore.com/PublicPortal/Default.aspx?tabid=246

http://www.netsplore.com/PublicPortal/Blog/tabid/284/EntryID/13/Default.aspx

Thursday, April 15, 2010

Error 4201: The instance name passed was not recognized as valid by a WMI data provider

I was unable to start the Windows Event Log service on Local Computer. When i tried to start the windows event log service was getting  “Windows could not start the Windows Event Log service on Local Computer.    Error 4201: The instance name passed was not recognized as valid by a WMI data provider.”

This happened at the time of installing MOSS 2007 in my Windows Server 2008 R2 Server machine. Totally i was gone mad coz MOSS 2007 uninstallation crashes due to some reason and was unable to find out the error due to Eventlog crash (what a hell).

Finally figured it out it was due to some permission problem and i had to apply the  SYSTEM user with full control on the folder c:\windows\system32\logfiles\wmi\RTbackup. This solved my problem and the lovely event log was working fine as usual.

more details

Another alternative way is there to renaming the RTBackup file. I didnt try that method hence i have to start the machine in safe mode. It will be a headache at all. so for anyone needs to know about that solution please refer this link.

Wednesday, April 14, 2010

System.IO.FileNotFoundException on "SPSite = new SPSite(url/IP)"

The below code snippet describes the way to insert user profile data into the SharePoint user profile store. At the time of running the code i came across the above said error. I was googling nearly for 1 1/2 days to figure out the problem. I was trying so many options to solve this problem and nothing worked fine. So finally figured it out its due to some permission problem with the application pool. The application pool identity account should be a domain administrator account which has full access (in other words it should be the same identity like the identity account of the MOSS application pool). details

that account should have following permissions:

  1. The account should be a server farm administrator.
  2. The account has permissions to access the content database.
  3. The account is a site collection administrator.
  4. The account  should have permission to access the Windows SharePoint Services site or the SharePoint Server 2007 site through which the code iterates.

by the way when i was reading through some of other blogs they have mentioned its due to 32/64 bit version. i tried that solution too and it didn't work for me. you can read more about this via this link.

string strSharePointSite = @"http://NQ02WBIZWS1";
using (SPSite site = new SPSite(strSharePointSite))
{
    Microsoft.Office.Server.ServerContext context = ServerContext.GetContext(site);
    UserProfileManager profileManager = new UserProfileManager(context);
    UserProfile newUserprofile = null;
    string sAccount = @"domainname\username";
    if (!profileManager.UserExists(sAccount))
    {
        UserProfile profile = profileManager.CreateUserProfile(sAccount);
        if (null == profile)
            textBox1.Text = "Failed to Create User with account :" + sAccount.ToString();
        else
            textBox1.Text = "UserProfileHandler.CalltotheWebService ... User profile created. ...";
    }
    else
    {
        textBox1.Text = "UserProfileHandler.CalltotheWebService ... User profile already exists...";
    }
    newUserprofile = profileManager.GetUserProfile(sAccount);
    newUserprofile[PropertyConstants.Title].Value = "Mr.";
    newUserprofile[PropertyConstants.FirstName].Value = "First Name";
    newUserprofile[PropertyConstants.LastName].Value = "Last Name";
    newUserprofile[PropertyConstants.Department].Value = "IT";
    newUserprofile.Commit();
}

please refer something about access mappings because it will help in some way.

Monday, April 05, 2010

Value cannot be null. Parameter name: serverContext

If you are getting the error “Value cannot be null. Parameter name: serverContext”, as the first step please make sure that you have configured your Shared Services properly and its running.

Thursday, April 01, 2010

New look for MSDN

Seems Microsoft has changed the MSDN look and now it looks nice and loads faster compared to the old one.

image

Thursday, March 18, 2010

Enterprise Library 5.0 Beta1

I would like to share the way to configure the logging application block with a sample web application to log the errors to the Event Listener and to a log file.

Once you have installed the Enterprise Library 5.0 Beta1 into your machine make sure to make it as strong named it by applying a key using the Visual Studio.

After that add a reference to the logging application block assembly Microsoft.Practices.EnterpriseLibrary.Logging.dll in your project.

the next step is to configure the Logging Application Block using the Enterprise Library tool located under Program Files => Microsoft patterns & practices => Enterprise Library 5.0 Beta 1 - February 2010 => Enterprise Library Configuration.

image

so the Configuration tool open like below :

image

Open your web.conf or app.conf file using the above tool as below:

image

by default it will list you the Application Settings and the Database settings and it does not contain anything and if you need to configure something on that feel free to add those values.

image

As we need to test the logging application blocks, please add the Logging Application Blocks by clicking Blocks => Add Logging Settings as below.

image

so it will lists you the settings as below :

image

Enter a name for your Event Log listener as below:

image

Under All Events settings make sure to add your recently created listener into the list as below:

image

Click the “+” sign next to the Logging Target Listeners and select Add Logging Target Listeners => Add Flat File Trace Listener.

image

Once you add the Flat File Listener the configuration tool will looks like below:

image

After that select the log file name to log the events and the Formatter as Text Formatter.

image

image

Upon making the above settings make sure to add the above listener to the All Events settings as below :

image

Upon following the above steps write the following code in C# and test the solution, you will find the entries written upon in the Event Log and the Log file which you did specified in the above step :

try
{
LogEntry logEntry = new LogEntry();

logEntry.Severity = System.Diagnostics.TraceEventType.Information;
logEntry.ProcessName = "Section XYZ from your project";
logEntry.Title = "Testing";
logEntry.Categories.Add("General");
logEntry.Message = string.Format("Your Message");
logEntry.TimeStamp = DateTime.Now; Logger.Write(logEntry);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}

Wednesday, March 17, 2010

Consuming a Web Reference in a class library (C#/.NET) – VS 2008

when you tried to add a web reference to a Class Library in VS 2008, by default it will add a Service Reference (WCF). I have seen this option only in VS 2008 and not in VS 2005. If you need to add a Web Reference then at the time of adding a Service Reference, click the Advanced button as depicted below :

image

After that click the Add Web Reference as below:

image

after that you will be prompted with the usual add web reference dialog.

image

Sunday, March 14, 2010

Setup says VS Integrated Shell 2010 ENU installed when uninstalled, Grrrr!!!

I came across a situation where i had to remove the Team Explorer version 2010 Beta1 from my machine. I have uninstalled it via Uninstall option from the Programs and Features. When i tried to install TFS 2010 RC Team Explorer setup it says “VS Integrated Shell 2010 ENU” exists and have to remove. I did the uninstallation and restarted the machine even. Nothing happened and when i ran the installation it prompts me again saying that “VS Integrated Shell 2010 ENU” already exists. I checked the Programs and Features and it was not there. :(

I was something like this :

image

finally found the solution.

simply run this command :

msiexec /uninstall {874D5E2B-AACE-303A-B3EC-2563E071473E}

lets we dig little bit deeper in to the above command.

Initially you have to to do is to use msiinv.exe (thanks to Aaron Stebner’s to exposing the tool) tool to see if MSI thinks the integrated shell is installed or not. So from that tool it will lists all the installed programs and under that list you can see this ghost “VS Integrated Shell 2010 shell ENU” still exists in the list.

what you have to do is just note down the Product Code and use the same code to execute the above command.

VS2008 Professional connecting to TFS 2010 RC on Windows Server 2008

Assuming that you have already installed VS 2008 professional edition (no problem eventhough you have installed the VS 2008 SP1 because anyhow you are going run it again) in your machine and in your machine TFS 2010 RC is installed and configured successfully.

Please follow the following steps as its :

  1. You have to install Team Explorer 2008 over your VS2008 Professional SP1.
  2. You need to reinstall VS2008SP1 to update team explorer.
  3. After that you have to install Visual Studio Team System 2008 Service Pack 1 Forward Compatibility Update for Team Foundation Server 2010 (Installer) from this link.
  4. When you connect from VS2008, you need to enter the full URL (ex: :/tfs">https://<MyServer>:<port>/tfs)

image

Team Foundation Server 2010 RC Installation

After a lengthy hard work we were able to install and configure the Team Foundation Server 2010 RC on Windows 2008 R2. Eventhough the installation and the configuration is easy we had some trouble with the DNS naming of the host machine (thanks to Usman – Team Lead to identifying that issue).

kick off the installation by clicking the setup file and follow the screens just clicking the next button.

clip_image002

clip_image004

clip_image006

After the completion of the installation its time to configure the TFS 2010.

clip_image002[4]

clip_image004[4]

In this situation you have to enter a authenticated user who has the administrator rights in the domain.

image clip_image008

from the following screen you can double check all your entries are valid or not by clicking the Verify button. Its one of the best feature in this configuration wizard rather messing up the things after the completion of the installation.

image clip_image014

clip_image016

clip_image018

image

image

Thursday, March 11, 2010

Missing Application Pools Folder in IIS - Windows Server 2003

to get the application pools back to the IIS please follow the steps as mentioned below:

1. In IIS Manager, expand the local computer, right-click Web Sites, and then click Properties.
2. Click the Service tab, clear the Run WWW service in IIS 5.0 isolation mode check box, and then click OK.
3. To start the WWW service, click Yes when asked if you want to restart IIS now.

WCF and Web service

Features Web Service WCF
Hosting

It can be hosted in IIS

It can be hosted in IIS, windows activation service, Self-hosting, Windows service
Programming

[WebService] attribute has to be added to the class

[ServiceContract] attribute has to be added to the class

Model [WebMethod] attribute represents the method exposed to client [OperationContract] attribute represents the method exposed to client
Operation One-way, Request- Response are the different operations supported in web service One-Way, Request-Response, Duplex are different type of operations supported in WCF
XML System.Xml.serialization name space is used for serialization System.Runtime.Serialization namespace is used for serialization
Encoding XML 1.0, MTOM(Message Transmission Optimization Mechanism), DIME, Custom

XML 1.0, MTOM, Binary, Custom

Transports Can be accessed through HTTP, TCP, Custom Can be accessed through HTTP, TCP, Named pipes, MSMQ,P2P, Custom
Protocols

Security

Security, Reliable messaging, Transactions

State state less

can manage states

Installing a SQL Server 2008 named instance – Windows Server 2008 R2

Run the setup from your SQL Server 2008 CD

clip_image002

clip_image004

Click Installation tab and click New SQL Server Stand Alone installation or add features to an existing installation.

clip_image006

clip_image008

clip_image010

clip_image012

clip_image014

clip_image016

Accept the licensing terms.

clip_image020

clip_image022

Give a name to the SQL Server instance.

clip_image024

clip_image026

clip_image028

i am not going to install this particular instance in mixed mode hence i have selected the windows authentication mode. Setup wont allow you to go to next step unless if you didn't specify a administrator account. I have added the current user credential as one of the administrator account for the SQL Server.

clip_image032

clip_image036

clip_image038

clip_image040

clip_image042

clip_image044

clip_image046

clip_image048

clip_image050

http://support.microsoft.com/kb/955499

http://support.microsoft.com/kb/956173