By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,930 Members | 633 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,930 IT Pros & Developers. It's quick & easy.

Host a Web Service in a Windows Forms Application

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a

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.