<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.silverlight.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Silverlight Tip of the Day #42: How to Create a Web Service for your Silverlight App</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/09/17/silverlight-tip-of-the-day-42-how-to-create-a-web-service-for-your-silverlight-app.aspx</link><description>Web services are essentially API’s that can be accessed over a network such as the Internet. Due to security Silverlight restricts a lot of important features such as saving to the disk. However, you can get around these restrictions by making calls to</description><dc:language>en</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>re: Silverlight Tip of the Day #42: How to Create a Web Service for your Silverlight App</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/09/17/silverlight-tip-of-the-day-42-how-to-create-a-web-service-for-your-silverlight-app.aspx#321459</link><pubDate>Tue, 17 Nov 2009 16:23:04 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:321459</guid><dc:creator>mike.snow</dc:creator><description>&lt;p&gt;There is a event that is called when the call is complete. Wait until the event is fired before proceedding.&lt;/p&gt;
&lt;p&gt;Example (check out the LoginCompleted event):&lt;/p&gt;
&lt;p&gt;ServiceReferenceMyApp.ServiceWebClient client = new ServiceReferenceMyAPp.ServiceWebClient();&lt;/p&gt;
&lt;p&gt;client.LoginAsync(UserEmail.Text, UserPassword.Password);&lt;/p&gt;
&lt;p&gt;client.LoginCompleted += new EventHandler&amp;lt;ServiceReferenceMyApp.LoginCompletedEventArgs&amp;gt;(client_LoginCompleted);&lt;/p&gt;
&lt;p&gt;void client_LoginCompleted(object sender, ServiceReferenceFlair.LoginCompletedEventArgs e)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=321459" width="1" height="1"&gt;</description></item><item><title>re: Silverlight Tip of the Day #42: How to Create a Web Service for your Silverlight App</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/09/17/silverlight-tip-of-the-day-42-how-to-create-a-web-service-for-your-silverlight-app.aspx#321435</link><pubDate>Tue, 17 Nov 2009 15:36:43 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:321435</guid><dc:creator>JoshGold</dc:creator><description>&lt;p&gt;Hi Mike, thanks for the tip. &amp;nbsp;Definitely helped out this newbie Silverlight developer. &amp;nbsp;I'm struggling to grasp why it's async only though. &amp;nbsp;If I have something dependent on the data coming back, how can I get my data out of the completed function? &amp;nbsp;It's hard to work around when the completed function does not have a return type and you can't pass in additional arguments.&lt;/p&gt;
&lt;p&gt;I'm hoping I'm just missing something.&lt;/p&gt;
&lt;p&gt;thanks.&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=321435" width="1" height="1"&gt;</description></item><item><title>re: Silverlight Tip of the Day #42: How to Create a Web Service for your Silverlight App</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/09/17/silverlight-tip-of-the-day-42-how-to-create-a-web-service-for-your-silverlight-app.aspx#311737</link><pubDate>Fri, 30 Oct 2009 05:08:30 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:311737</guid><dc:creator>ecarson</dc:creator><description>&lt;p&gt;Figure out the result (for VB). Use the AddHandler expression first then the .HelloWorldCompleted will show.&lt;/p&gt;
&lt;p&gt;AddHandler client.HelloWorldCompleted, AddressOf client_HelloWorldCompleted&lt;/p&gt;
&lt;p&gt;client.HelloWorldAsync&lt;/p&gt;
&lt;p&gt;Private Sub client_HelloWorldCompleted(ByVal sender As Object, ByVal e As HelloWorldCompletedEventArgs)&lt;/p&gt;
&lt;p&gt; 'Do something here&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=311737" width="1" height="1"&gt;</description></item><item><title>re: Silverlight Tip of the Day #42: How to Create a Web Service for your Silverlight App</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/09/17/silverlight-tip-of-the-day-42-how-to-create-a-web-service-for-your-silverlight-app.aspx#311726</link><pubDate>Fri, 30 Oct 2009 04:41:15 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:311726</guid><dc:creator>ecarson</dc:creator><description>&lt;p&gt;I'm able to call the .HelloWorldAsync method, but the .HelloWorldCompleted method is not shown in the intellisense and an error ocurrs when calling it.&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=311726" width="1" height="1"&gt;</description></item><item><title>re: Silverlight Tip of the Day #42: How to Create a Web Service for your Silverlight App</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/09/17/silverlight-tip-of-the-day-42-how-to-create-a-web-service-for-your-silverlight-app.aspx#286701</link><pubDate>Mon, 14 Sep 2009 06:22:32 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:286701</guid><dc:creator>scvinod</dc:creator><description>&lt;p&gt;Mike,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;I got the result now.The mistake I did was that i created a ASP.Net Web Application project instead of Web Site.&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=286701" width="1" height="1"&gt;</description></item><item><title>re: Silverlight Tip of the Day #42: How to Create a Web Service for your Silverlight App</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/09/17/silverlight-tip-of-the-day-42-how-to-create-a-web-service-for-your-silverlight-app.aspx#286677</link><pubDate>Mon, 14 Sep 2009 04:56:38 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:286677</guid><dc:creator>scvinod</dc:creator><description>&lt;p&gt;Yes, I have very much done what you told but still I'm not getting the output.I have the screenshots over here.&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://i27.tinypic.com/10d5tvk.jpg"&gt;i27.tinypic.com/10d5tvk.jpg&lt;/a&gt; &amp;nbsp;&lt;a rel="nofollow" target="_new" href="http://i27.tinypic.com/246ouiq.jpg"&gt;i27.tinypic.com/246ouiq.jpg&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=286677" width="1" height="1"&gt;</description></item><item><title>re: Silverlight Tip of the Day #42: How to Create a Web Service for your Silverlight App</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/09/17/silverlight-tip-of-the-day-42-how-to-create-a-web-service-for-your-silverlight-app.aspx#285918</link><pubDate>Fri, 11 Sep 2009 18:44:51 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:285918</guid><dc:creator>mike.snow</dc:creator><description>&lt;p&gt;Did you put the web service in your web site and not your SL app?&lt;/p&gt;
&lt;p&gt;Also, when clicking &amp;quot;Discover&amp;quot; for Add Service Reference did it find the web service?&lt;/p&gt;
&lt;p&gt;Make certain you are using the full namespace when declaring the HelloWord.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=285918" width="1" height="1"&gt;</description></item><item><title>re: Silverlight Tip of the Day #42: How to Create a Web Service for your Silverlight App</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/09/17/silverlight-tip-of-the-day-42-how-to-create-a-web-service-for-your-silverlight-app.aspx#285914</link><pubDate>Fri, 11 Sep 2009 18:35:27 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:285914</guid><dc:creator>scvinod</dc:creator><description>&lt;p&gt;Hi Mike,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; Thanks a lots for this article.I just did exactly what you have done here.But I'm not able to make a call to the HelloWorld() method after creating the client proxy.I'm not getting the intellisense for the HelloWorld method after the client proxy.Can you please let me know the solution.By the way both service and the client are in the same machine.Thank you.&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=285914" width="1" height="1"&gt;</description></item><item><title>re: Silverlight Tip of the Day #42: How to Create a Web Service for your Silverlight App</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/09/17/silverlight-tip-of-the-day-42-how-to-create-a-web-service-for-your-silverlight-app.aspx#195633</link><pubDate>Wed, 25 Mar 2009 19:36:28 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:195633</guid><dc:creator>mike.snow</dc:creator><description>&lt;p&gt;What error do you get?&lt;/p&gt;
&lt;p&gt;I am not certain but you may need the clientacccesspolicy file to be present:&lt;/p&gt;
&lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;access-policy&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;cross-domain-access&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;policy&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;allow-from&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;domain uri=&amp;quot;*&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/allow-from&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;grant-to&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;socket-resource port=&amp;quot;4502-4534&amp;quot; protocol=&amp;quot;tcp&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/grant-to&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/policy&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;/cross-domain-access&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/access-policy&amp;gt;&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=195633" width="1" height="1"&gt;</description></item><item><title>re: Silverlight Tip of the Day #42: How to Create a Web Service for your Silverlight App</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/09/17/silverlight-tip-of-the-day-42-how-to-create-a-web-service-for-your-silverlight-app.aspx#195608</link><pubDate>Wed, 25 Mar 2009 18:37:21 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:195608</guid><dc:creator>ScCrow</dc:creator><description>&lt;p&gt;Hi Mike. &amp;nbsp;I have a question.&lt;/p&gt;
&lt;p&gt;Ive created the Web service and it's working in the IDE just great. &amp;nbsp;But when I publish this to IIS, Im having problems.&lt;/p&gt;
&lt;p&gt;So, here is what Ive done.&lt;/p&gt;
&lt;p&gt;I created a project and created my WebService within that structure. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then, I build a User control in a 2nd project within the same solution. &amp;nbsp;Its an Ad Rotator user control and retrieves images from an Sql Database. &amp;nbsp;This will be used on the other projects in the solution. &amp;nbsp;Obviously, it uses the web service that Ive created to get the images.&lt;/p&gt;
&lt;p&gt;The project has several pages, so I created these in separate projects in this solution. I navigate to pages on a button press. &amp;nbsp;The web service serves images to the Ad rotator, and &amp;nbsp;other things on other pages.&lt;/p&gt;
&lt;p&gt;With this setup on IIS, the Ad Rotator is not retreiving images and my navigation doesnt work. &amp;nbsp;It all works in the IDE. &lt;/p&gt;
&lt;p&gt;So, I thought you may have a suggeston.&lt;/p&gt;
&lt;p&gt;Thanks &amp;nbsp; &lt;/p&gt;
&lt;p&gt;ScCrow&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=195608" width="1" height="1"&gt;</description></item><item><title>presentão de Ano Novo: dúzias de dicas e tutoriais de Silverlight ;)</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/09/17/silverlight-tip-of-the-day-42-how-to-create-a-web-service-for-your-silverlight-app.aspx#155417</link><pubDate>Sat, 03 Jan 2009 11:26:19 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:155417</guid><dc:creator>o UAU nosso de cada dia</dc:creator><description>&lt;p&gt;essa lista eu copiei desse blog b&amp;#225;rbaro (acompanhe por RSS voc&amp;#234; tamb&amp;#233;m): uma lista de dicas super &amp;#250;teis&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=155417" width="1" height="1"&gt;</description></item><item><title>Silverlight Tips of the Day - Summary Outline</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/09/17/silverlight-tip-of-the-day-42-how-to-create-a-web-service-for-your-silverlight-app.aspx#155185</link><pubDate>Fri, 02 Jan 2009 22:57:23 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:155185</guid><dc:creator>Silverlight Tips of the Day - Blog by Mike Snow</dc:creator><description>&lt;p&gt;The purpose of this post is to create an outline summary all the blogs from my Silverlight tips of the&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=155185" width="1" height="1"&gt;</description></item><item><title>Silverlight Tips of the Day - Summary Outline</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/09/17/silverlight-tip-of-the-day-42-how-to-create-a-web-service-for-your-silverlight-app.aspx#155184</link><pubDate>Fri, 02 Jan 2009 22:57:23 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:155184</guid><dc:creator>Silverlight Tips of the Day - Blog by Mike Snow</dc:creator><description>&lt;p&gt;The purpose of this post is to create an outline summary all the blogs from my Silverlight tips of the&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=155184" width="1" height="1"&gt;</description></item><item><title>Silverlight Tip of the Day #64 – Deploying a Silverlight Application with a Web Service</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/09/17/silverlight-tip-of-the-day-42-how-to-create-a-web-service-for-your-silverlight-app.aspx#114642</link><pubDate>Tue, 21 Oct 2008 20:20:37 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:114642</guid><dc:creator>Silverlight Tips of the Day - Blog by Mike Snow</dc:creator><description>&lt;p&gt;In Tip of the Day #42 I discussed how to create Silverlight-enabled WCF web service. In this tip I will&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=114642" width="1" height="1"&gt;</description></item><item><title>Silverlight Tips of the Day – Week 7</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/09/17/silverlight-tip-of-the-day-42-how-to-create-a-web-service-for-your-silverlight-app.aspx#97067</link><pubDate>Thu, 25 Sep 2008 17:55:53 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:97067</guid><dc:creator>Visual Web Developer Team Blog</dc:creator><description>&lt;p&gt;Silverlight Tip of the Day #46 Title: Font Support in Silverlight Silverlight Tip of the Day #45: Title:&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=97067" width="1" height="1"&gt;</description></item></channel></rss>