Live, shared hosted, ASP.NET MVC site migration to Windows Azure - c#

I have an existing ASP.NET MVC based website. Very typical: XHTML, CSS, jQuery, C#, LINQ2Sql. Web.config tells app where to connect for SQL database.
Are typical websites like this easy to port to Windows Azure? What sort of headaches should I be ready for if I decided to do this?
It's not necessary at this time, but I'm planning for when I need to get the site ready for scaling. Thanks in advance!

i just found these two links that seem helpful for ASP.NET. Plus two more for SQL Azure.

Related

Main website on ASP.NET C# with folder in PHP

I needed some help in understanding how i can get this setup completed. Due to the current setup of the website, we have a "/blog" that is powered by Wordpress PHP. We are looking to upgrade the website with ASP.NET C# for the main website "/" in a Windows Azure server but maintaining "/blog" on a Linux machine.
The service doesn't wish to use sub-domain for the blog in fear of losing too much SEO value that cannot be duplicated.
May i ask how can this be done?
Thanks!
Make the php website a subfolder of your main ASP.NET site as described in Create a Separate Site or Virtual Directory for PHP Content.
See also Can PHP and ASP.Net run together within the same web site in IIS 7.5?

ASP.net solution considerations for multi server deployment

I've done all my development of an ASP.net website under the assumption that it will be deployed to a single server. Since we're expanding we're looking at hosting scalably in the cloud with multiple VM's running the website. We are taking expert advise on deployment, but the hired help we have are expecting an ASP.net site that will work in a load balanced environment.
I'm researching what in my solution may need to change for it to work on a multi server deployment.
So far, I've found that all my caching needs to be done on a distributed cache such as NCache. The code changes required for this don't look too bad.
We don't use sessions for user authentication, it's all done via cookies so I don't think that will cause any issues.
What other general considerations need to be made? (I've looked for a guide but can't find one).
If you use sessions to store data between calls, you are going to need to move to the SqlServerSessionProvider. you'll also need to have the same machine key for all servers on the load balancer or viewstate won't work.
Here's a link from Scott Hanselman that list the gotchas.

Getting help from web cloud services (calling from asp.net mvc site)

I have a website, but some of the back-end infrastructure is little slow.
So I am planning to get help from CLOUD, I haven't decided which one yet.
I need to know does Microsoft Cloud does the same thing.
What I need is following,
1) Have database on external web resource.
2) Have code and http enabled methods that I will write in C# and place it on Cloud.
3) And call the methods in step 3 from my asp.net MVC wesite's codebehind and client side(javascript).
I need to know if I get support from Microsoft Cloud platform, will I get the solution required in above 3 mentioned points?
And if I get support from Microsoft Cloud, then the coding syntax for SQL, will be same as if I run queries against normal SQL Server database
Thanks,
If I am understanding you correctly in that you are looking to have a cloud hosted SQL database and HTTP access to this database through custom C# code, then yes to all three of these.
You can set up your database as an Azure SQL database and create an ASP.NET WebAPI application to open up your database to HTTP calls as you see fit. Then you can use the REST client of your choice to access your database from your MVC controllers or through Javascript in your views.
Also, yes, SQL syntax for Azure SQL is the same as for regular SQL Server.

How to communicate between ASP.NET & C# Application

I am in the process of developing a project that will require communication both ways between a ASP.NET website and a C# Application.
For example if I wanted to click a button on an ASP.NET webpage to retrieve the status of something.
How could I implement this communication between them?
Please note I have never used ASP.NET before, hence my question.
You can use same database in both website and application. If you want to transfer something from application to website, like a file, then you will need a web service or WCF service. But your wish seems like a shared database by website and application.
I think You should go through this link.....it has all the basics of asp.net and c# in very easy manner compared to all the other websites....
http://www.w3schools.com/
You could make the C# application write data somewhere and have ASP.NET read it there. Either to a database (which makes the most sense), or to some file, like an XML or JSON.
Storing communication on a database seems like an easy way to do it.
You could use a webservice, but that would need to be hosted by the website. The application could still poll this to write and read when needed though.
I think I found what I was looking for:
A Beginner's Tutorial for Understanding Windows Communication Foundation (WCF)
http://www.codeproject.com/Articles/406096/A-beginners-tutorial-for-understanding-Windows

ASP.NET website to be deployed on Windows Azure with databases

I know this is a very common question and I could find several answers, but I think my situation is a bit different.
So, I have an ASP.NET Website (NOT a web application), built using "Web forms". Its a very simple website which does bunch of REST calls and talks to the SQL Server 2008. Can you please help me finding a step by step guide to deploy the same on Windows Azure using VS 2010? As of now, the website runs fine on a traditional web hosting server.
So far what I am getting are approaches which use MVC (and using ASP.NET web application, not website). I don't think that I should be concerned about MVC at all? Does a website vs. web application aspect make a difference? If yes, do I need to convert the website to web application?
There's a lot of content on web, so I am a bit confused given my condition. Can someone please put me in right direction? Thanks a lot.
You'll need to convert your Website project to an ASP.NET Web Role project, whether you first convert it to a ASP.NET Web Application or not doesn't really matter. The rest of the tutorial you already linked to applies just fine.
There's no need to look at ASP.NET MVC, It's a different technology than web forms, and there's no need to move to it in order to get your site hosted on Azure.
As for your database, unless you host that yourself in a VM-Role or somewhere else (and connect it using Azure Connect), you'll need to convert it to Sql Azure or Azure Table Storage. SQL Azure is largely compatible with SQL Server, but there are a few features which are unsupported.

Categories