Closed GoogleCodeExporter closed 9 years ago
What source code in the spreadsheet dll is setting the default proxy? If it is
that's a bug. Can you pinpoint the
source in the spreadsheet lib that is doing this?
Frank
Original comment by fman...@gmail.com
on 14 Apr 2009 at 1:15
Hello Frank,
perhaps I was not very clear. I try to explain a bit more.
STEP 1:
In my app I set the proxy using a code like this:
GDataRequestFactory x = request.Service.RequestFactory as GDataRequestFactory;
x.Proxy = Utility.GetProxy(...);
Utility.GetProxy returns an instance of IWebProxy.
STEP 2:
I get the Doc list:
Feed<Document> feed = request.GetEverything();
List<Document> _docs = new List<Document>();
foreach (Document entry in feed.Entries)
_docs.Add(entry);
The proxy I set in Step 1 is correctly used. OK!
Step 3
I download the documents.
Stream stream = request.Download(doc, Document.DownloadType.pdf);
If doc is a Document, the proxy is used: OK!
If doc is a Spreadsheet, the proxy is NOT used: ERROR!
.
.
.
In my previous message I wrote "default" proxy because HttpWebRequest/WebRequest
classes use the proxy configured in Internet Explorer. In my test PC I have a
proxy
configured in IE but I need to use another one during the tests of my app. So I
set
it using:
GDataRequestFactory x= request.Service.RequestFactory as GDataRequestFactory;
x.Proxy = Utility.GetProxy(...);
But the Lib uses the new proxy only for getting the doc list and for downloading
Document. But uses the "default" (--> IE) proxy for downloading spreadsheets.
Fabrizio
Original comment by fht...@gmail.com
on 14 Apr 2009 at 2:06
Ok. Got it. The problem is that the documentrequest object uses 2 services
instances (due to some doclist service
side issues). One for docs and one for spreadsheets. When you set up the proxy
like this, you are only setting it
up for the documents part of the service.
I did the following (in subversion now). FeedRequest has a Proxy property now
that you should be able to use. It
calls a virtual in the setter that the DocumentRequest uses to set the proxy on
both services. Can you try if that
fixes your issue (you have to rebuild the dlls yourself).
Original comment by fman...@gmail.com
on 14 Apr 2009 at 2:34
Hello Frank
it works fine! Thank you. :)
I removed:
GDataRequestFactory gdrf = request.Service.RequestFactory as
GDataRequestFactory;
gdrf.Proxy = _iwebproxy;
and I added:
request.Proxy = Utility.GetProxy(...);
(request is a DocumentsRequest)
Now my apps get doc list, download documents and spreadsheets. And uses proxy
correctly.
Last question: when will you release the new official version of the Lib with
the new
feature? have you a plan/date?
fabrizio
Original comment by fht...@gmail.com
on 14 Apr 2009 at 3:07
That depends on the amount of changes that will happen between 2 given points.
There is a high overhead
releasing (create setup, documentation, test on 4 platforms etc...), so i only
do that when sufficient changes
happened inbetween releases.
Original comment by fman...@gmail.com
on 14 Apr 2009 at 4:24
Original issue reported on code.google.com by
fht...@gmail.com
on 10 Apr 2009 at 11:36