Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Indigo

Vista - How to start up an indigo project

 
 
Old 05-05-2006   #1 (permalink)
DathGuru


 
 

How to start up an indigo project

It is very interesting to learn the features of "Indigo" . However,
no idea about how to begin a project on Indigo.

Recently i installed WinFX 3.0 February CTP Beta edition . Even after
going through many websites about indigo and the msdn location i did not find
any clue as to how to begin an indigo application in visual studio.

Concept of declaring ServiceContracts, DataContracts , Endpoints are all
fine . But the file structure of an indigo application is confusing me.

Should it be a web service project or a set up project and what should
we save the file which contains the ServiceContracts i.e should it be a .cs
file extension or .svc file extension and in what way can we debug these
applications. This is probly the question of many people.

How do we include the reference of such service files in the clients ?
Is it the same as adding web references to web sites ?

Please let me know how to go about with Visual Studio 2005 to develop
an Indigo application.

The later part of the story looks good enough only if we are able to
start up with the basics.


My System SpecsSystem Spec
Old 05-09-2006   #2 (permalink)
jeffhwa@gmail.com


 
 

re: How to start up an indigo project

You can install Windows SDK CTP, it includes samples for WCF (Indigo).
You can start your project from a sample which is most similar.

And you can also refer to "Programming Indigo", written by David Pallmann:

http://www.amazon.com/gp/product/073...lance&n=283155

Although a little out of date, the basic concept can be well referenced.

I develop my first Indigo application in these steps:

Service Side

1. Define service interface (Contract)

2. Hosting service and service configuration (Binding)

Self hosting and imperative binding here. No config file and .svc file.

then, the client can generate proxy code from service

3. Implement service operations


Client Side:

1. Generate proxy code by svcutil

2. Writing UI framework

3. Implement functions

Visual Studio 2005 does not support Indigo development yet. You can download Visual Studio Code Name "Orcas" CTP to develop Indigo
Application.

In my point of view, Indigo Development is much easier than origin web service development.


-----Original Message-----
From: DathGuru
Posted At: Friday, May 05, 2006 6:07 PM
Posted To: microsoft.public.windows.developer.winfx.indigo
Conversation: How to start up an indigo project
Subject: How to start up an indigo project


It is very interesting to learn the features of "Indigo" . However,
no idea about how to begin a project on Indigo.

Recently i installed WinFX 3.0 February CTP Beta edition . Even after
going through many websites about indigo and the msdn location i did not find
any clue as to how to begin an indigo application in visual studio.

Concept of declaring ServiceContracts, DataContracts , Endpoints are all
fine . But the file structure of an indigo application is confusing me.

Should it be a web service project or a set up project and what should
we save the file which contains the ServiceContracts i.e should it be a .cs
file extension or .svc file extension and in what way can we debug these
applications. This is probly the question of many people.

How do we include the reference of such service files in the clients ?
Is it the same as adding web references to web sites ?

Please let me know how to go about with Visual Studio 2005 to develop
an Indigo application.

The later part of the story looks good enough only if we are able to
start up with the basics.
My System SpecsSystem Spec
Old 05-09-2006   #3 (permalink)
Mike Russo


 
 

RE: How to start up an indigo project

For starters, here's my development environment:
WinXP SP2, Visual Studio 2005 Team Edition for Software Developers, IIS,
WinFX Runtime 3.0 Beta 2 (Feb CTP), Windows SDK for WinFX Feb CTP,
Visual Studio 2005 Extensions for WinFX Feb CTP

The approach I'm using is to create two Visual Studio solutions: one for
services and one for
clients. This will make it easier to debug both server and client
simultaneously.

SERVICE SOLUTION
Create a new web site service app and a solution to hold it:
File > New > Web Site...
select WinFX Service
Enter location and language, hit OK
A project is created with Service.svc, Service.cs, and Web.config with
service name = MyService and endpoint contract = IMyService


Open IIS management console and right-click on your new service's web site,
then click
Properties. On the Directory tab, make sure it has an Application name
entered. If not,
you might be able to click on the Remove button, followed by clicking on the
create
button (the same physical button) to have an Application Name assigned.Next,
go to the Documents tab and add "Service.svc" to
the list of default documents for this website. Click OK.

At this point, you should be able to view your service in a browser. For
instance,
enter a URL something like:
http://localhost/<website_name>/Service.svc
or
http://localhost/<website_name>/Service.svc?wsdl
Or from IIS, right-click on the website name and select Browse.
A page should appear with the name of your service (e.g., MyService Service)
and some
sample code on how to use a proxy to access it.

NOTE that this step of "hitting" your service from a browser has the
side-effect of
loading the service's debug symbols, which will make it possible to debug
the service
from Visual Studio.

Close the solution.


WINDOWS APP CLIENT SOLUTION
Create a new Windows App and solution to hold it:
File > New > Project...
Select Visual C# or Visual Basic > Windows > Windows Application
Enter Name and location, hit OK
A project is created with Form1.cs and Program.cs.

Add a reference to System.ServiceModel:
Right-click on the client project in Solution Explorer and click on Add
Reference...
On the .NET tab, select System.ServiceModel, click OK

Add a Service Reference:
Right-click on the client project in Solution Explorer and click on Add
Service Reference...
In the URL box, enter the URL of your service. E.g.,
http://localhost/<service_website_name>/Service.svc
In the Service Reference name box, enter an arbitrary name to identify
the service.
(This name will be used to name the auto-generated .map and proxy code
file as well as
the namespace used in the proxy code file.)

The final steps show an example of using one of the service's operations to
populate a textbox
in the client app:
Open Form1 in the designer and add a textbox control.
View the code for Form1 and add some code to the Form1 constructor (after
InitializeComponent()) to populate the textbox. For example:

using (WindowsApplication1.svc.MyServiceProxy proxy = new
WindowsApplication1.svc.MyServiceProxy())
{
// Use the 'proxy' variable to call methods on the service.
textBox1.Text = proxy.MyOperation1("WCF");
}

(Note that my client project name is WindowsApplication1, the service
reference name I used
when adding the service reference was svc, and I used the auto-generated
service operation
named MyOperation1.)

Now you should be able to run your client application and see the textbox
filled with "Hello: WCF".

Of course that would be too easy for it to work the first time (you might be
luckier than me).
When I run the client at this point, I get an unhandled ProtocolException
pop-up with a 504 Proxy Timeout.
And so I have to edit my client's service.map file. When the Add Service
Reference step creates this file
from the http://localhost URL that I gave it, it resolves the localhost name
to be the fully-qualified
network name for my computer. This name doesn't fly for whatever name
resolution-related reason that's
giving it gas. So I have to change the URL in the "<Endpoint Address=" back
to the original
"http://localhost" form. I have to do the same in the client's app.config
file for the
"<client><endpoint address=" value.

At this point, hopefully, it should run for you.

Beware also that when you modify your service and do the "Update Service
Reference" command from the
right-click menu of the client's .map file, these endpoint addresses will be
set back to the fully-qualified
computer name and you'll have to repair them yet again.


WEB APP CLIENT
So far I haven't been able to create a web app that can make use of the
service. Perhaps
someone out there can help. For starters, the right-click menu for an
ASP.NET website project
does not have an "Add Service Reference" command. Trying the "Add Web
Reference" command, instead,
fails. Also, trying to add the System.ServiceModel reference has no effect.

My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Project Server 2007 installation does not start: license problem .NET General
IE doesnt start when running a VS2008 web project .NET General
In any project, Can't we refer classes directly, (without addingphysically in the project)? .NET General
Microsoft Advances Its Project Management Technology and the Project Management Profession Vista News


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46