i have an webserivce written where i do an insertion opertion to DB.
path :http://localhost:1838/Ajax/WebService.asmx?wsdl.name of the webservice is localhost
i have added webservice for the project
now on button click event i try to call this webserice like this
localhost obj= new localhost();
obj.insert();
now i am able to do the insertion operation fine.
but i wanted to create an proxy for the webservice so wat is the use of it doing like tat?
when i run this command in my command prompt in vs
wsdl /out:myProxyClass.cs http://localhost:1838/Ajax/WebService.asmx?WSDL
i get an error
unable to connect the remote server.
no connection would be made because
the target machine actively refused
it
looking forward for an solution any help would great
thank you
It looks like you are using the built in develoment webserver (Cassini). Are you sure it was running when you issued the wsdl command ? The tool needs to connect to the service and download metadata, in order to generate your proxy.
Related
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!
I want to create a WCF client for MODIS Web Service available on this website: http://daac.ornl.gov/MODIS/MODIS-menu/modis_webservice.html There is a link to WSDL file, which can I use to generate proxy class. The problem is, that this file is somehow malformed, I cannot create clients with .NET tools like Add Service Reference, wsdl.exe or svcutil.exe. When I try to generate proxy class through website, I get following response:
I've tried to download the WSDL file and create proxy class from local copy, but then I've got this error:
These errors are the same for Add Service Reference and for console output of wsdl.exe and svcutil.exe utils. Is there any other way to create a WCF client to this service or is it impossible in .NET?
EDIT-----
I've managed that the problem occurs, becouse the WSDL is in RPC/Endoded standard and .NET tools cannot handle it properly. I've tried to convert it to Document/literal standard but it's still not working. Can somebody look at my WSDL file and check what I have wrong? It's available under this link: https://wklej.to/67rR7
removing wsdl:documentation blocks inside the element
tags helps to generating codes via svcutil.exe or wsdl.exe.
Baseline for this solution
Hopes this helps.
I've created a contract-last web-service which is deployed on a Jboss AS on my VDI machine. I can get the WSDL just fine from localhost, but if I try to call the webservice from my laptop or any other machine I simply cannot connect to it.
I'm using SoapUI to test with and I just get a NullPointerException when I call it and if I try to get the WSDL via a browser it just times out.
I've tried to use a listener to see if I can connect to the VDI from other machines and that works just fint.
Any suggestions what I could try? - I'm thinking that it could be some property setting in some Jboss AS properties file, but the only thing I've found is "jboss.bind.name" which is set to "0.0.0.0" which should allow other machines to connect to the web-service, but no luck :/
Hilfe?
The solution was to add "-b 0.0.0.0" to my startup script
1.) I can create a simple application which has one routine called
function ConnectToDB: Boolean
and run it from my virtual directory (wwwroot/cgi-bin) and it connects and reports back connected .
2.) I can create a simple web service helloWorld
function helloWorld: String;stdcall;
I can create a client and call my web service call "helloWorld "and get my "HELLO WORLD" string reported back to me - everything works great.
3.) NOW, if i take my connection code from step one (1) and put it into a web service, i can not connect to the DB. It always reports back false.
Note: I am Using Delphi 7 to create my web service. I am using DBXpress as the conduit to the MS SQL Server DB, and the two INI files (dbxconnections.ini, dbxdrivers.ini) and two DLL's required for the connection reside in the same folder as the executables (wwwroot/cgi-bin).
Any help would ge greatly appreciated! Again, please be aware of steps 1 & 2, before responding.
Thanx!
How does the connection connect - does it use integrated windows authentication, or do use sql authentication - could it be that integrated auth doesn't work because iis is running as another user.
Also, when you connect, are you ensuring you disable the username/password prompt?
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.