Question : C# to VB.NET

Hello,

I'm trying to convert this code in to VB.NET and I cant Please help

This is for publish a wall post using facebook application
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
attachment attachment = new attachment();

            attachment.caption = "www.icanhascheezburger.com";
            attachment.name = "I am bursting with joy";
            attachment.href = "http://icanhascheezburger.com/2009/04/22/funny-pictures-bursting-with-joy/";
            attachment.description = "a funny looking cat";
            attachment.properties = new attachment_property()
            {
                category = new attachment_category()
                {
                    href = "http://www.icanhascheezburger.com/category/humor",
                    text = "humor"
                },
                ratings = "5 stars"
            };
            attachment.media = new List<attachment_media>(){new attachment_media_image()
                                    {
                                        src = "http://icanhascheezburger.files.wordpress.com/2009/03/funny-pictures-your-cat-is-bursting-with-joy1.jpg",
                                        href = "http://icanhascheezburger.com/2009/04/22/funny-pictures-bursting-with-joy/"
                                    }};

            fbService.API.stream.publish("This is a test message", attachment, null, base.API.uid.ToString(), Convert.ToInt32(base.API.uid));

Answer : C# to VB.NET

You could use a simple proxy.pac (wpad) file that you would determine if the user is on your internal LAN and direct them to your internal proxy server otherwise allow direct internet access such as the following example

function FindProxyForURL(url, host)
{
if (isInNet(myIpAddress(), "192.168.1.0", "255.255.255.0"))
return "PROXY 192.168.1.1:8080";
else
return "DIRECT";
}

You can read more about proxy auto configuration files here http://technet.microsoft.com/en-us/library/dd361918.aspx

One Gotcha that you should be aware of is that this file is cached and therefore you may need to consider making a change that allows this file to be read everytime the browser is used.  Thats jumping ahead a bit and we can cross that bridge if and when you come to it.

Hope this helps
Random Solutions  
 
programming4us programming4us