Publish web service to server - c#

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

Related

Azure VM IIS Server - Web Deploy

I created Virtual machine in Azure, i set up server, installed web deploy 3.6, management service
But if i want to publish my website to this server i am still getting this error
You could check this blog.
Please ensure web deploy service is listening. Also, you need open port 8172 on Windows Firewall and Azure NSG.

Web Deploy to IIS fails. Why?

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.

Web Application in IIS 8 not consume a web service.

I make a web application in Visual Studio 2012 that consume an Axis Web Service. When run my application in debug mode (iis express) works fine and get data from web service, but when deploy my application in IIS 8 return "Unable connect to the remote server" (SocketException). I think it's an IIS configuration that I need . I took several hours trying to solve this problem and your help would be a blessing . Beforehand thank you very much.

Calling SSIS package from WCF

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!

Deploy wcf web services on remote windows server 2008 with IIS 7

I have some questions on deploying wcf web services on IIS 7:
I don't configure any endpoint or service in my *.cfg file, i enable only metadata and includeExceptionInFaults, but services are working properly on local server, when i debug application local IIS server some choose the port, endpoints. The questions is: will work web services without concrete configuration of endpoints / services, and this approach is good?
How to deploy application on a remote IIS 7 server?
Yes. Without a endpoint configured, a WCF service is self sufficient to work. It will by default use basicHttpBinding and the address based on where you place in IIS.
Refer to Default end point of WCF service for more detail.
For hosting in IIS, you can find a detailed walkthough in How to: Host a WCF Service in IIS

Categories

Resources