views:

190

answers:

8

If I develop a desktop app using C#, and later want to turn it into a webapp but don't want to use ASP.NET, what are my options?

I did a bit of searching and it looks like there doesn't appear to be a good solution to integrate C# code with any scripting language other than running it as a web service and making SOAP calls.

Any other ideas?

+3  A: 

Why would you make things so difficult for yourself? The best thing would be to put almost all of your code into an assembly, and just use the winforms app for display purposes. Then, later, you can just reimplement the display logic in asp.net.

So, I guess the answer is no.

Chris Lively
A: 

AJAX + WebService + plain HTML

Mote
A: 

You could embed a webserver in the application. It's quite easy, even with threading so that you can handle simultaneous requests.

There's a bunch of examples on the web, here's one at the codeplex: http://www.codeplex.com/webserver

A: 

The reason I don't want to use ASP.NET is that I can't seem to find any decent (ie recommended) VPS hosting and I don't want to go with dedicated hosting right off the gate. Linux hosting is much more plentiful.

I guess the other thing I could do is use Mono and forget about PHP etc

mono is probably your best bet if you already have C# objects you'll want to use.
Joel Coehoorn
http://maximumasp.com/ are pretty good for .NET hosting
Ilya Kochetov
A: 

It would be easy enough to have your application offering a SOAP service, which you could then integrate with a front-end in pretty much any language.

If you really want to avoid that then just go for some less recommended but cheap ASP.Net hosting and use that - if the application is a success you can always shift to dedicated hosting later. It's worth spending a bit of money to make your life a whole lot easier and from what you have said there really isn't a lot of point in avoiding ASP.Net if it means you have to do four times as much work.

glenatron
A: 

How about ASP.NET on Mono? How painful is that realistically?

A: 

I can't leave a comment for your reply about hosting but I've had .net hosting with Lunarpages for ages now and found it to be just about as affordable as linux hosting and with the same perks like php support, unlimited mysql and ms sql dbs etc.

To answer the mono question, it's fine but I think Mono only supports up to 3.0 ATM.

Echostorm
A: 

I vote monorail. Keep a nice MVC model.