I try connect to secure server and connection doesn't work. My project on
Visual Studio 2005, Compact Framework 2.0 platform. Function getRegions I
use from Web References. Error message: "Could not establish connection to
network".
Is anybody know what is wrong? It doesn't send request at all.
private void cmdExecute_Click(object sender, EventArgs e)
{
RegionRequest request = new RegionRequest();
sUserName = txtUserName.Text;
sPassword = txtPassword.Text;
request.token = txtToken.Text;
StallInfoServiceWrapper service = new StallInfoServiceWrapper();
service.securityHeader = new OpenNETCF.Web.Services2.SecurityHeader();
service.securityHeader.UsernameToken = new
OpenNETCF.Web.Services2.UsernameToken(sUserName, sPassword,
OpenNETCF.Web.Services2.PasswordOption.SendPlainText,
OpenNETCF.Web.Services2.EncodingType.HexBinary);
RegionType[] result = service.getRegions(request);
}
//-----------------------
public class StallInfoServiceWrapper :
com.digitalpaytech.sandbox.StallInfoService
{
public OpenNETCF.Web.Services2.SecurityHeader securityHeader;
[SoapHeader("securityHeader")]
[OpenNETCF.Web.Services2.HeadersExtension()]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://ws.digitalpioneer.com/stallInfo/getRegions",
Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle
= System.Web.Services.Protocols.SoapParameterStyle.Bare)]
[return: System.Xml.Serialization.XmlArrayAttribute("RegionResponse",
Namespace = "http://ws.digitalpioneer.com/stallInfo")]
[return: System.Xml.Serialization.XmlArrayItemAttribute("regions", Form =
System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)]public new
RegionType[]
getRegions([System.Xml.Serialization.XmlElementAttribute(Namespace =
"http://ws.digitalpioneer.com/stallInfo")] RegionRequest RegionRequest)
{
object[] results = this.Invoke("getRegions", new object[] {
RegionRequest});
return ((RegionType[])(results[0]));
}
}
Simon Hart [MVP] - 16 May 2008 08:06 GMT
Firstly ensure you can see the network. Try using Pocket IE to connect to the
web server on your remote machine.
As a side note you know camelCasing shouldn't really be used in .NET.

Signature
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com
> I try connect to secure server and connection doesn't work. My project on
> Visual Studio 2005, Compact Framework 2.0 platform. Function getRegions I
[quoted text clipped - 45 lines]
> }
> }
Nina - 16 May 2008 14:32 GMT
Do I have to install Pocket IE on my computer?
Looks like it doesn't design to run on Windows XP.
> Firstly ensure you can see the network. Try using Pocket IE to connect to the
> web server on your remote machine.
[quoted text clipped - 50 lines]
> > }
> > }
Simon Hart [MVP] - 16 May 2008 14:53 GMT
What device are you trying to run this code on?

Signature
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com
> Do I have to install Pocket IE on my computer?
> Looks like it doesn't design to run on Windows XP.
[quoted text clipped - 53 lines]
> > > }
> > > }
Nina - 16 May 2008 15:04 GMT
I'm working on PC right now using Mobile 6 Emulator.
My connection from Windows application using Microsoft.Web.Services3
is working but on Mobile development I use OpenNETCF.Web.Services2
and it doesn't give me any errors but don't establish connection and doesn't
sent a request.
> What device are you trying to run this code on?
>
[quoted text clipped - 55 lines]
> > > > }
> > > > }
Simon Hart [MVP] - 16 May 2008 15:11 GMT
Pocket IE should be part of the WM6 image. Look in programs. Try and access
your desktop web server. Usually these problems are connectivity issues. ie:
http://169.254.2.2/iishelp.

Signature
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com
> I'm working on PC right now using Mobile 6 Emulator.
> My connection from Windows application using Microsoft.Web.Services3
[quoted text clipped - 61 lines]
> > > > > }
> > > > > }
Nina - 16 May 2008 15:44 GMT
I checked connectivity. It works. I use Network Protocol Analyzer Ethereal to
see status of connection and it shows successful connection when I just
refresh web references in my application. But when I actually run an
application no request from my PC is sending.
> Pocket IE should be part of the WM6 image. Look in programs. Try and access
> your desktop web server. Usually these problems are connectivity issues. ie:
[quoted text clipped - 65 lines]
> > > > > > }
> > > > > > }
Simon Hart [MVP] - 19 May 2008 21:36 GMT
You might find this link useful if you are using SSL on WM6:
http://blogs.msdn.com/andrewarnottms/archive/2007/11/19/why-net-compact-framewor
k-fails-to-call-some-https-web-servers.aspx

Signature
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com
> I checked connectivity. It works. I use Network Protocol Analyzer Ethereal to
> see status of connection and it shows successful connection when I just
[quoted text clipped - 70 lines]
> > > > > > > }
> > > > > > > }
Nina - 20 May 2008 13:43 GMT
Thank you, Simon
I found why it didn't work. It doesn't work with emulator. It only works
with real device.
> You might find this link useful if you are using SSL on WM6:
> http://blogs.msdn.com/andrewarnottms/archive/2007/11/19/why-net-compact-framewor
k-fails-to-call-some-https-web-servers.aspx
[quoted text clipped - 73 lines]
> > > > > > > > }
> > > > > > > > }