I have written a stateless WCF REST Web service. The main consumer of this web service will be a mobile app. There could be 1000's of clients connecting to the web service simultaneously. And this number will increase in the future.
How do I deploy the WCF web service so that it scales nicely. I am guessing the web service will be hosted in multiple servers and a load balancer will distribute the traffic among there servers. Can anyone suggest a load balancer typically used for such a scenario?
Is there any other recommended way to deploy the web service for scalability?
Frankly speaking I haven't tried this... So this only a thought
I would Install Microsoft Azure Service Bus for Windows Server and then connect/setup all available instances of Web Service to the Service bus endpoint.
There is a buildin load balancer.
Pros:
There is a build in Load Balancer, easy.
Related
Does anyone know what the options are for hosting legacy .NET4+ WCF services in Azure?
I have heard that App Services are not to be used, but I have trouble finding any sources.
You can host your WCF services in multiple ways
on IIS
as Windows Service
as Console App
For the windows Service / Console App, you can:
Setup a VM and also install it
For the other options:
You can deploy on App Service or also on a VM with IIS installed.
More info:
https://aspdotnetcodehelp.wordpress.com/2017/11/13/hosting-wcf-in-azure-app-service/
The basic areas to consider when migrating an existing .NET application to Azure are:
https://learn.microsoft.com/en-us/dotnet/azure/migration/choose
Compute choices
Database choices
Networking and security considerations
Authentication and authorization considerations
To host a WCF service in Azure, you can check out the following tutorials.
Expose an on-premises WCF service to a web application in the cloud by using Azure Relay
Deploying an existing WCF service to Azure
I created a WCF Service Library, which I host via a Windows Service.
Is it possible to save information across API calls?
I know that if I host the WCF Service Library in IIS with ASP.Net compatibility turned on and making a few modifications to the WCF library that I can use
HttpContext.
HttpContext.Current.Session["name"] = <value>;
WCF started as a Windows Service does not have ASP.Net support to the best of my knowledge, as the library is not hosted by IIS. Is there a way for a WCF library launched via a Windows Service to save information across calls for a specific caller?
I have to create an application which communicate with DB through WCF Service. WCF service will be hosted on client's server.It will be an intranet environment. I want to use NetTCPBinding to get the performance benefit.
If i use IIS7 to host my service on client's server, then source code is available to client. I don't want to make source available to client.
My question is.
How do I host my service so source code would not available to client?
While we are hosting WCF service in IIS 7 can we provide only WCf service exe? If yes then how Please explain.
Here is quite detailed guide of how to host WCF service in IIS.
No need to put your source code there.
I am create an iPhone app that needs to talk to a Windows C# app. The app will run as either a Service or Form Application.
What would be the best way to accomplish this? Ideally exposing a service-type architecture would be best as I don't need a stateful connection (stateless is fine in this case).
Can a WCF service hosted by my app using a form of TCP binding be consumed by my iPhone? Or can an app host using httpBinding without the aid of IIS or some other web server?
To run WCF on iPhone you need MonoTouch. Currently, which isn't completely implemented.
I don't think it's a good idea.
Web Service are a better idea in my opinion. You can spawn a web service listener from your console/gui/service Windows C# application.
Here's what I ended up doing:
In my .NET windows service, I created WCF service bound using a WebHttpBinding endpoint. Doing so exposed my WCF services as JSON.
From the iPhone, using Objective-C, I used the ASIHTTPRequest and json-framework libraries to talk to and parse the JSON web service exposed by my .net app.
Expose your C# application functionality as a ReSTful web service. More information on exposing WCF service is available here
And there are project templates available for creating REST WCF service. Download the WCF REST starter kit.You can expose your service in XML/JSON format.
Then from your iPhone app, you may consume the web service exposed.
I have heard that you can host non-web based applications in IIS7 similar to windows services. Basically I want a C# app that is just a process running all the time to perform a specific function. I want to create a process that connects to the database at an interval and does some work.
I would like this whole app to be housed inside IIS. Is this possible? Can you provide me with links and resources to get me started?
WCF services can be hosted in IIS. Abstractly, think of them as webservices. Really much more, than that, but it gives you the gist. More information:
How to: Host a WCF Service in IIS
Why we use wcf rather than web services
How To: Hosting a WCF Service in IIS
Take a look at AppFabric it's Microsofts Application Server
http://msdn.microsoft.com/en-us/windowsserver/ee695849.aspx
http://www.hanselman.com/blog/InstallingConfiguringAndUsingWindowsServerAppFabricAndTheVelocityMemoryCacheIn10Minutes.aspx