Can a .NET web application be host on dedicated linux server with static IP and run this web app as a web site? - asp.net

I am working on a project which is a web based in which it has three different modules. For this whole project I am using a dedicated server with static IP which is a linux server with MySQL as a database.
Now my query is, in my project I am using a web and desktop application which connects to my server. Now my web application is integrated with my company website which is done in .NET
Is it possible to host my website in my dedicated server which is a linux version?
Could some one tell me which is the best way to run my whole project in a better way.
Thank you.

You can access a remote MySQL server instance from your .NET application, you need to ensure that any network routing and firewall rules let you through. You must ensure that the application server can reach the MySQL server on the 'listening' port (probably 3306).
Ideally you will have both the database server and application server in close proximity and on the same local network, otherwise there is no problem in this hosting architecture at all. Web applications and databases often require different tuning optimisations and for redundancy purposes it is also good practice to separate them out. Of course, you only have redundancy if you have more than one application server and more than one database server.

Related

Excluding a particular IIS website from the web farm environment

We have developed a website that uses In-Proc sessions, stores images uploaded from it on a folder inside its own virtual directory, and uses a third party tool that uses server side caching. This setup works just fine in a single server instance.
But the client has a web farm environment. When we deployed this site on client's web farm. Things started failing. Till now -
we have enabled out-proc session, using SQL state management server
we specified a machine key in the web.config of the server
But the other two, specially the third party tool, is proving difficult to crack.
Will it be possible to remove this one website from the web farm? excuse me if the question sounds naive but I am not a server administrator and not aware of its nitty-gritties
Will it work if we just deactivate one of the websites?
Can we deploy this website on one of the servers in the farm, but keep it outside the web farm's load balancing?
Is there any alternative, other than deploying the website on a completely different server?
Not sure on what vendor the balanacers are but the network admin should be able to setup a VIP (Virtual IP) that translates only to the once server in question.
That is a simple answer but there are many other variables in the network architecture that would have to be answered to accomplish this. I suggest you contact the administrator of the load balancers and ask them if you can isolate traffic for the website to the specified server.

How to host and deploy an ASP.NET web application on a local server

I have created a small web application with one page only. Now I want to host and deploy this application on one of our business's server so that anyone can access this small app.
Could please anyone tell me what will be the process as I don't have any previous knowledge or experience of doing this also, what changes I do need to make in my web config and the IIS configuration.
Kind Regards
Firstly: Install IIS on the server that you want to host your application on
Secondly: Setup the site in iis
Thirdly: If you have a database connection in your app check that the connection string is updated
Fourthly: Make sure that the relevant port in the firewall is not blocked

Reflecting (or loading dynamically) Asp.NET website from the other server

What would be the best architecture for ASP.NET MVC 4 website that has to be updatable when there is no (maintenance)access to the only server accessible from the Internet?
We have two servers: Server A has Internet access, but where we can't make updates when needed. Server B won't have this problem, but it's behind firewalls and can't be accessed from the Internet.
I have come up with a couple of ideas:
Run Asp.NET site on server B and build simple proxy to server A and tunnel the traffic. (how?) (cf. WCF routing)
Somehow dynamically load almost whole site from server B. It's Ok if the very core of the application can't be changed, as long as every sub application can be. Maybe build some maintenance page what provides action to load newest libraries and files from the server?
Build external updater -software.
Server A is also used by other companies and for example IISRESET is out of question. Application Pool that hosts the application can of course be recycled if needed.
With WPF I would just download the newest binaries and load them dynamically when starting the application, but with Asp.NET and IIS it's a bit more complicated.
Run Asp.NET site on server B and build simple proxy to server A and tunnel the traffic. (how?)
Any HTTP proxy can do this, with a mere handful of clicks or commandline instructions. I wouldn't go any other road.
Maybe try to run on Server A a WCF service, which can copy whole site files from Server B to Server A (I suppose Server B is available from Server A locally). In this scenario Server B is for updating and WCF service is only for deploying.

IIS, EC2, Web Farm, Web Deploy and ELB

I'm a developer now developing my startup. I really don't know much about IIS setup. I will host my startup on Amazon EC2. And I want to know how can I scale my application if my traffic increase. I been reading about MS Deploy and Web Farm Framework here: https://serverfault.com/questions/127409/iis-configuration-synchronization-for-web-server-farm . And I want a simple architecture, with not to much configuration. So I been looking an experience with an IIS web farm and Amazon ELBs. And I did not find any one.
So the question is:
It is possible to make a IIS web farm with Amazon ELBs?
Any experience on Ec2? IIS web deploy or WFF and/or without ELBs?
What you recommend for an easy web farm setup?
You can do almost anything you want with IIS on EC2. They are full servers (well window 2k8 datacenter edition) and you can open any ports you need to communicate between servers. Here is an explicit tutorial on how to set up WFF, for example, on EC2.
The question is, are you sure you need to build a web farm? If you simply want to have multiple servers running your code then you can accomplish this without anything more than IIS and the tools that EC2 provides.
You build your app so it uses shared resources (like a session state server, central location for storing user uploaded content), configure a server the way you like it, and capture a server image (AMI). You use this image when you configure AutoScaling to launch new instances based on server metrics (like CPU usage), and they would be automatically added to the load balancer when launched.
The last challenge is ensuring servers launched automatically are running your latest code. You can write a custom program to get the latest code from somewhere (like SVN) on server startup, or you can use something much simpler like Dropbox to handle the synchronization.

How to run a leightweight ASP.NET MVC application that would be accessible only locally (not on IIS)?

We have a desktop client application and recent customer requests indicate that they would like to have some dynamic HTML content served and displayed by the application.
We are considering hosting a simple ASP.NET application in a local process, accessible only from the local machine (similar to the ASP.NET development web server used when debugging from Visual Studio).
How can we run an ASP.NET application locally without IIS? IIS is not an option because most client machines will not have it installed.
Is there a leightweight ASP.NET web server that could run locally similar to the development web server that VS is using?
I have found some information about "Cassini". Is this suitable for production use? Can it handle ASP.NET MVC? Are there any alternatives we should consider?
I have not used it myself, but you can try the mono XPS server.
It is a stand alone webserver.
The easiest way to start XSP is to run it from within the root directory of your application. It will serve requests on port 8080. Place additional assemblies in the bin directory.
Cassini is in fact also a good option - it is the development web server that comes with visual studio (so widely distributed, used and tested) and is also used by the open source ScrewTurnWiki. See wikipedia.
In regards to your "only locally" requirement - a web server will serve any request made to the right port. In order to limit accessibility, you should use a firewall that will block any external requests.
You might consider using WCF to host a service on the local machine that can serve the data without having to host a full blown web server.
If you do this, WCF allows you to expose the service with multiple endpoints and make it available through HTTP, TCP, or Namepipes. Namepipes would restrict traffic to only the local machine.
I have also tried IIS Express. It works great with ASP.NET MVC. Right now it is available only with Web Matrix, but installing web matrix is easy.
Coming back to this question three years later, ServiceStack.NET with self-hosted option seems like a good choice. While it is not ASP.NET MVC directly, it provides a good API and features are on par with ASP.NET MVC/WebAPI (or in some ways better).

Resources