Self Hosting Web Application versus IIS Hosting? - iis

I am in the process of building a Web based client for a Server application which is running as a Windows Service. The server application currently has a Windows Form based Client Application written in C# and the idea is to obsolete it and provide a new Web based Client Application. The Server application will be exposing REST based APIs and the Client Application would be using the REST APIs to communicate with the Server Application. (Currently the Server App exposes SOAP based endpoints which are consumed by the Windows Form Based App)
The Browser based client application would be written using Angular JS. The Client Application would be used by at max 10 concurrent users. The App is targeted for system administrators and would be used inside the enterprise environment.
Another requirement is to integrate Active Directory Authentication for the Client Application. So given the performance requirement and authentication requirements, I am wondering whether I should use IIS for hosting the Web Application. Or should I just use the existing Server to self host the web pages.
If at all I go with Self Hosting option, would Katana Self host be a good option? Or should i use WCF Rest kit to serve the pages?
What are the performance implications of using a Self Hosted mechanism for hosing the Web Application compared to IIS?
Any suggestion would be greatly appreciated.

WCF REST Starter kit is still in second preview 2 version from 2009 so I'd be pushed to recommend using it.
The question of IIS or self host depends, do you need the features that IIS has out of the box like logging, restart after failure, etc?
My suggestion would be to use ASP.NET Web API (or Nancy, which is an excellent choice too) but keep your hosting layer separate from your application layer so you have the flexibility to decide how you host your service later on.
The second suggestion is performance test early on, pick a hosting mechanism and measure how the service copes under load - you may find out that you're worrying about something that you don't need to.

Related

How to synchronize more than one IIS web servers

I have a .net web application, I want to host the app into more than one IIS web servers. The web servers must synchronized so if one web server is down than the others should respond to user requests.
Check out tools like:
gtg.dk
deploybot.com
Check out also deployplace it is very similar to DeployBot, but much more powerful and allows to deploy complicated application. It's still in beta, but there is a free plan.

Web API and web application in one project vs separate projects

I am completely new to the concept of servers, web APIs and web applications. I have a project where I need to design a Web API that allows clients to modify a database (hidden from the clients through the API).
And there is also a web application which has some functionalities. The web application also has to interact with the database.
So my question is, should I develop the Web API (Server) and the web application in the same project or two different projects?
I chose to implement the system using Mean stack for learning purposes. Mean stands for MongoDB, ExpressJS, Angular and NodeJS. As the Mean stack contains technologies to develop both the API and the Web app, am I supposed to develop all the code within one project and deploy it in my server or separate the Web API and the web application into two projects?
If it depends on the scenario, then to which kind of scenarios should I choose each and what are their pros and cons?
If shortly, Web API, it's backend, it's service, which you use in web application, and, web application, it's frontend, it's web site, which you see in your browser.
You can create one repo at github but server-side and client-side projects are separated.
You can choose the structure of your server-side and client-side projects depending on the purpose of your project. If you are going to create web application and then to develop mobile application (with ionic, for example) you should create web API separately. If you are going to create only the web application and to deploy your web application and web API to the same service (like heroku) you can make the same structure as in the heroku example (https://devcenter.heroku.com/articles/mean-apps-restful-api , also check the repo of this example https://github.com/chrisckchang/mean-contactlist-angular2 ).

App authentication with WebApi on External Servers

We're looking into writing a mobile app for our company and have a concern as to the infrastructure of how the application will connect with our data.
Our current structure for our web applications is as follows:
We have an App server which holds our .NET sites, this is externally facing (obviously)
These .NET sites interact with our API server (which is only accessible by anything on our App server) So this is only internally accessible
A mobile app will not be on our servers, but it will still need to be able to access our API's. What would be the best course of action to be able to still maintain a level of securing our data in our API's while being able to have them externally accessible by a mobile app or any other app that would need data from it?
My initial thoughts would be some sort of API key system, or perhaps API users?
Thanks!
You should encrypt your API with ssl. You can also use an API management solution. There are some open source options such as: http://wso2.com/products/api-manager/ and API Agility https://apigility.org/

What kind of application can I deploy to Windows Azure

I can't find answer for this simple question: What kind of application can I deploy to Windows Azure?
Can I upload only ASP .NET apps or can I upload:
Windows Forms Applicaton
Windows Presentation Foundation Application (WPF)
Other?
Here's a summary of the sorts of applications you can host on Azure:
Platform as a service
Azure Websites
Most existing / new Microsoft-stack (IIS-hosted) web applications (ASP.Net MVC, Web API, Web Forms, etc.)
A bunch of existing / new web applications written in other popular languages (Java, PHP, Node.js or Python)
Azure Cloud Services
Newer Microsoft-stack (IIS-hosted) web applications similar to above, but with some additional functionality / overheads (this answer will give you a good comparison of the two)
New web (IIS-hosted) applications designed to take advantage of Azure hosting (for example separating front-end and back-end concerns using web and worker roles, again covered in the linked answer)
Infrastructure as a Service (VMs)
Anything that you might host in a VM in another data centre / on another cloud service provider--usually legacy web applications / services, or those where the owner avoid tying their application code to a particular vendor by building on top of their PaaS
You'll notice that these are all basically webby, which excludes the likes of WinForms, WPF apps, and any other applications that are designed to run for users on their local machines. To directly answer your question:
ASP.Net applications--yes, you can host these on Azure
WinForms applications--no, you can't host these on Azure
WPF applications--no, you can't host these on Azure
Other applications--if they're web-based and fall within the broad descriptions above, then there's a decent chance you'll be able to host them on Azure, but it really depends on the nature of the application
Windows Forms and WPF applications typically comprise of a rich client application as well as dependencies on backend services and databases. Windows Azure provides a great host for the backend services and databases - and you can learn more about this here - especially in the compute section. There is also a lot more you can do - so just take a look at the other links for more information.
Enjoy!
Jason

Recommended approach to hosting a two-tier web application in Azure Web Sites

I'm fooling around with a WebAPI application I've developed in two solutions: one solution is the WebAPI / serverside solution with db access using SQL server, the other is a durandalJS client application. I have the WebAPI bits hosted in an Azure Website right now, but I'm not sure where to put the client solution.
Should I throw it in its own website and just have it make requests within azure across to the other website? I want to avoid putting them in the same solution because I would eventually like to practice load balancing the front-ends when I have more dough to play with.
Idea of cloud like Azure is pay as you go. If you do not have the volume currently to load-balance, why create two websites and pay for them both regardless of the usage? You can have just one web site and host both the web application and web API. In the future, if you want to separate out API piece and load balance web app, you can do that when you have the volume. For this approach to work, structure the solution like this. The Web API piece will be just an assembly which you can reference in the Web application itself and host it in the same web site as the web application. In future, if you want to separate out, create a new empty ASP.NET Web application and host the Web API referencing your Web API core assembly.

Resources