469,596 Members | 2,241 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,596 developers. It's quick & easy.

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 6495
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Johann Blake | last post: by
6 posts views Thread by Keith Smith | last post: by
5 posts views Thread by david | last post: by
4 posts views Thread by tshad | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.