Creating Self-Updating Applications With the .NET Compact Framework
Alex Feinman
OpenNETCF.org
December, 2003
Applies to:
Microsoft® .NET Compact Framework 1.0
Microsoft Visual Studio® .NET 2003
Summary: Learn to create self-updating applications using .NET Compact Framework. (9 printed pages)
================================================================
Regarding the above article on MSDN, I am having trouble getting this to work.
I am writting the application in C# and I have no problems with the getting the app to check the MyApp Assembly for the version / build etc. However the problem I am having is not being able to call the web service successfully, I have followed the code exactly as I should but I am getting an exception error thrown in the web reference.cs file that VS.NET auto generates.
Has anyone successfully gotten this app to work?
I could really use the help.
Note below is the exact point the app is throwing the webservices.dll
exception.
================================
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.573
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by Microsoft.VSDesigner, Version 1.1.4322.573.
//
namespace Update.UpdateSrvc {
using System.Diagnostics;
using System.Xml.Serialization;
using System;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Web.Services;
/// <remarks/>
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="updateSoap", Namespace="http://tempuri.org/")]
public class update : System.Web.Services.Protocols.SoapHttpClientProtocol {
/// <remarks/>
public update() {
this.Url = "http://localhost/srvUpdate/update.asmx";
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetUpdateInfo", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public UpdateInfo GetUpdateInfo(string name, string platform, string arch, int maj, int min, int bld) {
object[] results = this.Invoke("GetUpdateInfo", new object[] {
name,
platform,
arch,
maj,
min,
bld});
return ((UpdateInfo)(results[0])); ******//This is where my code is breaking. ********
***** for some reason it can't return the result of strings.
}
/// <remarks/>
public System.IAsyncResult BeginGetUpdateInfo(string name, string platform, string arch, int maj, int min, int bld, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetUpdateInfo", new object[] {
name,
platform,
arch,
maj,
min,
bld}, callback, asyncState);
}
/// <remarks/>
public UpdateInfo EndGetUpdateInfo(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((UpdateInfo)(results[0]));
}
}
/// <remarks/>
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
public class UpdateInfo {
/// <remarks/>
public string Url;
/// <remarks/>
public bool IsAvailable;
/// <remarks/>
public string newVersion;
}
}
// end of file
I'd appreciate any help on this.
regards,
Cam_MCAD