473,394 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Host a Web Service in a Windows Forms Application

Hello,

I am making a prototype system with a Pocket PC that must connect to a
Server Application.
Unfortunately, the server cannot be a Web Server, but a simple Windows Forms
Application.

Here is my question:
The only way to easily communicate for a Pocket PC is the Web Service.
Is it possible to host a web service in a Windows Forms Application ?
I have try to register a Remoting Object With HTTP Channel but It seems not
to work.

Here is the code I have try :
public static void StartRemoting() {
ChannelServices.RegisterChannel(new HttpServerChannel(4801),false);
RemotingConfiguration.RegisterWellKnownServiceType (
typeof(MyService),
"MyService",
WellKnownObjectMode.SingleCall );
}

When I try to register the web service by using the URL:
http://theserver.domain:4801/MyService?WSDL
This URL return a well formated XML SOAP Contract but it declare no method
and cannot be consumed.

Thank you for your help.
Dec 9 '05 #1
2 6721
DC
Ok, so you want to connect an app, running on the pocket PC, to another
app, running on a remote PC, and you want to do it via web services.
yes?

and you want to know, can you host web services in a windows forms app?

yes.

have you seen Cassini?
http://www.asp.net/Projects/Cassini/...ndex=0&tabid=1

-Dino

--
-Dino
D i n o . C h i e s a AT M i c r o s o f t . c o m

"Ludovic DE FREITAS" <Lu**************@discussions.microsoft.com> wrote in
message news:BD**********************************@microsof t.com...
Hello,

I am making a prototype system with a Pocket PC that must connect to a
Server Application.
Unfortunately, the server cannot be a Web Server, but a simple Windows
Forms
Application.

Here is my question:
The only way to easily communicate for a Pocket PC is the Web Service.
Is it possible to host a web service in a Windows Forms Application ?
I have try to register a Remoting Object With HTTP Channel but It seems
not
to work.

Here is the code I have try :
public static void StartRemoting() {
ChannelServices.RegisterChannel(new HttpServerChannel(4801),false);
RemotingConfiguration.RegisterWellKnownServiceType (
typeof(MyService),
"MyService",
WellKnownObjectMode.SingleCall );
}

When I try to register the web service by using the URL:
http://theserver.domain:4801/MyService?WSDL
This URL return a well formated XML SOAP Contract but it declare no method
and cannot be consumed.

Thank you for your help.

Dec 13 '05 #2

I have a similiar Problem.

I must Host a WEB-Service in a Windows form Application.

Bute the CASSINI-Example seemed not to be the
solution for me.
In the CASSINI-Example example there is now way,
to get data from the windows-Applictaion to the
WEB-Service !!

Lets assume I need a WEB-Service:
GetOpenWindowName( ) as string

How can I get in the Web-Service the name of the open window
in the Windows forms Application ??
Thanks for any hint
Peter


DC wrote:
[b]Ok, so you want to connect an app, running on the pocket PC, to
another
app, running on a remote PC, and you want to do it via web services.
yes?

and you want to know, can you host web services in a windows forms
app?

yes.

have you seen Cassini?
http://tinyurl.com/bcj8

-Dino

--
-Dino
Hello,

I am making a prototype system with a Pocket PC that must connect

to a
Server Application.
Unfortunately, the server cannot be a Web Server, but a simple

Windows
Forms
Application.

Here is my question:
The only way to easily communicate for a Pocket PC is the Web

Service.
Is it possible to host a web service in a Windows Forms Application

?
I have try to register a Remoting Object With HTTP Channel but It

seems
not
to work.

Here is the code I have try :
public static void StartRemoting() {
ChannelServices.RegisterChannel(new

HttpServerChannel(4801),false);
RemotingConfiguration.RegisterWellKnownServiceType (
typeof(MyService),
"MyService",
WellKnownObjectMode.SingleCall );
}

When I try to register the web service by using the URL:
http://theserver.domain:4801/MyService?WSDL
This URL return a well formated XML SOAP Contract but it declare no

method
and cannot be consumed.


--
peter931
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message2017593.html

Apr 3 '06 #3

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

Similar topics

3
by: Johann Blake | last post by:
I'm developing an application in C# that needs to run as a Windows service. I'm looking for an Internet Service Provider (ISP) to host my application. Since I'm on a shoe-string budget, I can only...
2
by: Fadi | last post by:
Backround: I am trying to figure out how to do the equivalant of a classic COM Local Server Singleton in .NET/C#. I created a coupld of simple Class Libs that exposes public interfaces and hosted...
10
by: Clint | last post by:
Hey all - I'm having a really confusing problem concerning a web service. Right now, I have an application that needs to call a web service that does nothing but return "true" (this will...
6
by: Keith Smith | last post by:
If I design a web application, can I simply upload it up to my ASP host provider? Or would there be something special that would have to be installed on their server? I am trying to decide...
5
by: pberna | last post by:
Dear all, I built a Web Form application to start and stop a Windows Service remotely. I successful tested the application on Windows 2000 server + IIS. I must include the ASPNET user to the...
5
by: david | last post by:
I have developed my web service with a domain name of my computer name and wwwroot directory. I also developed a client of windows form application. It works locally (i.e. in the same machine). ...
2
by: Randall Powell | last post by:
I am in the process of developing a Windows Service which will: (1) monitor multiple network shares; (2) marshal text file transfers into an SQL Server 2000 instance; and (3) provide messaging...
7
by: WhiskRomeo | last post by:
I have a WIN .NET application that calls a web service to retrieve data. I deployed the application to a server and configured the webservice. The webservice and SQL Server 2000 database are on...
4
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.