Visual Studio web reference - $metadata vs. ?wsdl - web-services

This is a legacy project that I have not touched in a while. Now the web reference is causing me trouble.
I connect to a SOAP service from a Windows Mobile 6 client. When the service host runs locally on my development box, I can point the web reference to it and it will discover the WSDL, i.e. it will attempt to pull the service description by appending ?wsdl to the endpoint URL. I can build the app and connect to the service from the emulator.
I can for some reason not point Visual Studio to the current production environment for discovery. There it appends /$metadata to the URL instead of ?wsdl. The wsdl is there and I can view it in a browser, though. The mobile app is live and has been connecting to the service for years.
The HTML document does not contain Web service discovery information.
There was an error downloading 'https://mysite/myservice.asmx/$metadata'.
The request failed with the error message:
--
<html>
<head>
<title>Request format is unrecognized for
I know that it is not possible to discover a web service on a non-standard port from Visual Studio. Does it not work with SSL, either? How does Visual Studio decide to use either method for discovery?Or do you have any other thoughts?

I still have no clue what's going wrong with your service but I can discover webservices on non standard ports adding the port to the url (and the ?wsdl as well) from within WS
http://10.177.55.13:10321/MyServices/?wsdl
If this doesn't help open the wsdl in your browser. Copy the xml code, paste it into your editor and save it as .wsdl file. In VS use the filename as url for the service.
HTH
Ruediger

Related

Click once application to connect to remote server

I have added this question on ServerFault but no one replied.
I have a .net application which calls a webservice deployed on my local windows server 2012 on IIS, and the sql server database resides on that server too. All employees connect to the same service and DB since we're all on the same domain, and I publish the app and webservice to the server through visual studio (2012).
Now I need to make employees access this application when they are outside the company's network, so I deployed the webservice on IIS on one of our remote windows 2012 servers, I created a public shared folder in my remote server and added to app webservice files to it and in visual studio I changed the publish method to web deploy and filled in the information as below:
Server: https://x.x.x.x/
Site Name: https://x.x.x.x/PublicFolder
Destication URL: https://x.x.x.x/PublicFolder/Application
When I click Validate Connection, it fails with the following message:
Could not connect to the remote computer ("x.x.x.x"). on the remote
computer make sure that Web Deploy is installed and that the required
process ("Web Management Service") is started. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.
Unable to connect to the remote server
Note that I tried to replace https with http and I got another error:
Could not connect to the remote computer ("x.x.x.x"). on the remote
computer make sure that Web Deploy is installed and that the required
process ("Web Management Service") is started. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_ADMIN.
the remote server returned an error: (401)Unauthorized
I went to the previous link and I did what they suggested:
Create a separate user group MSDepSvcUsers on remote computer.
Create an local account A on both local & remote computer.
Add A to MSDepSvcUsers on remote computer.
Use account A to publish, this will allow you to publish without
needing to use built-in admin account.
but the same error (NOT_ADMIN) remained
UPDATE: I found another possible solution:
Add/modify windows registery key
“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\”
and set it “1”.
After I added this registry key, the error changed to:
site 'http:' does not exist ... #ERROR_SITE_DOES_NOT_EXIST
So now if I put wrong credentials, I get the unauthorized error, if I use correct credentials I get side does not exist error.
What should I do?
It worked!!
I mean the connection, it's now validated, all I had to do is change site name from "http://x.x.x.x/PublicFolder" to "Default Web Site\SiteName" !!
This was really confusing, finally got it!

GlassFish Server (open source) ColdFusion "requested resource is not available" error

We are in the process of moving a website coded in ColdFusion and Fusebox framework to a new host (from GoDaddy who is ceasing to support CF to HostMySite).
Our url structure is currently setup like /index.cfm/home.register redirecting through a cfscript to the "full" url of /index.cfm?fuseaction=home.register
We are receiving the following error message:
HTTP Status 404 -
type Status report
message
descriptionThe requested resource () is not available.
GlassFish Server Open Source Edition 3.1
I am not a CF or Windows guy, this is an old site and we are just trying to get it to run on another server to bide us some time until we can rewrite it.
Any clue as to how to what is wrong and how to get it to work? HostMySite support has been completely unresponsive thus far.
Any help would be greatly appreciated!
Brandon, just for the sake of correctness; Glassfish is Oracle's java server and comes in an open source flavour. http://glassfish.java.net/
Glassfish is not a ColdFusion server.
It is possible to deploy j2ee versions of Adobe ColdFusion, Railo or OpenBD using glassfish.
JRun is the only Java server that comes with the SES rewriting built in. However, it is possible to rewrite urls using most Java servers or at the least by fronting the java server with a web server such as IIS, Apache or nginx.
After several discussion with tech support, we confirmed that "GlassFish Server" is an open source ColdFusion server, and it does not support the search engine friendly URL code we were using. We had to switch hosts to a host that used actual CF server.

Unable to access any web services in the _vti_bin folder from SharePoint web server

We have an internal portal hosted on a SharePoint web server. There is a separate server for indexing the portal content. I have a custom web application that invokes the SharePoint search web service and it works fine on my development machine. However when I deploy it to the SharePoint web server, I get this message
"The request failed with HTTP status 401: Unauthorized."
If I try to access the web service from the browser (http:///_vti_bin/search.asmx) from the production server, I get the 401 page. But it works fine from the any other machine. This is an internal portal. Any help would be deeply appreciated.
Thank you.
If you get the 401 error when browsing any Sharepoint page from the local machine, try checking out this article or this article (both from support.microsoft.com)
It describes how to disable/work around the loopback check introduced in windows 2003 sp1.

BizTalk web-service call: unable to connect to remote server

I am trying to call a web service from a BizTalk (2006) orchestration.
Having got the hang of the basics, I have been following this tutorial (page 74 onwards) in which i have a web reference to an external web service (I am using this web service instead of the one in the tutorial), I have my web message in a Send component, and have set up the request / response ports for the web service call.
I'm fairly sure that eveything is set up correctly, but my orchestration fails to call the web service with the following error:
The adapter failed to transmit the message going to send port
"My_Order_Processor.Orchestration-CurrencyConvertPort-36c122f41c5596ae"
with URL "http://www.webservicex/net/CurrencyConvertor.asmx.
WebException: Unable to connect to the remote server.
SocketException: An existing connection was forcibly
closed by the remote host 209.162.186.60:80
The IP 209.162.186.60 is the address for the web service I am trying to connect to. I am trying to narrow down the reasons for the error, e.g.:
Firewall issues
Proxy server issues (I don't know how to configure BizTalk to use a proxy server)
Something else
The BizTalk server can ping the web service, I can access the internet (through IE), I can add the WebReference to the project successfully (meaning at least the orchestration designer can access the web service okay). I have also tried a different web service, with the same result.
Any ideas on finding out why this is happening or how to find out more info? (I'm new to BizTalk)
I've seen this veru vague error before for many different reasons. Two suggestions.
Download something like NetMon and watch what is going on on the wire.
Turn off chunked encoding. For some reason, many web services don't handle this well.
Let us know what you find out.
Could this not be an authentication issue? Check that you can connect to the webservice using the Bts credentials.
This turned out to be a proxy issue.
By navigating to Biz Talk Group -> Platform Settings -> Adapters -> SOAP, I was able to configure the BizTalk server host's SOAP adapter (which is what the web service call uses to make the call) to use our company proxy server correctly. Double click the 'send' SOAP adapter, go to Properties under adapter name.

In FinalBuilder, how do I use the HTTP Get File action with Windows Authentication?

I have a FinalBuilder project where I deploy an ASP.Net website to a remote folder, configured as a website in IIS.
As part of my build script, I want to use the FinalBuilder action HTTP Get File to help determine whether my deployment was succesful.
I'm having difficulty, because the website is configured (under IIS 6) to use Integrated Windows Authentication, and anonymous access is not enabled.
Now the HTTP Get File action, has only a handful of properties, one of which is a security section, containing a UserName and Password. Great I thought! I can just put some valid credentials in there, which FinalBuilder will impersonate, whilst retrieving my file.
It turns out I was mistaken. I receive the following error:
Error retrieving url : Socket Error # 10061
Connection refused.
If I run the action without setting the Security Username and Password, I get the following error:
Error retrieving url : HTTP/1.1 401 Unauthorized Response Code : 401
Here are some facts to help with the context of my problem.
I'm running FinalBuilder 6 Professional, upon a Windows Server 2003 installation, and deploying my ASP.Net website to a remote IIS6 server within our corporate LAN.
If I configure IIS on the remote server to allow Anonymous access, I can run the HTTP Get File action without error. However, running this particular site with anon access is not acceptable in our situation.
Can anyone help suggest a workaround?
For a definitive answer, I think the Finalbuilder Forum is probably your best bet.
My guess, though, is that the HTTP library used by FB doesn't support Windows authentication, and is failing because no common authentication method can be negotiated. Since HTTPS isn't supported either by the 'HTTP Get File action', the possible workaround of allowing basic authentication on your site isn't a good idea, as you would be passing credentials over the network in plain text.
The only remaining workaround I can think of (other than waiting for a future FB release), is creating your own FB action to retrieve the file. Using the .NET Framework System.Net.WebClient, that should be trivial. Just start with a standalone EXE to make sure everything works, then refactor it into a 'real' action using FinalBuilder Action Studio (if that's even required: spawning an external EXE may work just fine in your case).