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

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

Related

WCF Test Client Error Cannot obtain Metadata

I'm trying to run a website using IIS, but I can't get the service to work.
The service uses the protocol net.tcp and the listener is running:
net.tcp listener
The endpoint and service is correctly created:
c# code for service and endpoint
And here is the IIS website:
IIS service website

force https on an asp.net core 3.1 web app running as a service on a windows server 2008 rs server

I have an asp.net core 3.1 web app which uses azure windows authentication. When I run it on VS or as a service on my local computer (windows 10) it works fine and uses https for all requests. I copied the exe file and dll's onto a remote server (windows server 2008 rs) and created a windows service on the machine. When the browser connects to the service the authentication is done over https but when it returns to the app home page it uses http. Any ideas why/what I can do to force any and all requests that are made be over https on any OS/platform?
This is likely due to your local environment having a development certificate installed which the default application configuration uses for local HTTPS. Authentication is performed over HTTPS as the user is routed to Azure to authenticate.
In production, HTTPS must be explicitly configured. At a minimum, a default certificate must be provided.
To enforce HTTPS in production you need to configure a certificate. The following article explains the various ways to configure a certificate: Configure endpoints for the ASP.NET Core Kestrel web server.

published asp.net web app and published wcf service not connectiing in IIS

I have published both my WCF service and ASP.NET Web application in IIS but i seem to have a problem connecting to the database after publishing. Its like the two cannot see each other. I have tested both and saw that they have been successfully published.
the service reference is referenced in the web application and works as normal when i run the web application locally but not working after publishing.
Is there a setting that i am missing. Both are hosted on IIS.
There is possibility that you are using
Windows authentication, I mean if Integrated Security = true in your connection string than make sure your Windows authentication enabled in your IIS.
Do this if this is the case.
IIS7: Setup Integrated Windows Authentication like in IIS6
if this is not the case than this answer is helpful for you
Change connection string from development to production when publishing

Publish web service to server

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

WFC application on a local computer

I have a WinForms application that accesses about 80 WCF services. These services are hosted on a web server.
Now I have to change this application to run 100% locally on a computer.
What is the easiest way to do this without having to install IIS on a local computer?
Thanks!
there are 4 hosting options for WCF services:
Self hosting
Windows Service
IIS
WAS (Windows process activation service)
It's been my experience that self hosting is easy enough to set up quickly, and flexible enough to change later.

Categories

Resources