As a sandbox application i wrote a console app which will call RestApi for storage services.The app is running as expected and i can see calls made by application in Fiddler.I wrote this sandbox so that i could specifically use Rest API calls.
The point i am stuck is how to see REST calls made by my application against storage emulator in Fiddler. I know if i am using storage client library (azure SDK) then could have used following
UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://ipv4.fiddler
I tried setting the Proxy on the HttpWebRequest
but that is also not helping me.Following i the excerpt from my code.
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URI);
WebRequest.DefaultWebProxy = new WebProxy("http://ipv4.fiddler");
or
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URI);
request.Proxy = new WebProxy("http://ipv4.fiddler");
or
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URI);
request.Proxy = new WebProxy("127.0.0.1",8888);
also tried setting up this in app.config like
<system.net>
<defaultProxy>
<proxy
proxyaddress="http://ipv4.fiddler"
bypassonlocal="False" />
</defaultProxy>
</system.net>
but none seems to be working for me. Again just to be clear about my question, app is running fine for me both for storage emulator and My subscription. Only issue is that i cant see call in Fiddler if executed against storage emulator.
Thanks.
To track your requests through Fiddler, just change your endpoint from:
to
Also you don't need the
defaultProxy
setting in your app.config file. If you're keeping it there, then change theproxyaddress
fromhttp://ipv4.fiddler
tohttp://127.0.0.1:8888
. So your app.config file setting would look something like:This is how storage client library does it (https://github.com/WindowsAzure/azure-sdk-for-net/blob/master/microsoft-azure-api/Services/Storage/Lib/Common/CloudStorageAccount.cs - God bless Windows Azure team for making their code available on Github)!