Last post Mar 21, 2013 01:24 AM by PaulRayer
Oct 08, 2008 03:03 PM|mark836|LINK
I am trying to add a Web reference to a project. So, I do the standard: right clicking on the project and select "Add Web Reference". The Add Web Reference appears and I navigate to the desired URL "http://ws.melissadata.com/dqws/Address.asmx" and click
"Go". This works in IE. I see the results and two methods in the window. However, the "Add Reference" button and " Web Reference Name" texbox is disabled. And, I see the Operation is not valid due to the current state of the object." I think this is a
proxy and or firewall issue?
I know the System.Net.WebProxy("corp-xxx-proxy.xxx", 8080); and System.Net.NetworkCredential("xxxx", "xxxx"); [x replaces real values]
Any ideas where I can set this info so I will be able to use the "Add Web Reference" wizard? - OR - Is there a workaround?
Oct 08, 2008 03:22 PM|johnwsaunders3|LINK
I've never heard this one before. I'm surprised that Visual Studio doesn't simply use the same default proxy that IE uses.
One possibility is that the proxy configuration on your system has been changed in machine.config or the web.config in C:\Windows\Microsoft.Net\Framework\V2.0.whatever\CONFIG. Visual Studio would be paying attention to that value, but IE would be using the
I would also try rebooting the system and doing it again, just in case.
Worse come to worst, break out Microsoft Network Monitor (from
http://www.microsoft.com/downloads/details.aspx?FamilyID=f4db40af-1e08-4a21-a26b-ec2f4dc4190d&DisplayLang=en) and watch the traffic, both of Visual Studio, and of IE. Compare and contrast. ;-)
Oct 08, 2008 03:49 PM|mark836|LINK
OK, I think I am going to be sick.... :)
Even though I tried multiple web service sites, I still come up with the same message. However, I thought of trying HTTPS rather than HTTP in the URL and now it works. Probably some kind of proxy security.
Thanks and I will mark your answer as correct
Oct 08, 2008 03:51 PM|johnwsaunders3|LINK
Are you using some VPN software or other network software that has a presence on your machine? I've heard of some VPN software that actually looks to see what programs you're running before deciding to permit you access. This software may not understand
that Visual Studio is a legitimate user of the HTTP protocol.
Oct 08, 2008 05:03 PM|mark836|LINK
When trying to add a Web reference, I get the popup proxy server modal login screen to supply a userName and Password (remember my password). That is why I think there is some kind of secuirty issue going on. who knows what they set on your machine and
what is on the firewall. Heck! Plus, I wouldn't even begin to know where to look for these network employees within my own company!
Oct 08, 2008 05:10 PM|johnwsaunders3|LINK
Here's a thought. Let's say for a moment that there's some piece of software that doesn't want to treat VS like IE, or wants to pop up security when VS does HTTP. Try using View->Other Windows->Web Browser. Try typing the web service URL into the address
bar of the resulting window. If the security pop-up comes up, put in your username and password and say "remember me". Then, as a test, exit VS and start it again, and view the web browser again, and put in that URL. See if it prompts again.
In either case, next try the Add Web Reference after having logged in through the browser window.
Oct 09, 2008 10:24 AM|mark836|LINK
I tried your suggestion, but still not able to get the HTTP version to work. I don't know if its related, but I also was never able to get the the help online option to work either.
Nov 24, 2008 11:09 AM|gauravmahajan|LINK
Go to your application's web config/ app config and add the following under the <configuration> element:
Oct 05, 2010 07:06 AM|ishaik49|LINK
if u specify proxy server in your web browser Internet Options then uncheck the box => "Automatically detect settings".
i am using IE and it worked for me.
Feb 06, 2012 01:42 AM|PhilipLeitch|LINK
Hi. I went searching the net on this one and came across this link. I'm using Visual Studio 2008 and following the step from gauravmahajan fixed my issue (the above step didn't)
One other thing though. In my code I needed to add this in order to use the web service:
var Handle = new ExceptionLogger_Web.ExceptionLogger();
var NWC = System.Net.CredentialCache.DefaultNetworkCredentials;
var pry = new System.Net.WebProxy("YOUR.PROXY.SERVER", YourPort);
pry.Credentials = NWC;
Handle.Proxy = pry;
TextBox.Text = Handle.HelloWorld();
Mar 21, 2013 01:24 AM|PaulRayer|LINK
Thanks for this. It worked.