SilverlightShow: Windows Phone 7 Data Access Strategies: WebClient Comments
http://www.silverlightshow.net/
Silverlight articles, Silverlight tutorials, Silverlight videos, Silverlight samplesSilverlightShow.nethttp://www.rssboard.org/rss-specificationArgotic Syndication Framework 2008.0.2.0, http://www.codeplex.com/Argoticen-USestoychev@completit.com (Emil Stoychev)Re: Windows Phone 7 Data Access Strategies: WebClient<p>Hello,</p>
<p>I'm trying to implement this (similar anyways) with google...and need to let google store cookies...but for some reason it is not jumping to the derived class (in your case 'ExtendedWebClient()') to allow cookies...am I missing something? I'm doing it very similar to you...my code is:</p>
<p style="padding-left: 20px; font-size: 80%;"><em>
public WebClient InnerWebClient { get; set; }<br />
//.....//<br />
public MyWebClient()<br />
{<br />
this.InnerWebClient = new CookieWebClient();<br />
}<br />
//.....//<br />
this.InnerWebClient.UploadStringAsync(new Uri(url), verb, "");<br />
this.InnerWebClient.UploadStringCompleted += (sender, e) =><br />
{<br />
System.Diagnostics.Debug.WriteLine("Results from our webclient UPLOAD request! // " + e.Result.ToString());<br />
resultPreExecuteLogin = new Result(e.Result.ToString());<br />
};<br />
//.....//<br />
Here is my derived class....<br />
public class CookieWebClient : WebClient<br />
{<br />
public CookieContainer CookieContainer { get; private set; }<br />
<br />
[SecuritySafeCritical]<br />
public CookieWebClient()<br />
{<br />
this.CookieContainer = new CookieContainer();<br />
}<br />
<br />
protected override WebRequest GetWebRequest(Uri address)<br />
{<br />
WebRequest request = base.GetWebRequest(address);<br />
<br />
if (request is HttpWebRequest)<br />
(request as HttpWebRequest).CookieContainer = this.CookieContainer;<br />
<br />
return request;<br />
}<br />
}<br />
</em></p>
<p>If you have any ideas, they would be greatly appreciated. I've been banging my head on this for days now.</p>
<p>Thanks.</p>
http://www.silverlightshow.net/items/Data-Access-Strategies-WebClient.aspx#comment8581
iceman198http://www.silverlightshow.net/items/Data-Access-Strategies-WebClient.aspxFri, 02 Nov 2012 15:26:40 GMTRe: Windows Phone 7 Data Access Strategies: WebClient<p>Hi Andrea Boschin</p>
<p>Your article is cool, but one problem I want receive string from a website using IP address(as Uri), I don't know the IP address, So I am giving uri like this</p>
<p>string IP = "10.0.0."</p>
<p>isIPFound = false;</p>
<p>GetStatus(){</p>
<p> for (int i = 0; i < 20; i++)<br />
{<br />
uri = IP + i.ToString()+ "path"; </p>
<p> client.DownloadStringAsync(new Uri(uri)); <br />
<br />
client.DownloadStringCompleted += newDownloadStringCompletedEventHandler(client_downloadStringCompleted);</p>
<p> if (isIPFound)<br />
{</p>
<p> isIPFound= false;<br />
break;<br />
}</p>
<p>}</p>
<p><br />
</p>
<p>client_downloadStringCompleted(s,e)</p>
<p>{</p>
<p>if (e.Error == null)<br />
{<br />
isIPFound = true;<br />
}</p>
<p>}</p>
<p><br />
</p>
<p>What I want is, It should keep changing the ip address untill maximum limit if ip found within the limit It should stop the operation and return the ip address.</p>
<p>I am a student, working on my first windows phone app help me,</p>
<p>Thanks</p>
<p><br />
</p>
<p> </p>
<p><br />
</p>
http://www.silverlightshow.net/items/Data-Access-Strategies-WebClient.aspx#comment8571
AdarshUrshttp://www.silverlightshow.net/items/Data-Access-Strategies-WebClient.aspxFri, 26 Oct 2012 12:28:25 GMTRe: Windows Phone 7 Data Access Strategies: WebClientThank you, you saved me. Your solution is wonderful, work like a charm.
http://www.silverlightshow.net/items/Data-Access-Strategies-WebClient.aspx#comment8467
joysikahttp://www.silverlightshow.net/items/Data-Access-Strategies-WebClient.aspxFri, 14 Sep 2012 11:59:36 GMTRe: Windows Phone 7 Data Access Strategies: WebClientHave you tryied the attached sample?
http://www.silverlightshow.net/items/Data-Access-Strategies-WebClient.aspx#comment8170
AndreaBoschinhttp://www.silverlightshow.net/items/Data-Access-Strategies-WebClient.aspxFri, 15 Jun 2012 16:24:57 GMTRe: Windows Phone 7 Data Access Strategies: WebClient<p>I have problems with the implementing of getwebrequest method, it says i can't access the method because of the protection level. Could you in more detail describe how to use the method?</p>
http://www.silverlightshow.net/items/Data-Access-Strategies-WebClient.aspx#comment8169
BjrnHanssonhttp://www.silverlightshow.net/items/Data-Access-Strategies-WebClient.aspxFri, 15 Jun 2012 14:28:01 GMTRe: Windows Phone 7 Data Access Strategies: WebClientI'm happy to help!
http://www.silverlightshow.net/items/Data-Access-Strategies-WebClient.aspx#comment7830
AndreaBoschinhttp://www.silverlightshow.net/items/Data-Access-Strategies-WebClient.aspxThu, 12 Apr 2012 03:13:38 GMTRe: Windows Phone 7 Data Access Strategies: WebClient<p>Wow! Thank you! You just save me. I was going crazy, i couldn't find why this override of WebClient on WindowsPhone didn't work. It was keeping throw an exception.</p>
<p>Your ExtendedWebClient works well :)</p>
http://www.silverlightshow.net/items/Data-Access-Strategies-WebClient.aspx#comment7829
JrmyCorpinothttp://www.silverlightshow.net/items/Data-Access-Strategies-WebClient.aspxThu, 12 Apr 2012 02:36:32 GMTRe: Windows Phone 7 Data Access Strategies: WebClientHey Now<a href="http://www.silverlightshow.net/Profile/AndreaBoschin.aspx" class="authorName" id="ctl00_cphMiddle_cphContent_modules_articles_article_ascx1_hlnkAuthor">Andrea Boschin</a><br />
<p> Nice post on Data w/ WP7! </p>
http://www.silverlightshow.net/items/Data-Access-Strategies-WebClient.aspx#comment6444
ccattohttp://www.silverlightshow.net/items/Data-Access-Strategies-WebClient.aspxThu, 18 Aug 2011 23:30:48 GMT