473,513 Members | 2,658 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# Web Service to access from ASP.NET & desktop VC++

I want to develop some data access web services in C# that can be accessed
from both an ASP.NET web application as well as a VC++ desktop application.
i have used web services in the past from VC++ by using the WSDL file
provided by the web service.

We are migrating our application to the web but still want to be able to
access the SQL Server database using the same data access layer.

What is the best way to create the web service so that it can be easily
accessed from VC++ desktop app and still be able to leverage all the web
support built in for web presentation layer data access?

Regards

Rob C
Nov 21 '06 #1
1 2454
Hi,

Rob C wrote:
I want to develop some data access web services in C# that can be accessed
from both an ASP.NET web application as well as a VC++ desktop application.
i have used web services in the past from VC++ by using the WSDL file
provided by the web service.

We are migrating our application to the web but still want to be able to
access the SQL Server database using the same data access layer.

What is the best way to create the web service so that it can be easily
accessed from VC++ desktop app and still be able to leverage all the web
support built in for web presentation layer data access?

Regards

Rob C
Any web service created in Visual Studio with .NET will automatically
provide a WSDL file describing the interface. If your VC++ is able to
read the WSDL file and create the corresponding proxies, then you should
be fine.

You create a web service in .NET by creating a web service project (or a
web application project, and then adding a web service component), and
implementing public methods, marking them with the [WebMethod]
attribute. Just add a web service to your application, and it's pretty
well explained inside the file itself. There are things you can
optimize, but it's the basics.

Additionally, consuming a web service from a .NET application (also
ASP.NET application, server-side) is as easy as adding a web reference
to your web service (this will read the WSDL file and create the proxy)
and then use the created proxy (almost) as if it was a local class.
Almost because if the request is asynchronous (recommended), it's
slightly different.

If you want to consume the web service on the web client itself using
JavaScript, you should take a look to ASP.NET AJAX (ex codename ATLAS).

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Nov 21 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3558
by: Juan Manuel Alegrķa B. | last post by:
Hi group I have been making a windows service to execute an external application. I use a timer control, I can execute the application but does't appear as a normal windows, just I see it in the...
0
3713
by: TheCoder | last post by:
I am making a D-base with web conectivity for my class project. I have everything working but the subit button sends the data to the correct fields but afterwards it wants to reproduce new blank...
1
5657
by: Artur Kowalski | last post by:
I have a NotifyIcon in my Windows Service project and I am trying to add a ContextMenu to this NotifyIcon or use some of the mouse events. Everything isn't working. I think so base class of the...
6
3031
by: Bijesh | last post by:
Hi All, I've developed a Windows Service that acts as a remoting server (.NET Remoting). The client(user) is able to connect to the server and start a program by giving the executable path of...
1
2991
by: MAL | last post by:
Hello, I have 2 classes that work great as a windows app to retrieve and process data from an Oracle9i db. When I implement them in a Service program running as Local System, it fails on the...
3
4586
by: Lubomir | last post by:
Hi, I read that interactive windows services will not be allowed to run under Wista. I would like to ask what exactly is the interactive service. It is supposed to be a service that communicates...
5
2295
by: Jeff Richardson | last post by:
I am creating a web service that returns data from an Access 2000 database using VS2005. The Access database is located on a different server than where the web service is running. The Access...
6
6448
by: uuyytt | last post by:
I have a Windows service from which I want to start Internet Explorer with a particular URL as an argument. I don't know why my code (shown below) doesn't work. I know that IExplore.exe starts as I...
41
11591
by: pbd22 | last post by:
Hi. I know my windows service works when i run it in debug mode on my dev machine. It also works in release mode on my dev machine. But, when I move the service to a production server, it...
0
7157
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7521
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5084
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1591
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.