Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2.0.9 issues
vasudevan
#1 Posted : Saturday, August 16, 2008 3:46:03 PM(UTC)
Groups: Member
Joined: 8/16/2008(UTC)
Posts: 1

Hi,

It seems the download page was down for couple of hours today. Now that the page is up, I downloaded 2.0.9 version and setup my application to run. Btw, my application is a Silverlight 2 Beta 2 application using WCF, LINQ and SQL Server 2005 Express as the backend. I'm very well aware that WCF has a bug so only loopbacks (127.0.0.1) are supported. If thats the case, my first WCF call from silverlight is to check whether Internet connection is available. The following is my WCF method:

bool IUtilities.IsInternetConnectionAvailable()
{
try
{
WebClient wc = new WebClient();
string returnValue = wc.DownloadString("http://www.microsoft.com");
return true;
}
catch (Exception)
{
return false;
}
}

Here is my call to this WCF method from silverlight in Application_Startup() method in App.xaml

ExpenseTrackerWcfProxy.ExpenseTrackerClient proxy = new ExpenseTracker.ExpenseTrackerWcfProxy.ExpenseTrackerClient();
proxy.IsInternetConnectionAvailableCompleted += new EventHandler<ExpenseTracker.ExpenseTrackerWcfProxy.IsInternetConnectionAvailableCompletedEventArgs>(proxy_IsInternetConnectionAvailableCompleted);
proxy.IsInternetConnectionAvailableAsync();
proxy.CloseAsync();


void proxy_IsInternetConnectionAvailableCompleted(object sender, ExpenseTracker.ExpenseTrackerWcfProxy.IsInternetConnectionAvailableCompletedEventArgs e)
{

this.RootVisual = new Page();
}


I ran my startup page (default.html) from Firefox with the port assigned by Ultidev's Cassini 2.0.9 and it threw a exception as shown below:

Error: Unhandled Error in Silverlight 2 Application Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Delegate.DynamicInvoke(Object[] args)
at System.Windows.Threading.DispatcherOperation.Invoke() Inner Exception: at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
at ExpenseTracker.ExpenseTrackerWcfProxy.IsInternetConnectionAvailableCompletedEventArgs.get_Result()
at ExpenseTracker.App.proxy_IsInternetConnectionAvailableCompleted(Object sender, IsInternetConnectionAvailableCompletedEventArgs e)
at ExpenseTracker.ExpenseTrackerWcfProxy.ExpenseTrackerClient.OnIsInternetConnectionAvailableCompleted(Object state)
Source File: http://localhost:15372/Default.html
Line: 0


Does this indicate that the call above to www.microsoft.com thru WebClient method is not supported by Cassini 2.0.9 due to the bug in WCF? My other question is if I convert all my WCF methods to asmx (including call to www.microsoft.com to get data as shown above), will it work? Also, if the problem stated above is because of WCF bug, how come, the built in Cassini web server that ships with VS 2008 works like a charm?

I have also tried xampp (Apache Lite web server) and it has major drawback (no support for WCF at all). I think, even if it would have supported WCF, because of the WCF bug, it still may not work.

Thanks.
Ultidev Team
#2 Posted : Monday, August 18, 2008 6:17:58 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there!

No, it does not seem like the WCF error. It may be something related to Silverlight/Cassini compatibility. Would it be possible for you to create a very simple project that would cause the problem so we could investigate? if so, please contact us via email so we could respond and give you the email address where to email the project.

Also, please check this thread: http://silverlight.net/forums/t/19021.aspx.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Rss Feed  Atom Feed
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.