Monish Nagisetty's Space

Building connectivity on-premise, in the cloud and beyond

SQL Server 2005 CTP – Pending reboot error

I was installing SQL Server 2005 CTP with VS 2005 Beta 2 and the following error appeared repeatedly. During the System Configuration Check the installation reports an error on the Pending Reboot Requirement.  Even when I would restart my machine the error would reappear.  Turns out my antivirus software was interfering with the installation process by holding on to certain temp files and registry keys.  The following link shows how I resolved the issue on my machine.  Also, check out VS 2005 Team System’s blog for common symptoms and resolutions for most installation issues. 

Advertisements

July 20, 2005 Posted by | Uncategorized | Leave a comment

The Joel Test

I was reading Joel Spolspky’s Joel on Software and couldn’t help but post one of the excerpts from the book.  Joel Spolsky was one of the few people who worked on the Excel team and the Juno system.  In his book, Joel came up with a list of questions to test the quality of a software team.  Although, the answers to SOME of these questions are extremely obvious; I am sure that not every software team has the aptitude or financial backing to follow these “best practices”.  However, he answers each question with a pragmatic view at what creates good software.  I will have to admit that I did not answer yes to all of these questions but in the future I hope to make these practices into habits of my development efforts.  Feel free to answer or post your own comments on what you think about these questions.  What steps do you follow to maintain sanity and create quality software?

1.  Do you use source control?
Yes! My company’s clients would scream if we didn’t!

2.  Can you make a build in one step?
One? Maybe 2 or 3.  I have leveraged .NET setup projects to simplify deployment before but I would imagine that it does not work seamlessly when deploying large enterprise solutions.  Perhaps Microsoft’s ClickOnce Deployment will streamline the deployment process in VS2005. In fact, check out this demo lab that walks you through ClickOnce!

3.  Do you make daily builds?
Perhaps no, but I can see how important this is when you have > 3 developers on your team.

4.  Do you have a bug database?
If by database you mean Excel Shared Workbooks then Yes.  I think this is a great idea but may require some work to setup.  I am sure there are others but check out BugTracker.NET

5.  Do you fix bugs before writing new code?
Makes sense.  Fix bugs in code while it is still fresh in your mind.   FWFF? (First Written First Fixed)

6.  Do you have an up-to-date schedule?
I sure hope so…Especially if your team lacks a Project Manager.

7.  Do you have a spec?
Do I even need to answer this one?

8.  Do programmers have quiet working conditions?
I think this is very important.  Joel goes into great detail on this one.  He talks about how programmers get into the “zone” and how important it is to work in quiet conditions to think clearly. 

9.  Do you use the best tools money can buy?
Not always, sometimes we have to work with what we have.

10.  Do you have testers?
Not every team, project or budget can support testers.

11.  Do new candidates write code during their interview?
I believe some of our client interviews actually require us to write code.

12.  Do you do hallway usability testing?
Aaah! We did some of this in college and it was very helpful in finding very simple UI design problems.

The other great use of these questions is that they can be used to interview an employer to find out what kind of work environment the company promotes.

July 19, 2005 Posted by | Uncategorized | Leave a comment

Creating Test Certificates with Makecert.exe

If you are developing web services and you need to implement WS-Security with x509 tokens then it is nice to be able to make some test certificates.  Although, Microsoft’s WSE 2.0 installation does include a pair of certificates that represent the client and server tokens, it does not take you far when you need to test multiple WS clients or servers that require multiple certificates. Follow the steps below to create your own public and private portions of a certificate. You will need the makecert tool provided to you by VS.NET 2003. If you have VS.NET 2003 installed then you already have it and to use it you just need to start up the VS.NET 2003 Command Prompt.

Step 1:

C:\makecert -n "CN=TestPublisher" -sky exchange -sv TestPublisher.pvk TestPublisher.cer

The above command creates a certificate with a subject certificate name of TestPublisher and a key type of exchange. I named the CN TestPublisher to represent the web service that is going to be published. The client test certificates could be named TestSubscriber1, TestSubscriber2, etc. Since these certs will be used for testing purposes only, I have used generic names. The -sv *.pvk option generates the private key file with a specific name. This file will be needed later to create the certificate which includes the private key portion. Lastly, *.cer is the filename of the certificate file. You will be prompted to enter a password to protect the private key file. Since this is a test certificate you can choose none or enter something meaningful. BE SURE TO RECORD IT SOMEWHERE! This file contains the certificate with the public portion only. Once the file is created, you may use this file for Request Encryption in your test client applications that represent the subscribers of your web services. Refer to the Makecert documentation for a complete listing of all the basic and extended options that can be used when generating a test certificate.

Step 2:

c:\cert2spc TestPublisher.cer TestPublisher.spc

This step creates a Software Publishing Certificate (SPC) file from your certificate file. An SPC can be used to sign code that is to be distributed to the public. You will need this file for the next step.

Step 3:

c:\pvkimprt -PFX TestPublisher.spc TestPublisher.pvk

In order to perform this step you will need to download PVK Digital Certificates File Importer Tool. This tool allows you to export your private key and certificate(s) to a pfx file which contains the private key portion of your certificate.

When you run the command you will be presented with the Certificate Export Wizard window. You will be prompted for a password if you entered one earlier when creating the *.pvk file. Just click next on the intro window:

a. Click Yes, export the private key. (This option will only appear if the private key is marked as exportable and you have access to the private key.)
b. Choose the default Personal Information Exchange - PKCS #12 (.PFX) Leave the other checkboxes unchecked.
c. At this point, you can enter a password to protect the private key and prevent others from exporting this certificate elsewhere. Since we are generating test certs, you may leave it blank.
d. Specify the filename to export to. For our example, I chose c:\TestPublisher Private.pfx.
e. Voilà! Your certificate file is generated and also installed into the LOCAL MACHINE\Personal store.

IMPORTANT
These certificates should be used for development only. DO NOT USE THEM IN PRODUCTION. Test certs have known to have performance issues so I would advise against using them for performance testing as well. Your performance testing results may become skewed as a result.

In the future, I hope to post an article that uses these certificates in a web service <-> client scenario. There are a couple of ways to implement the usage of the certs (POLICY vs code).

July 14, 2005 Posted by | Security | | Leave a comment

BizTalk WSE Web Service Publishing Wizard woes

BizTalk provides a great way to expose orchestrations to the outside world through web services.  In fact, the SDK provides the BizTalk Web Service Publishing Wizard which generates web service code and even the IIS virtual directory.  If you are using WSE 2.0 as one of your adapters then you can use the BizTalk WSE Web Publishing Wizard.  The following article is very helpful in walking through all the steps required to create a web service with WSE:  Walkthrough for BizTalk Adapter for Web Services Enhancements 2.0

So it may be apparent that workflows can easily be exposed through web services to third parties as long as you follow proper contract first design (more on this later).

My recent contention with the WSE WS Publishing Wizard is that it creates a copy of all the schema definitions and places them in a xsd folder underneath the web service project directory.  I have some serious problems with this because it inhibits the developer from simplyfying deployment.  In other words, every time I make any changes to the BizTalk schemas I have to deploy the schemas to the BizTalk database and also rerun the WS Publishing Wizard.  Why does the xsd folder need to exist anyways? Upon some researching, I found out that the xsd folder and the schemas need to exist in order to generate proper WSDL with all the schema information.  Otherwise the WSDL will just contain part type definitions and your web service subscribers will not be able to generate useful proxy classes.

So why can’t the web service dynamically load the deployed schema assembly? Not sure, Microsoft needs to improve this in BizTalk 2006.  So I decided to use the Reflector for .NET to investigate the Microsoft.BizTalk.Wse assembly and see why the BizTalk team created such a strong binding between the xsd files and WSDL generation.  Turns out that the Microsoft.BizTalk.Wse.WseTransport.WsdlHelper class contains the method AddSchema(ServiceDescription, BizTalkPartTypeAttribute, String) : Boolean with implementation to read the xsd files and embed them in the WSDL.

The following line of code assembles the filename to look for within the xsd folder:
string text1 = attribute.TypeName + “, ” + attribute.AssemblyName +”.xsd”;

The attribute information above is carried in from the BizTalkPartTypeAttribute in the web service code.

For example the following attribute declaration:

[WebMethod()]
public void DoTaxCalculation([BizTalkPartTypeAttribute(TypeName=”XYZCompany.BTServer.SalesTax”, Assembly=”XYZCompany.BTServer”] SoapEnvelope request) {}

results in the WsdlHelper class to look for the following xsd file:
XYZCompany.BTServer.SalesTax, XYZCompany.BTServer.xsd

So far I have not found a workaround for this.  Post here if you find something.

July 5, 2005 Posted by | BizTalk, Web Services | , | Leave a comment

ReSharper

3 posts in one day! I am still in the process of transferring my posts from my other blog so bear with me.  Anyways, if you haven’t already, you should checkout JetBrain’s Resharper tool. It is a great add-in for VS.NET 2003 that enhances intellisense and adds a number of useful features. Just to name a few:
-Refactoring (Organizing imports, shortening namespace references, etc)
-Code completion (a step up from intellisense)
-Surround with (Allows you to template scope blocks such as try…catch, if, etc)

Just a word of caution though, I did notice that the tool creates some files within VS project directories and tends to make it run slow every now and then.  However, I think it is a good trade-off.  Try it out for yourself.

The website offers a free 30-day trial.  I was lucky enough to win a developer’s license at the last .NET user group meeting.

July 3, 2005 Posted by | Visual Studio | | Leave a comment

Mensa’s Challenge

Here it is! This is supposed to be Mensa’s exam to test the wits of millions. Try this quiz out for yourself and see how many phrases you can decode. Remember don’t cheat because you are really lying to yourself. Feel free to post you results or discuss them here. Intrigue me.
Here are the ratings:
1 – 5 – Average
6 – 11 – Somewhat Intelligent
12 – 18 – Intelligent
19 + – Genius

Mensa’s Quiz

July 3, 2005 Posted by | Uncategorized | 1 Comment

Welcome

Welcome to my blog! I finally thought it would be appropriate to log my thoughts somewhere in this cyber-realm. Hopefully this site is of some use to you.

July 3, 2005 Posted by | Uncategorized | | Leave a comment