using different versions of .NET and .CF

G

Guest

Hi!

Is it possible to write ASP.NET web-service in let's say VS2003 that uses
..NET 1.1 and then write an aplication that would consume that web service in
let's say VS2005 that uses .NET 2.0?

I'm currently writing web-service (in Delphi 2006 that uses .NET 1.1) and a
smart-clinet (win CE5) (in VS2005 that uses .NET 2.0 and CF 2.0) and I have
errors when I try to compile the smart-client application.
Is this due to the different versions of .NET?

Thanks and best regards,
Smiljan
 
R

Robert Wachtel

Hi!

Recently I've done some webservices in Delphi 2005/Net 1.1 and a CF 2
application that consumes that webservices w/o any problems. What kind of
errors do you get?

Robert
 
G

Guest

Hi!

I get this:
"WebException was unhandled. Could not establish connection to network."
in his (VS2005) file Reference.cs:

[System.Web.Services.Protocols.SoapDocumentMethodAttribut
("http://tempuri.org/ReturnDataset", RequestNamespace="http://tempuri.org/",
ResponseNamespace="http://tempuri.org/",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]

public DataSet1 ReturnDataset() {
object[] results = this.Invoke("ReturnDataset", new object[0]);
<--here!!!
return ((DataSet1)(results[0]));
}

Task:Web-service is trying to send data to client in a DataSet object.

Project compiles OK. The error happens when I click the button where I call
the Web-reference method:
private void button1_Click(object sender, EventArgs e)
{
localhost.TWebService1 service = new localhost.TWebService1();
localhost.DataSet1 ds = service.ReturnDataset(); <-- ERROR!!!
}

Anything will help.
Thanks,
Smiljan
 
R

Robert Wachtel

Hi Smiljan!

To me this looks like a network connection problem. From time to time I get
such errors when the wlan signal disappears. In my applications I'll catch
those errors, give a warning message to the user and log the error in a
local xml file on the mobile device. I leave it up to the user to try again.

hth

Robert
 
G

Guest

Hi Robert!

Thanks on so quick reply.
By now I've done some additional test. I've created simple Windows appl in
VS2005 and used web-service -> it worked ok and I got data and displayed it
in a data-grid.
Then I created new Smart-device (CE 5.0 and PocketPC) application with the
same code and -> SAME PROBLEM!
I'm testing on a emulator (CE 5.0 and PocketPC) in VS2005 -> is it possible
that I have to configure something on emulator?

Thanks again,
Smiljan


Robert Wachtel said:
Hi Smiljan!

To me this looks like a network connection problem. From time to time I get
such errors when the wlan signal disappears. In my applications I'll catch
those errors, give a warning message to the user and log the error in a
local xml file on the mobile device. I leave it up to the user to try again.

hth

Robert

Smiljan said:
Hi!

I get this:
"WebException was unhandled. Could not establish connection to network."
in his (VS2005) file Reference.cs:

[System.Web.Services.Protocols.SoapDocumentMethodAttribut
("http://tempuri.org/ReturnDataset",
RequestNamespace="http://tempuri.org/",
ResponseNamespace="http://tempuri.org/",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]

public DataSet1 ReturnDataset() {
object[] results = this.Invoke("ReturnDataset", new object[0]);
<--here!!!
return ((DataSet1)(results[0]));
}

Task:Web-service is trying to send data to client in a DataSet object.

Project compiles OK. The error happens when I click the button where I
call
the Web-reference method:
private void button1_Click(object sender, EventArgs e)
{
localhost.TWebService1 service = new localhost.TWebService1();
localhost.DataSet1 ds = service.ReturnDataset(); <-- ERROR!!!
}

Anything will help.
Thanks,
Smiljan
 
R

Robert Wachtel

Hi Smiljan!

How do you connect the emulator and which version of ActiveSync do you use?
In Visual Studio 2005 under menu "Tools" there is a menu item "Device
Emulator Manager". Try to cradle the emulated PocketPC to establish a TCP/IP
connection via ActiveSync to your host (as indicator you should then be able
to browse the internet with the emulated PocketPC's Internet Explorer (given
your host has www access, of course <g>)). This should give your PocketPC
application also access to your WebService.

hth

Robert
 
I

Ilya Tumanov [MS]

Have you altered URL to use actual WS host name and not the localhost?

--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

Smiljan said:
Hi!

I get this:
"WebException was unhandled. Could not establish connection to network."
in his (VS2005) file Reference.cs:

[System.Web.Services.Protocols.SoapDocumentMethodAttribut
("http://tempuri.org/ReturnDataset",
RequestNamespace="http://tempuri.org/",
ResponseNamespace="http://tempuri.org/",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]

public DataSet1 ReturnDataset() {
object[] results = this.Invoke("ReturnDataset", new object[0]);
<--here!!!
return ((DataSet1)(results[0]));
}

Task:Web-service is trying to send data to client in a DataSet object.

Project compiles OK. The error happens when I click the button where I
call
the Web-reference method:
private void button1_Click(object sender, EventArgs e)
{
localhost.TWebService1 service = new localhost.TWebService1();
localhost.DataSet1 ds = service.ReturnDataset(); <-- ERROR!!!
}

Anything will help.
Thanks,
Smiljan


Robert Wachtel said:
Hi!

Recently I've done some webservices in Delphi 2005/Net 1.1 and a CF 2
application that consumes that webservices w/o any problems. What kind of
errors do you get?

Robert
 
G

Guest

Hi Robert!

I have been testing since your last reply. You are right - there is
something wrong with the connection to the computer with IIS.
But I still can't resolve the problem. I tested in two ways - with emulator
and with the real PocketPC. In both cases I get the same error. Even if I
open Internet Explorer in both cases I can't open the link (web-reference).
Can you advise me on what to do next? Seems like security problem on IIS (I
can open the web-reference address on the machine with IIS normaly).
My PocketPC is connected via USB cable to this PC (cradle).

And one more request ; ) Could you be so nice and share some code on what to
do when link to IIS is lost.

Thanks and best regards,
Smiljan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top