Hosting ASP.NET MVC 3 application using MongoDB - asp.net-mvc

I'd like to hear if any of you had experiences developing and hosting such an application?
What do you think about combining the two? Is there a way to host it somewhere in cloud (Azure, Amazon...)? What resources (tools, drivers, documentation) have you used for development?
Thanks! :)

I have a couple of applications with asp.net mvc 3 and mongodb.
For the asp.net mvc app regular windows hosting.
For the mongodb i am using unix hosting (since it cost in several times lower than windows hosting).
Also you may need:
Official c# driver for mongodb: github
Official driver documentation: docs
Great ui tool (like management studio for sql server) for mongodb: mongovue
And mongodb manual ;)
That's all. Hope this help you quickly start development.
What do you think about combining the
two?
Mongodb good fit for many web applications, it can be easy used with asp.net mvc 3 since exists nice driver for c# that contatins all latest features.

I have recently developed a small application using ASP.NET and MongoDB. I hosted the application on cheap shared Windows hosting # www.FreeWindHosting.com and hosted the db at www.MongoLabs.com.
I will be writing a small backup service to back up my free MongoLab db to Amazon S3, but otherwise this setup works remarkably well, even with several "Handshakes" between the application and MomgoLab every request.

Related

Umbraco Site Deployment

I've an umbraco site which is currently on my localhost IIS..
I've see several hosting and it's have different price plan between umbraco hosting and the asp mvc site hosting..
To make my site live, are I need to choose the umbraco hosting plan, because my logic thing on local my umbraco site work normally in IIS without additional IIS plugin or setup.. So I can just choose the general asp mvc site hosting
I'm new to umbraco and this is my first time deploy an umbraco site..
Any idea guys? Thanks
Umbraco will run on any standard IIS based hosting that supports .Net and SQL Server. If you're using a SQL CE database rather than full SQL Server (or MySQL), you'll need to make sure that your host supports that too.
Also, ensure your hosting provider supports Medium trust and generally not Shared Server, although I have heard users getting this going.
If its within your budget buying a VM Server and handling the hosting provides total control over the environment.
Have you looked at Umbraco Cloud?

Offline and online application using asp.net mvc

brief history of my project:
2 versions of application, one running in windows form, another running in the web using asp.net
current task: to revamp the project to use asp.net mvc 4 to use only one version of code base.
In final product, there will no more windows form; but only the asp.net mvc. this is with regards with short development timeline.
concern:
my concern is for offline users.
maybe i can host the asp.net mvc4 offline using localhost and sql lite.
When offline users click on check update, there will be able to get the latest version of asp.net mvc 4 ?
any other better solution that is feasible ? i prefer the architecture fits the vb.net
Have you take a look at SPA. That kind of projects, by nature, can work in online and offline mode. One thing to take into account is the ammount of data that the offline mode should handle (most SPAs are using the local storage for offline use, which is a little small)
By looking at this site you will find a lot of resourses on SPA.
http://www.johnpapa.net/spa/
Deploying MVC app with Sqlite in localhost will be quite a challenge in term of maintenance. Maybe you can develop HTML + jQuery solution which can run locally on client system and make use of client cache to hold the temp data. Also it can interact with live app by making ajax calls.

How to run Wordpress with MVC app as virtual on Azure

I'm wondering how to run a Wordpress and virtual MVC application under the WP on Azure. I found a lot of articles about this but it is not working and Azure SDK is changing all the time, there is no actual informations.
Am I able to connect to the Azure Web Role IIS server remotely?
If you have any questions, please ask before answering.
Update by Jim O'Neil comment
Yes I mean ASP.NET MVC. "Not working" means taht WP on Azure by this and ASP.NET MVC app works separatelly but together doeasn't. When I try add ASP .NET MVC as VirtualApplication by this tutrial VM on Azure is always in Busy state.
I need have an WP deployed on my domain example.com and ASP.NET MVC app at example.com/mvcapp. This should work on the Azure platform and could be reached by Virtual application feature of IIS. Then I hope that the Azure Web role is usable for this.
Do you have any idea?
If you really want to run wordpress website as www.example.com and ASP.NET MVC app as www.example.com/mvcapp then you could need to be little more creative to get it working. It is a doable task but need good understanding of Windows Azure platform, how Web Role works as well as PHP/WordPress knowledge.
I can point out some ideas on how you could do it but you would need to venture out to try and test. What you really need to create a ASP.NET Web Role with PHP support and have Wordpress configured to it. This could be done at runtime or you can put together worldpress along with the PHP itself so when you deploy your application whole wordpress is configured as package. Now in the same web role you add virtual diurectory and have MVC app running as application there.
Keep in mind that whole web role will have one single web.config so you would need to make it work with both ASP.NET PHP application and then MVC application. Tough task to handle these two and will take time to put together.
The other easier option is to have PHP running inside a ASP.NET MVC application and in the PHP folder setup your Wordpress application. This setup is easily configurable but it will change the location for wordpress and MVC app other way around.
Overall I really think you should rethink what you really want at the last because your objective just does not match with a need to have wordpress and ASP.NET MVC running together. If you just want to try for experiment, it sure is a great project and make you learn a lot.
This question is asked earlier # SO also but had same response i.e why?
I am not sure about on azure, but on IIS7 we have WP and the URL Rewriter setup as the default website and then deploy asp.net and ASP apps to virtual directories and turn off the URL Rewriter in those subdirectories. Works beautifully. Downside is that PHP runs like a dog on IIS compared to ASP/ASP.net. We are switching to using WP on LAMP and then continuing to run our ASP/.net apps on IIS7. Downside is that the WP after switch over may effect our SEO a little. IIS is www and WP will be ww3.
You might check your URL Rewrite rules if any.
You can create a website in Azure using a wordpress template VM.
You can also use http://wordpress.brandoo.pl/project/ which has an image available in Azure, this means you can use a SQL database rather than a MYSQL database which may help.
You can have one VM being your MVC app pointing to www.mydomain.com and you could have the worpress in a separate VM with say blog.mydomain.com
This would make maintenance easier I think

Restful Web services for Mobile App - What language, framework,infrastruture?

I am very new to IOS development.I wonder which language/framework everyone is using to create RESTFUL web services for high traffic, scalable IOS app backend.
The solution requires:
1. Secure Login
2. Restful web services (JSON)
3. High traffic
4. File upload/download
5. Quick search result from large volume database
I am from .NET and MSSQL background. I heard people are using PHP, Java, Python, RoR with IOS webservice development. I understand every language can have pros and cons, just want to know what is prefered in today's trend.
And for database, is NoSQL database a prefered choice than RDBMS for scalable large volume databse? I am checking MongoDB.
Apologies if I am asking wrong questions. I am investigating the technologies for this new project, and any input will be greatly appreciated!
Thanks
I have worked in three major projects that all of them have desktop clients, web clients, and mobile clients (Android, iOS). The 3 have completed different server side approach, and all of them make me and the users happy:
Project 1:
Server: Delphi + RemObjects
Clients: Delphi desktop apps, PHP Web apps, Java applets, Android apps, iOS apps
Why Delphi? Because the existent project was already a Delphi multi-tier app, the development team have domain of Delphi platform, ans was easy with RemObjects (or even with the standard DataSnap) to return JSON, SOAP or XML-RPC to be invoked by the clients;
Project 2:
Server: PHP
Clients: ExtJS Web apps, Android apps, iOS apps
Why PHP? The development team was experienced with PHP, the projects was originally a PHP web app with some classes well defined and not coupled with the UI. Some new classes in the server that reused the existing code base, just converting to/from JSON were enough to allow the clients to talk to the server, with minimum effort.
Project 3 (initial development):
Server: C# ASP.NET
Clients: ASP.NET apps, Android apps, iOS apps
Why C#? Again: the development team was experienced with C# and ASP.NET, the projects was originally an ASP.NET app. We are refactoring some app logic into web services that will be consumed for both the ASP.NET app and the clients.
As you see, there is no need to make the team learn something completely new on the server side.
I'd suggest you to keep your development in .NET with MSSQL, taking advantage of your current skills.
If the application traffic grows you can move the server app to an IaaS server (like Amazon AWS EC2) that supports SQLServer, or even better to a PaaS server, which in this case Windows Azure will probably be your best friend.
These are all loaded questions that can't be answered without more information about what you're making, etc. I use a combination of Ruby with Sinatra and DataMapper (and SQLite/PostgreSQL) for most of my projects, but that's my personal preference and probably won't be of much help to you.
Rather than choosing a technology stack based on trends, why don't you just pick something with a good user base for help and go from there?

Is it possible to host a asp.net mvc website from a winforms application?

I have a winform application that controls some transmitters and sound cards. There is a requirement to be able to provide a web interface for controlling those devices.
Currently I use WCF to communicate from the controllers in my asp.net MVC site to the winform app. That works well, but there is now a desire to move the hardware to another machine when needed and that means that IIS has to be installed and set-up on that machine.
I know it isn't that hard, but I won't be the one actually doing the moving. It will be the users. If I could host the site from the winform app them it would basically be portable besides the hardware drivers need for a usb to serial converter we use.
Can you use a windows service? The whole winforms app as a service doesn't seem right to me. It assumes that the app is always running. I would create a windows service and expose WCF endpoints from that.
You will need to install IIS or Cassini to host the MVC web site. There's no way around that.
Huh, I would go with Greg's answers.
Also, making your app IIS dependant is not that bad. Or Cassini dependant. You don't want to end up writing your own webserver, which could easily happen when you continue to add features to the app.
I don't know about you but it just feels you are taking all the load on yourself, you are going to spend possibly dozens of hours to implement it to spare an hour or two for someone who doesn't want to install real webserver.
if you want to host MVC under winforms then i would look into the upcoming .netcore 3 version which should allow this combination.
though you'll have to wait until 2019 Q1
https://github.com/dotnet/core/blob/master/roadmap.md
otherwise i've mostly hosted simper stuff using nhttp library if i want it in a winform app.
(NHTTP is a library that gives you very simple crude http request functionality so no mvc sadly but it works for simnpler stuff)

Resources