<p>I'm behind a firewall at work at the moment and I was testing something that I had deployed to my website, and the work proxy seems to be blocking it somewhat.</p>

<p>Basically I am getting a message of:</p>

<blockquote>
  <p>Operation is not valid due to the current state of the object</p>
</blockquote>

<p>I've got it down to my proxy interferring, but I can't see any advanced settings or anything I can set up to go through my proxy to get to my service.</p>

<p>I did a quick google for it, but no joy.</p>

<p>Anyone found a quick way to get around it?</p>

[{'answer_id': 42994, 'author': 'Dale Ragan', 'author_id': 1117, 'author_profile': 'https://Stackoverflow.com/users/1117', 'pm_score': 4, 'selected': True, 'text': '<p>Edit, I forgot to write this part in the answer: You may need to add the web reference url to the safe list for your proxy.  I am not sure what proxy you are using or if you have control of it, but this should solve your problem.  If you don\'t have access to change the proxy, then I put a quick work around right below.</p>\n\n<p>Here\'s a quick work around, just use the browser to navigate to the WSDL.  Grab the xml and save it as a .wsdl file on your computer you would like to generate the client on.  Then use the <a href="http://shrinkster.com/11sv" rel="noreferrer">wsdl.exe</a> to generate the client pointing it to the path you saved the wsdl file.</p>\n'}, {'answer_id': 314622, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 3, 'selected': False, 'text': '<p>Another option is to go to your application\'s web config or app config and add the following under the  element:</p>\n\n<pre><code>&lt;system.net&gt; \n    &lt;defaultProxy useDefaultCredentials="false"&gt;\n       &lt;proxy usesystemdefault="true" proxyaddress="10.0.0.1" port="80" bypassonlocal="true" /&gt;\n    &lt;/defaultProxy&gt;\n&lt;/system.net&gt;\n</code></pre>\n\n<p>You can then add the web reference in the normal way.</p>\n'}]
['https://Stackoverflow.com/questions/42984', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3717/']