<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: WebRequest Proxy Authentication</title>
	<atom:link href="http://dangarner.co.uk/2008/03/18/webrequest-proxy-authentication/feed/" rel="self" type="application/rss+xml" />
	<link>http://dangarner.co.uk/2008/03/18/webrequest-proxy-authentication/</link>
	<description>A mixture of tech and books</description>
	<lastBuildDate>Sat, 13 Nov 2010 01:59:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: Dan</title>
		<link>http://dangarner.co.uk/2008/03/18/webrequest-proxy-authentication/comment-page-1/#comment-3</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Mon, 28 Sep 2009 00:18:48 +0000</pubDate>
		<guid isPermaLink="false">http://dangarner.co.uk/2008/03/18/webrequest-proxy-authentication/#comment-3</guid>
		<description>Perhaps this might help you?

http://consultingblogs.emc.com/kenibarwick/archive/2004/11/05/Request-for-the-permission-of-type-System.Net.WebPermission_2100210021002100_.aspx</description>
		<content:encoded><![CDATA[<p>Perhaps this might help you?</p>
<p><a href="http://consultingblogs.emc.com/kenibarwick/archive/2004/11/05/Request-for-the-permission-of-type-System.Net.WebPermission_2100210021002100_.aspx" rel="nofollow">http://consultingblogs.emc.com/kenibarwick/archive/2004/11/05/Request-for-the-permission-of-type-System.Net.WebPermission_2100210021002100_.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sand</title>
		<link>http://dangarner.co.uk/2008/03/18/webrequest-proxy-authentication/comment-page-1/#comment-2</link>
		<dc:creator>sand</dc:creator>
		<pubDate>Wed, 23 Sep 2009 08:23:44 +0000</pubDate>
		<guid isPermaLink="false">http://dangarner.co.uk/2008/03/18/webrequest-proxy-authentication/#comment-2</guid>
		<description>Hello,

   I am using proxy to send sms from client site.
Below is my code which runs nicely on localhost but not working on Live Server, it gives me error like below:

Request for the permission of type &#039;System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&#039; failed.

Dim result As String = &quot;&quot;
Dim request As WebRequest = Nothing
Dim response As HttpWebResponse = Nothing

Dim sendToPhoneNumber As String = CStr(O)
Dim userid As String = &quot;xyzabcd&quot;
Dim passwd As String = &quot;abcsjklp&quot;
Dim msgs As String = msgBox
Dim url As String

url = &quot;http://x.y.com/I/rest?method=sendMessage&amp;send_to=&quot; &amp; sendToPhoneNumber &amp; &quot;&amp;msg=&quot; &amp; msgs &amp; &quot;&amp;userid=&quot; &amp; userid &amp; &quot;&amp;password=&quot; &amp; passwd &amp; &quot;&amp;v=1.1&quot;

request = WebRequest.Create(url)
Dim proxy As New webProxy(&quot;http://x.y.com/I/&quot;, True)
proxy.UseDefaultCredentials = True
proxy.Credentials = New NetworkCredential(&quot;xxxxxx&quot;, &quot;yyyyy&quot;, &quot;http://11.11.11.11:80/&quot;)

WebRequest.DefaultWebProxy = proxy
request.Proxy = proxy
response = request.GetResponse()
Dim stream As Stream = response.GetResponseStream()
Dim ec As Encoding = System.Text.Encoding.GetEncoding(&quot;utf-8&quot;)
Dim reader As StreamReader = New System.IO.StreamReader(stream, ec)
result = reader.ReadToEnd()
Console.WriteLine(result)
reader.Close()
stream.Close()</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>   I am using proxy to send sms from client site.<br />
Below is my code which runs nicely on localhost but not working on Live Server, it gives me error like below:</p>
<p>Request for the permission of type &#8216;System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&#8242; failed.</p>
<p>Dim result As String = &#8220;&#8221;<br />
Dim request As WebRequest = Nothing<br />
Dim response As HttpWebResponse = Nothing</p>
<p>Dim sendToPhoneNumber As String = CStr(O)<br />
Dim userid As String = &#8220;xyzabcd&#8221;<br />
Dim passwd As String = &#8220;abcsjklp&#8221;<br />
Dim msgs As String = msgBox<br />
Dim url As String</p>
<p>url = &#8220;http://x.y.com/I/rest?method=sendMessage&amp;send_to=&#8221; &amp; sendToPhoneNumber &amp; &#8220;&amp;msg=&#8221; &amp; msgs &amp; &#8220;&amp;userid=&#8221; &amp; userid &amp; &#8220;&amp;password=&#8221; &amp; passwd &amp; &#8220;&amp;v=1.1&#8243;</p>
<p>request = WebRequest.Create(url)<br />
Dim proxy As New webProxy(&#8220;http://x.y.com/I/&#8221;, True)<br />
proxy.UseDefaultCredentials = True<br />
proxy.Credentials = New NetworkCredential(&#8220;xxxxxx&#8221;, &#8220;yyyyy&#8221;, &#8220;http://11.11.11.11:80/&#8221;)</p>
<p>WebRequest.DefaultWebProxy = proxy<br />
request.Proxy = proxy<br />
response = request.GetResponse()<br />
Dim stream As Stream = response.GetResponseStream()<br />
Dim ec As Encoding = System.Text.Encoding.GetEncoding(&#8220;utf-8&#8243;)<br />
Dim reader As StreamReader = New System.IO.StreamReader(stream, ec)<br />
result = reader.ReadToEnd()<br />
Console.WriteLine(result)<br />
reader.Close()<br />
stream.Close()</p>
]]></content:encoded>
	</item>
</channel>
</rss>

