I am trying to access a web service which is hosted by a third party service.
I am able to browse through the web service URL. The issue right now is am
not able to connect to the webserivce when I try access from IIS(5.1).
From the visual studio web server I am able to connect and get the results
When I try from IIS am getting the following error
"No connection could be made because the target machine actively refused it "
Thanks,
Nithin
Related
I am trying to deploy a .net core c# app to an IIS running on Windows Server 2016. I created a publish profile. I click on Validate Connection button and get the following error, that I need to install Web Deploy and that Web Management Service should be started:
I did install Web Deploy 3.6 and the Web Management Service is definitely running.
Here is my profile. The Site Name is AppPool\WebSiteName. User name is the same as I logged in on the server with.
What am I missing?
Figured out the problem. The Server entry needs to have the protocol. So http://winserver instead of just the name of the box.
I have WCF web service for connecting to a SQL Server database on a server and to return data in JSON format.
I can run this web service on my laptop from Visual Studio 2013 correctly when I am connected to the network what server is in it, with this url :
http://localhost:51220/Service1.svc/checkLogin?name=username&pass=password
I want to publish this web service and put it on a server (where the SQL Server database is installed). To access the web service from the internet, a url like this will be used:
http://serveraddress:51220/Service1.svc/checkLogin?name=username&pass=password
Now, how can I publish this web service from my laptop to the server? What configurations should be set in the publish settings?
And after publish, I have 3 files: web.config, service.svc and Sample.dll, what can I do with them? :)
I am very amateur on make binary from WCF web service.
You should host the service in the IIS, a simple tutorial can be found here:http://www.codeproject.com/Articles/550796/A-Beginners-Tutorial-on-How-to-Host-a-WCF-Service
There was a similar question asked here, but no real answer.
Here's the previous question:
Invoking SSIS Package from WCF service (tcp binding)
I have a very similar problem. I've got a VB.net application for the UI, and it calls a C# WCF service that I'm hosting locally in IIS, which in turn calls an SSIS package that I've deployed to SQL Server 2012 using the Project Deployment method. If I use the WCF Test Client to test the WCF call to the SSIS package, it runs fine. Once I deploy the WCF service to IIS, then try to run my VB.net app in Visual Studio 2013 and step through the code calling the WCF service, then step into the WCF service code, once it gets to the line of code that attempts to connect to my SQL Server instance, I get an exception stating
Failed to connect to server
The InnerException is
Login failed for user 'DomainName\PCName$
The connection string in the WCF code is like this:
SqlConnection connection = new SqlConnection(#"Data Source=PCName\SQLServerInstance;Initial Catalog=DBName;Integrated Security=SSPI;");
I've tried adding a Windows Authentication login to SQL Server for DomainName\PCName$, but it made no difference. Why would the WCF service be able to successfully connect to my SQL Server instance when I test it in Visual Studio using the WCF Test Client, but not be able to successfully connect once I publish the WCF service to my local IIS?
Please help me, I've tried EVERYTHING (I think). . .
I found the fix! Thanks for the suggestion Dean - this was a doozy. I'm new to posting to Stack Overflow, so please excuse my poor formatting. Basically, the answer was found here:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/ff441dc3-b43b-486b-8be1-00126cf53812/calling-ssis-packages-from-aspnet-packages-with-file-system-tasks-end-abruptly?forum=sqlintegrationservices
I created a new application pool in IIS, just for WCF services. I changed the Identity of that pool to a user that was an admin and had dbo privileges on the SQL Server DB. I then moved my WCF service to that new application pool, restarted IIS, and everything worked!
Built a simple MVC3 web app to ping a few of our servers for small bits of JSON data and report in a quick UI as a monitoring solution, deployed on Windows 2008 to IIS 7.
All of the outbound HTTP requests via the WebRequest class end up in a error: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:25946
Code works fine when running on a console app on the same server, or as console or web app running on a dev machine. Its only when running as a web app in IIS on the production server that this error happens.
The web app can connect to SQL server and MongoDB but fails at any plain HTTP request. Using an empty WebProxy set to localhost. (with the period) changes the reported error to a 404.
Try looking at the Host (or LMHost) files and make sure that there are no issues wit them.
Can i consume WCF service inside windows mobile 6 project??
I spend many days to solve my problem of adding web reference of WCF to smartdevice project
but the smae error appears.
There was an error downloading 'http://localhost:8731/Design_Time_Addresses/WcfServiceLibrary1/Service1/mex'.
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 127.0.0.1:8731
There was an error downloading 'http://localhost:8731/Desi
So i ask is it possible to consume WCF from windows mobile 6 project??
I create WCF and windows mobile projects in visual studio 2008 and when i "add web reference" to the mobile project to add the WCF and put the URL i get this error
"There was an error downloading 'http://localhost:8731/Design_Time_Addresses/WcfServiceLibrary1/Service1/mex'.
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 127.0.0.1:8731
There was an error downloading 'http://localhost:8731/Desi"
however i change the "localhost" to my computer IP address the same error appeared.
How can i write the URL that will be put in the client application.
The important part of the error is "Unable to connect"
This means that the add service reference has tried to make a call to the service, but the call failed.
The most likely reasons for this are:
The service is not running
The metadata exchange (mex endpoint) is not enabled
It looks like you're trying to get the Mex, but the service isn't running on the dev machine:
Try going to this url in your browser
http://localhost:8731/Design_Time_Addresses/WcfServiceLibrary1/Service1/mex
you'll probably get the same error (machine actively refused it)
Make sure the service is started.