Cannot add web service reference to VS2008, works in VS2010 - visual-studio-2010

I’m having trouble adding a reference to an HTTPS web service using Visual Studio 2008, it works fine in Visual Studio 2010 but in VS2008 I get the below error.
Our IT guys tell me that the problem is that VS2008 is not using the IE proxy settings properly so the HTTPS request is getting sent to the HTTP proxy, which always denies all HTTPS requests. However, in VS2010 it works just fine.
They don't know how to fix this if that is indeed the problem.
(As an aside, I have to use VS2008 because I want to use this in an SSIS Script Task, however I've been testing this in a blank console app.)
There was an error downloading 'https://xxxxxxxxxxxx.asmx'.
The operation has timed out
Metadata contains a reference that cannot be resolved: 'https://xxxxxxxxxxxxx.asmx'.
An error occurred while making the HTTP request to https://xxxxxxxxxxxxxxxxxxx.asmx. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server.
The underlying connection was closed: An unexpected error occurred on a send.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
If the service is defined in the current solution, try building the solution and adding the service reference again.

This appears to be a bug in Visual Studio.

Related

WSDL Authentication Error Appearing on web reference connection

When adding a web reference to a visual studio 2019 web service project I am getting the following errors:
" - The underlying connection was closed: An unexpected error occurred on a send.
Authentication failed because the remote party has closed the transport stream."
and
"The custom tool 'MSDiscoCodeGenerator' failed. Unable to import binding 'Soap11' from namespace http*****"
The server offer three webservices, first web service worked perfectly no issues. The second brings up these errors.
I suppose my question is, seeing as this looks like configuration on the third parties end, is this a visual studio error?
All WSDL offerings from the server work perfectly in the browser and in SOAPUI

How to make XSockets.WebSocket work on HTTPS?

First I'd like to apologize if this question has already been answered on other posts.
I'm pretty new in WebSockets and WebRTC and here's my scenario.
I created an MVC4 application in VS 2012 and install the a sample WebRTC project via nuget package manager console (followed the steps here: http://xsockets.net/blog/tutorial-building-a-multivideo-chat-with-webrtc).
This seems to work fine on my local machine. I deployed the code on our https server (running on IIS6) and I changed the connection string to handle the https connection (code below:)
peerBroker = new XSockets.WebSocket("wss://mydomain.com:443/CustomBroker");
I then hit the URL and I got an error that says:
WebSocket connection to 'wss://mydomain.com/CustomBroker' failed: Error during WebSocket handshake: Unexpected response code: 401
Does anyone have an idea as to what I'm missing here?
You cant just change the connectionstring to be wss.
Have you configured XSockets to run over wss?
See XSockets Configuration

Flash can't access XML files when running under Localhost

We have a Flex/Flash application that loads information from XML files created by a .NET application. It works fine under IIS but when I try to run it from Visual Studio 2010 or 2012 using the ASP.NET Development Server, the Flex/Flash app isn't loading the information. I brought up Fiddler and am able to see that there's an error occurring when the Flash tries to access the XML:
[Fiddler] The socket connection to localhost failed. ErrorCode: 10061. No connection could be made because the target machine actively refused it 127.0.0.1:80
I've turned off my Firewall but that didn't help. So, I'm not sure where the block is occurring. Any thoughts?
[Update: switched from Asp.NET Development Server to IIS Express and am still getting the exact same error.]
[Update2: I've verified that the XML file the Flash is trying to reach comes up fine in the browser: http://localhost:63318/ProductDetailsXML.aspx?ProductId=71]
It may have to do with it being served off of a specific port (not 80). How is your application requesting the XML file? According to your Fiddler log, it's trying port 80, but your site is running on port 63318.

Unable to add a secure web reference in VS.Net 2010

Background: I've been tasked with creating a single sign on solution which will redirect our internal users to a vendor's web application. I've set it up as an ASP.Net project which will call a web service provided by the vendor. This service will return a URL and a token to be used to sign in to the vendor's site. All this is to be done securely.
Problem: When using Visual Studio's Add Web Reference dialog to download the WSDL and generate the required proxy class, I get the following error:
There was an error downloading
'https://server:port/folder/Service?wsdl'. The
underlying connection was closed: An unexpected error occurred on a
send. Authentication failed because the remote party has closed the
transport stream. Metadata contains a reference that cannot be
resolved:
'https://server:port/folder/Service?wsdl'. An
error occurred while making the HTTP request to
https://server:port/folder/Service?wsdl. This
could be due to the fact that the server certificate is not configured
properly with HTTP.SYS in the HTTPS case. This could also be caused by
a mismatch of the security binding between the client and the server.
The underlying connection was closed: An unexpected error occurred on
a send. Authentication failed because the remote party has closed the
transport stream. If the service is defined in the current solution,
try building the solution and adding the service reference again.
In addition to this error, the Add Reference button is grayed out, preventing me from adding the reference and generating the proxy class.
The project is running under .Net Framework 4.0. I've downloaded and installed the necessary client keys/certificates correctly. I've added the IP address and server name to the hosts file and added both to the proxy bypass list. I can browse to the endpoint and view the WSDL in IE and VS's web browser. I can even view the WSDL in the Add Web Reference dialog box in VS. In each case, I'm prompted to select which certificate to use, which I do.
I do not have access to the web service itself or the server it is located on.
I've spent many hours on Google, but have not been able to find a resolution. Any ideas?
Worked around the issue by downloading the WSDL and pulling it into VS through the Add Web Reference dialog by referencing the URL file:\\\drive:\pathname\filename.wsdl.

WebDeploy - just can't get it to work

I've installed Web Deploy 2.1 on a Server 2008 R2 running under VMWare.
In the IIS Manager (Management Service applet) I can see that "Enable Remote Connections" is checked and the port is set to 8172. Under "IIS Manager Permissions" I've added my Windows account (CORP\ekkis) and under the "Authentication" applet (for IIS) I have enabled "Windows Authentication".
I've also turned off the firewall.
So from the command line I test the system to work like this:
C:\Program Files\IIS\Microsoft Web Deploy V2>msdeploy -verb:dump -source:contentPath=\temp,wmsvc=192.168.0.70,username=CORP\ekkis,password=MyPass,authType=Basic -allowUntrusted=True
and get this:
Info: Using ID '9b954a0f-ff07-4e77-ba2c-d27472f5fda0' for connections to the rem
ote server.
Error Code: ERROR_USER_UNAUTHORIZED
More Information: Connected to the destination computer ("192.168.0.70") using t
he Web Management Service, but could not authorize. Make sure that you are using
the correct user name and password, that the site you are connecting to exists,
and that the credentials represent a user who has permissions to access the sit
e.
Error: Object of type 'contentPath' and path '\temp' cannot be created.
Error: The remote server returned an error: (401) Unauthorized.
Error count: 1.
I've also tried deploying with Visual Studio 2010 from the host OS with the following service urls (I haven't found proper documentation on how to form this url):
https://192.168.0.70/
https://192.168.0.70:8172/
https://192.168.0.70:8172/MsDeployAgentService/
https://192.168.0.70/MsDeployAgentService/
I've tried the non-secure versions as well but just cannot get it to work. What is the correct format for the url? and what permissions am I missing?
the errors from VS have varied depending on how I attempt it but below is a sample:
Could not complete the request to remote agent URL 'http://192.168.0.70:8172//MSDEPLOYAGENTSERVICE'.
The underlying connection was closed: An unexpected error occurred on a receive.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Publish failed to deploy.
there really should be a guide out there to do this (yes, I've googled myself blue in the face)!
thanks - ekkis
ok, I've figured out that the correct url is:
https://192.168.0.70:8172/MsDeploy.axd
and that having the "Windows Authentication" enabled doesn't seem to make a difference. Also, having my account in the "Managers" list doesn't seem to make a difference either.
so the back end was all working fine (I've turned off the Web Deployment Agent Service). it was just the url I had wrong.

Resources