Hello everyone,
If I have a client application which needs to call a web service. I want to know the pros/cons and impact if I set default proxy property to true or false in app.config file?
Thanks!
Here is the property I am talking about.
http://msdn.microsoft.com/en-us/library/kd3cf2ex.aspx
regards,
George
LisaPosted Mar 30, 2009, 8:56 AM
the following is the code that uploads a file
WebClient webCl = new WebClient();
webCl.Headers.Add("Content-Type", "text/xml");
byte[] result = webCl.UploadFile("http://" + mgr.GetIniString("Server", "name", "localhost") + "/" + mgr.GetIniString("Server", "path", "localhost") + "/uploadFile.php", "POST", cachePath + "/" + TEMP_NAME);
this same code uploads the file to the server when i use it in a button click and if in a windows server it throws out a bad request error every time it was trying to upload files. after setting up a default proxy , though the proxy cudnt get the address from the internet settings in windows service(it worked again fine on a button click) i had to manually set up a default dummy proxy so that the upload works fine.
Thanks,
Lisa
George GeorgePosted Mar 30, 2009, 8:45 AM
LisaPosted Mar 30, 2009, 8:38 AM
and i never used wire shark so am not sure how it works, but i guess even it should show the pakects size being sent and recieved.
Thanks,
Lisa.
LisaPosted Mar 30, 2009, 8:34 AM
Hello George,
I actually needed my windows service to pick up files and upload it to the remote server. so as a local account the windows service couldnt get the proxy details from the system and when i set up a default proxy then it could run the data transfer well.
and coming to the traffic i just run the tool for the request and response thats actually uploading files with and without a proxy set its just that the size of the packets being sent after setting up proxy was higher than without a proxy though the change was very marginal. i did not run more detailed tests to check though , but this was sufficent to me to check that setting up a proxy was leading to increase in buffer size when the request is sent.
Thanks,
Lisa
George GeorgePosted Mar 30, 2009, 8:12 AM
LisaPosted Mar 30, 2009, 8:09 AM
Yeah for the point 1 when you set up a windows service to do the stuff that you are doing manually within your application. it does cause a security issue thats because when you are actually running the application it treats you as a ASPNET user or a normal windows user and where as on windows service it treats you under a local system or network user account depending on type of windows service you set up, those accounts do not have sufficient priveleges to do the stuff which normal windows user can do.
yes the overhead is definetely caused by setting up the default proxy though its not huge , i did use TCPMON and NETMON to check the traffic being transffered , as i said it is quite minimal though but it does has some extra packets being sent.
Thanks,
Lisa
George GeorgePosted Mar 30, 2009, 7:54 AM
LisaPosted Mar 30, 2009, 7:29 AM
Hi George,
Sorry about replying late was on vacation..
by using the default proxy in my case my upload and download files used to not work on a service before i set up a default proxy it was basically a security issue with the Windows OS.
yes there would always be a overhead each time you send out a web request through your application with the default proxy turned on.
Thanks,
Lisa
George GeorgePosted Mar 15, 2009, 5:39 AM
Thanks Lisa,
1. In your situation, what is the benefit of using a default proxt?
2. If I select automatically detecting proxies in Internet Conntection settings, then if I select to use using default proxy, does it mean each time when I send a web request from my application, there will be an overhead automatically detecting proxy process?
regards,
George
LisaPosted Mar 12, 2009, 5:03 AM
i have been working of late a lot on proxies these days(for my windows application) found some intresting things about them , if you have something like uploading and downloading files to a webservice then i strongly recommend using a proxy, it could be any dummy proxy u can set it up. it works fine with it.
Thanks,
Lisa