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

Async Web Service calls and Shareware Starter Kit

P: n/a
Hi,
First of all, thanks for a great starter kit, now If I could just get
it to work (fully).
I am trying to compile and run the solution/services all on a local dev
box.
I am able to successfully run most of the SampleApp features
(Register,Feedback,Error report, version check)
The only method I can not execute is the BuyNow example.
I have tried leveraging the Sharewarestarterkit.com web service to rule
out locality, to no avail.

The exception occurs as a result of calling this method:
-----------------------------------------------------------------------------------------------------

m_webservice.GetLicenseAsync(Client.Properties.Set tings.Default.ProductName,
m_datastore.UniqueMachineID,
buyNowInfo.LicenseLevel,
buyNowInfo.Invoice,
Client.Properties.Settings.Default.DevToken,
m_datastore.UniqueMachineID);
-----------------------------------------------------------------------------------------------------
when the following delegate is called (assume triggered by async
completion / failure )...
-----------------------------------------------------------------------------------------------------
m_webservice.GetLicenseCompleted += new
GetLicenseCompletedEventHandler(_webservice_GetLic enseCompleted);

-----------------------------------------------------------------------------------------------------
the exception contained in the args value passed into the delegate from
the async web request is this:
-----------------------------------------------------------------------------------------------------
- args {Client.SskWebService.GetLicenseCompletedEventArgs } Client.SskWebService.GetLicenseCompletedEventArgs
+ base {Client.SskWebService.GetLicenseCompletedEventArgs } System.ComponentModel.AsyncCompletedEventArgs
{Client.SskWebService.GetLicenseCompletedEventArgs }
- Result 'args.Result' threw an exception of type
'System.Reflection.TargetInvocationException' string
{System.Reflection.TargetInvocationException}
- base {"An exception occurred during the operation, making the result
invalid. Check InnerException for exception
details."} System.ApplicationException
{System.Reflection.TargetInvocationException}
- base {"An exception occurred during the operation, making the result
invalid. Check InnerException for exception
details."} System.Exception
{System.Reflection.TargetInvocationException}
+ Data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary
{System.Collections.ListDictionaryInternal}
HelpLink null string
- InnerException {"Unable to connect to the remote
server"} System.Exception {System.Net.WebException}
+ [System.Net.WebException] {"Unable to connect to the remote
server"} System.Net.WebException
+ Data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary
{System.Collections.ListDictionaryInternal}
HelpLink null string
- InnerException {"The attempted operation is not supported for the
type of object referenced"} System.Exception
{System.Net.Sockets.SocketException}
+ [System.Net.Sockets.SocketException] {"The attempted operation is
not supported for the type of object
referenced"} System.Net.Sockets.SocketException
+ Data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary
{System.Collections.ListDictionaryInternal}
HelpLink null string
+ InnerException null System.Exception
Message "The attempted operation is not supported for the type of
object referenced" string
Source "System" string
StackTrace " at System.Net.Sockets.Socket.get_ConnectEx()\r\n at
System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean
flowContext, AsyncCallback callback, Object state)\r\n at
System.Net.Sockets.Socket.UnsafeBeginConnect(EndPo int remoteEP,
AsyncCallback callback, Object state)\r\n at
System.Net.ServicePoint.ConnectSocketInternal(Bool ean connectFailure,
Socket s4, Socket s6, Socket& socket, IPAddress& address,
ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout,
Exception& exception)" string
+ TargetSite {ConnectExDelegate
get_ConnectEx()} System.Reflection.MethodBase
{System.Reflection.RuntimeMethodInfo}
+ Static members
+ Non-Public members
Message "Unable to connect to the remote server" string
Source "System.Web.Services" string
StackTrace " at
System.Web.Services.Protocols.WebClientAsyncResult .WaitForResponse()\r\n
at
System.Web.Services.Protocols.WebClientProtocol.En dSend(IAsyncResult
asyncResult, Object& internalAsyncState, Stream& responseStream)\r\n
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.InvokeAsyncCallback(IAsyncResult
result)" string
+ TargetSite {System.Net.WebResponse
WaitForResponse()} System.Reflection.MethodBase
{System.Reflection.RuntimeMethodInfo}
+ Static members
+ Non-Public members
Message "An exception occurred during the operation, making the
result invalid. Check InnerException for exception details." string
Source "System" string
StackTrace " at
System.ComponentModel.AsyncCompletedEventArgs.Rais eExceptionIfNecessary()\r\n
at Client.SskWebService.GetLicenseCompletedEventArgs. get_Result() in
I:\\SSK1\\SSK1\\Client\\Web
References\\SskWebService\\Reference.cs:line 851" string
+ TargetSite {Void
RaiseExceptionIfNecessary()} System.Reflection.MethodBase
{System.Reflection.RuntimeMethodInfo}
+ Static members
+ Non-Public members
results null object[]

one strange thing is that if I change it to a synchronous call, it
seems to get a result...
below is the messagebox content when I just display the synch call
returned data.

---------------------------
<?xml version="1.0" encoding="utf-16"?>
<LicenseResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ClientIdentity>J8e0WUa7AAjPzBUNoi69OYEfChg=</ClientIdentity>
<LicenseLevel>Standard</LicenseLevel>
<Product>Shareware Starter Kit</Product>

<AuthenticatedLicense>d737HtAIRJxSp48cfZ/a2lfBwF25Yj6mrNcivr+sFjKhLg3q5aZev8Gi7NFJWjXGhBkZB 8MSLMTFgGtKgB3mkpK/s6k29/fQyPUqJH7g+p6tiel2G9AspnjfVmg6gZ4hzp7h342LUOoxWktY sSb/6hTHUgL8D5n0CypFlJ7kAzc=</AuthenticatedLicense>
</LicenseResponse>
---------------------------
OK
All of the other service calls work, so I am a bit confused.
I am unable to step into the web service code during the call so Im not
sure where to go from here.

Does anyone have any ideas as what I can check, or look into?

Thanks for any Help
David Johnson
-----------------------------------------------------------------------------------------------------

Jan 15 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.