Pierre Greborio.NET

Talking about .NET world
Indigo Proxy Generator AddIn - Update
I fixed many bugs on my Indigo Proxy Generator AddIn. You can find source code and binaries here.
Posted: Aug 01 2005, 06:30 PM by PierreG | with 2 comment(s)
Filed under:
Indigo ServiceTester

To test Indigo service you have to generate a proxy class and then write code for calling the proxy. It should be nice to have something like Web Service Studio. I started a simple project similar to the Indigo proxy generator where you can test an Indigo service quite easly. Here is the first screenshot:

 

The tool is really at an early stage, but I hope to have a first beta in few weeks. Stay tuned :-)

Posted: Jun 24 2005, 05:17 PM by PierreG | with 1 comment(s)
Filed under:
Indigo designer

I am considering to implement a SDM for Indigo. The idea is to have an application model which defines the Indigo services host application (IIS, Windows Services, WAS, console application, windows application, ...) and two endpoint models (Indigo service and Indigo client).

Since I think it's quite hard to do and could take some time, it could be nice to create a gotdotnet workspace (only if somebody else is interested). Do you think it's a bad idea ?

Posted: Jun 15 2005, 04:15 PM by PierreG | with 2 comment(s)
Filed under:
Indigo Proxy Generator AddIn - deployment

Christian noticed me that there was some problems on the deployment of the addin. He has completely right, the registration.txt file is wrong (sorry!).

Well, to register the addin correctly you have to copy the following files:

  • IndigoProxyGenerator.AddIn
  • IndigoProxyGenerator.dll
  • Interop.EnvDTE.dll
  • Interop.EnvDTE80.dll

under the folder C:\Documents and Settings\[Your username]\Application Data\Microsoft\MSEnvShared\Addins.

I'll update the deployment file soon. Thanks Christian :-)

Posted: Jun 15 2005, 02:53 PM by PierreG | with no comments
Filed under:
Indigo Proxy Generator AddIn - Update
The proxy generator is going ahead (hopefully). Now I added several svcutil switches like XSD support, mark the class as serializable, data bound support etc. Moreover now you can generate ASP.NET web service proxy using the Xml Serializer. All comments are welcome
Posted: Jun 13 2005, 12:44 PM by PierreG | with 1 comment(s)
Filed under:
Indigo Proxy Generator AddIn - Update

In my last post I introduced an AddIn for Visual Studio .NET 2005 beta 2 for generating an Indigo proxy class from the IDE. As explained in the post, several configuration settings didn't work. I updated the source code and now everything works (or should be!). Note that I didn't tested seriously the tool then you could find some issues (please email me them).

Any feedback is welcome.

Posted: Jun 08 2005, 03:17 PM by PierreG | with no comments
Filed under:
Indigo Proxy Generator AddIn

During these days I'm playing with Visual Studio 2005 extensibility and Indigo. My first and basic objective was to create something similar to the "Add Webreference..." tool for an Indigo Service. My job isn't actually completed but I post the actual version (early alpha) in order to have some feedback (if you want :-)) ).

After installing the AddIn in Visual Studio 2005 beta 2, you can invoke the tool selecting the menu item "Indigo Proxy Generator" as shown following:

Indigo Proxy Generator menu item

Then the configuration form appear:

Indigo Proxy Generator configuration

 

You can set the Indigo service metadata URI, select the project where you want to add the proxy class, define the classname and the class namespace and finally the path where to save the file. The checkbox permits to define how the proxy class will be generated.

Please note that in this early version some configuration parameters doesn't works: The class name and namespace aren't reflected into the source code. Even if you check "Generate configuration section" no .config file will be generated.

Any feedback to pierre at pierregreborio dot it is appreciated.

Posted: Jun 07 2005, 04:41 PM by PierreG | with 13 comment(s)
Filed under:
[Indigo] Generate contract code from the program

Christian shows how to generate the c# service contract code giving wsdl, xml schema, and policies files. If you already have an Indigo service running and you need to generate from your program the contract code, you can use the same Christian's code and simply use System.ServiceModel.MetadataResolver class in order to get all the service metadata information:

MetadataResolver resolver = new MetadataResolver(new EndpointAddress(uri));
// I use HTTP/Get to get from the service its metadata
ServiceEndpointCollection endpoints = resolver.RetrieveEndpointsUsingHttpGet();

// Christian's code....
ServiceContractGenerator generator = new ServiceContractGenerator();
Collection<ContractDescription> contracts = resolver.WsdlImporter.ImportAllContracts();
foreach (ContractDescription contract in contracts)
{
  generator.GenerateServiceContractType(contract);
}

using (StreamWriter writer = new StreamWriter(File.Create("Contracts.cs")))
{
  new Microsoft.CSharp.CSharpCodeProvider().GenerateCodeFromCompileUnit(
   generator.TargetCompileUnit, writer,
   new System.CodeDom.Compiler.CodeGeneratorOptions());
}

 

Posted: May 29 2005, 01:48 AM by PierreG | with no comments
Filed under:
Unpivot transformation with SQL server 2005 Integration Services

During the past week I played a little bit with SQL Server 2005 Integration Services in order to understand some basic concepts. As usually I do, I start with some 'real' cases I have in other contexts and try to understand how to do with the new technology. The problem was pretty simple, normalize a denormalized flat file. Consider a flat file containing the following data (content is fictious):

Date;USD;EUR;JPY
12/12/2004;1.2332;1;23.32

I have to create another flat file (just as sample) like following:

date;Currency;Price
12/12/2004;USD;1.2332
12/12/2004;EUR;1
12/12/2004;JPY;23.32

So, I created one flat file source and one flat file destination with the structire as above. Then I placed an Unpivot Transformation component linked to the flat file components with the following settings:

  • Input Column: USD, EUR, JPY, ... (all columns except Date)
  • Data Column: Price (all the same)
  • Pivot Value as Input Columns
  • Pivot value column name: Currency

Run the package and everything works fine. I have to thank Ashvini Sharma for his valuable help.

Posted: May 20 2005, 05:55 PM by PierreG | with no comments
Filed under:
Windows Impersonation in ASP.NET

There are several scenario where you have to use the impersonation in ASP.NET. Consider, for example, you have to save and load files from a network share (file server). In that case, if the web site accept anonymous authentications, you have to impersonate a windows user who has enought privileges to access to that resource.

You have three choices (I guess):

  1. Elevate the ASP.NET process identity - worse case since you could compromise the whole site security
  2. Impersonate a windows user during the single call (http://blogs.msdn.com/shawnfa/archive/2005/03/22/400749.aspx)
  3. Demand the task to a COM+ server application

I think that the last is the best since we have more security and maintenance control.

Posted: Apr 10 2005, 12:02 PM by PierreG | with 4 comment(s)
Filed under:
More Posts « Previous page - Next page »