Upload a .net application online? [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm about to do a project on financial data visualization. Nothing advanced really, just some user input manipulated and visualized as an output with some charts and numbers. The thing is though, that even though the plan is to have it as a .NET desktop application to begin with an idea is to later transform it into a web based application. And since I've got no experience with that whatsoever my question is simply: Can one write a desktop application in C# .NET and later "upload" or "convert" it into a web based interface without too much work?
I've heard of ASP.NET that seems to be a pretty well used framework for web applications, but I cannot find anything about converting a desktop application into ASP.NET application.
Thanks in advance!

IF you divide your application into parts as you should - e.g. business logic, data access layer etc (into different dlls preferably), then all you need to do is just create a new UI, which isn't as bad as creating the app from scratch...
There is obviously a confusion in definitions. You (and it seems some of the guys that posted their answers here) have probably misunderstood the technology.
You can't compare ASP.NET to C#, because one is a web framework, the other is a programming language. ASP.NET can and does use C# (or VB.NET or other .NET language). ASP.NET can then be divided to MVC and Webforms. If you want to compare it to something, you should compare it to windows frameworks like WPF and Winforms.
That said, if the two apps have the same functionality, the logic and the C# stays basically the same. The only thing that changes is the framework that's used for the UI. That's why I'm talking about dividing the app into subprojects, which you can then reuse as needed.

As far as I got your question, there is no way to convert a .Net Desktop Application to a web application. you will need to re-write it. sorry buddy.

Unfortunately not.
When you start developing your Application for Desktop (for example with Windows Forms) the differences to a Web Application are too big too automatically convert.
I suggest to make a web Application from the beginning.
MfG Mike

I think there are service/companies/utilities that do do that, but you don't hear a lot about them, prob because they are not great. I don't know of other technology families that do that better either.
If the eventual goal is a website, prob just start with the website and forget the desktop. Slower to develop and more to be aware about to be secure are the other downsides.
the downvotes are prob about the question already being asked. If you google "stackoverflow: C# desktop to website conversion", here are three posts that are similar, in descending order of informativeness.
Converting ASP.NET Web Forms application into Desktop Application
Can I convert from C# to asp.Net to host application online?
How to Convert C# Desktop Application Project to website

Related

C# application in a web browser? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Say I coded some application in C# using visual studio. Is there anyway I can take this application and embed it into a website so folks can use it from a website in the same way I would use it from my desktop?
If you coded a console application - no.
If you coded a winforms application - no.
If you coded a WPF application - yes
Two options:
Migrate it to silver light and it will only work on browsers which can install the silver light plug in. keep in mind that silver light is being disbanded by Microsoft, so it is not considered a recommended practice anymore even by MS. also consider that not everyone would agree to install silver light plugin for their browser.
You can also migrate your WPF to become a browser application - but this will require the client machine to have .Net installed on it - so this is like a replacement solution to what once was achieved by ActiveX technology.
Main difference between those two options is that the 1st one is cross-platform/cross-browser solution and the 2nd one is not.. however this might change in the future as .net is becoming available to Linux too..
If you coded ASP.Net - it is already designed for developing web applications.
I'm not sure what exactly you are trying to achieve but I think the WPF/Browser APP is what you looking for, you can read more about it in How to: Create a New WPF Browser Application Project
Edit:
I thought I'd mention if you have a Console or Winform app that people wish to use remotely (ie via a web browser) don't forget they can use Remote Desktop to access the application. Many large enterprises do this using Citrix. Often this is more practical when the cost of rewriting legacy applications is not feasible.

How to turn windows forms app into native ASP.NET? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have written a windows form app in C#, but I want to turn it into native code for ASP.NET so I can build a webapp around it. However, I've never used ASP.NET and I'm not sure how to approach this. I've looked around and seen libraries such as VisualJS.Net, but it looks confusing and I'm not sure if I can seamlessly integrate it into my app without causing problems later on. Could someone lead me towards the right direction?
Thanks!
So if I well understand, you would like to "transform" a Windows Forms app into a ASP.NET. The problem with this approach, is that those two technologies are like day and night. They don't have the same lifecycle at all. Windows applications are by definition stateful. This means that they keep their state in memory and they don't need to rebuild it often (maybe at the loading of a file). Web applications however are completely stateless. The server receives a request, processes it and returns web content (HTML, JSON and whatever is needed). If the server is again contacted with new information, the state must be rebuilt (with the help of cookies, sessions, etc).*
However, what you can do the ease those problems is the following. If you separate your concerns, you can more easily reuse your business logic and your data and just re-code the view of your application. This means that you must separate what belongs to a View technology (WinForms, ASP.NET) from the model itself. There are numerous patterns to support this : MVC, MVP, MVVM. Respecting GRASP patterns also helps.
With that in mind, you could have three solutions : One containing your common code, one containing the logic that belongs to WinForms and another one that contains your ASP.NET logic. It's easier said than done, but this should be the way to go.
You can't turn an apple into an orange. Those two technologies are so different, that you will be better off rewriting the application from scratch, and taking advantage of all the goodies available in ASP.Net MVC 5.
Technically speaking one could devise some type of a converter, but it would potentially promote bad coding practices, something you should avoid.
Start learning MVC 5, you will be better off in the end.

Is Winforms + mysql + asp.net going to be enough for a C# database-app with remote access? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm trying to build software for property management, which includes full accounting support, document storage, client data handling and mail merge functionality.
I want to work with the smallest arsenal of tools that I'll need for the job - the simpler the better! It won't be graphics-intensive and support for multimedia is not required, but I would really like remote access.
95% of usage will be by property managers through their local desktop installations.
5% will be by owners, who want to check their account balance online, and change their personal details in the DB. There can be no installation for this.
Will asp.net suffice for this 5% remote access?
I only have a small amount of experience with winforms, and could learn asp.net if that's what I need for the remote access. My question is: Will this be enough for my objectives, or am I going to kick myself halfway through for not using something else? (WPF, Silverlight etc)
Thank you. I did ask this https://stackoverflow.com/questions/22628436/c-sharp-property-management-database-software-should-i-use-wpf-winforms-or-si earlier but didn't receive satisfactory results, and have changed my question slightly.
EDIT:
By data processing I mean running functions like "charge all 2,000 owners in the system a management fee increase of 5%" or "process all creditor payments into a batch banking file".
First of all, don't go for WinForms and Silverlight,
WPF is much more useful than WinForms
likewise ASP.net or ASP.net MVC based applications are more useful than Silverlight based web applications. And if you are planning to go for a web based solution, choose ASP.net MVC.
Now, concerning your decision to choose between desktop and web based solutions, I would personally suggest to go for a web based solution if there is no specific requirement which holds you going online. Also Google on pros and cons of web and desktop applications and this link.
And if you find out that a desktop application suits you, then develop it in WPF not in WinForms.
:)

Developing a program that serves as a web program in C# [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm not sure if I'm going to be able to explain it right since I'm quite sure I don't know the correct terminology involved with it, which is also why I'm having a difficult time Googling for answers.
Essentially, I'm looking to develop a program that serves as a web site. It'll run constantly (like a service) and will return HTML when an outside user sends an HTTP request thru a browser or similar to a specific port on the computer this program runs on. Basically, this program will perform various background errands throughout the day but I want to be able to expose a web front end (almost like how you would with standard WinForms, but I want to be able to access it remotely) to be able to configure it, check the status of tasks, and otherwise interact with it.
I'm looking to use .Net, but I'm open to using something more universal like Java too. Someone with experience in this area would be helpful to explain any pain points you've encountered and suggestions on how to get started.
You can do it in C# with the HttpListener class.
I published an example some time back. See A Simple Http Server.
Although you might consider whether you really want to operate at that low level. I have written a fairly complex server based on HttpListener, and if I had it to do over again I'd probably just bite the bullet and use ASP.NET. There is a bit of a learning curve, but unless your server is incredibly small and simple, an ASP.NET application will be a lot easier to write and will likely be more robust.
Here is a simple example on how to do it in C# using the HttpServer class:
http://www.codeproject.com/Articles/137979/Simple-HTTP-Server-in-C
You are doing at least 2 different things, so you should probably create a Solution in Visual Studio.NET with one project for each purpose (You can have many projects in a solution), probably with at least one Data Access project as well (of type Class Library). If the solution does things at certain times of the day, then those can be Console Applications that run through task scheduler, rather than one of more services. Services are better suited to things other than simple scheduled tasks. A Web Application project can serve up your html.

C# / Web Development learning strategy [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
For a newcomer to .NET Web Development and programming in general, who chooses C# as there preferred language?
Is it better to learn C# first, without trying to apply it to web development? It seems most literature for C# uses Console or Windows Forms as a learning platform. So would that be the best direction?
Or should you practice in web development and try to learn C# alongside?
You need to understand the fundamentals of C# in order to develop anything useful, be it an ASP.NET website, windows client or web service.
I would start with some good tutorials around the basics of types, classes, methods, events and so on to get to grips with C#. C# Station has some good introductory tutorials here.
To develop web specific skills, start with HTML and CSS.
Then look at how the ASP.NET platform integrates both the C# (application code) and the HTML and CSS (presentational code).
And good luck!
I've helped several people go both from previous languages (like C++) as well as no experience to using C#.
Definately learn C# before you try any particular kind of development (like Web stuff). It will only confuse the newcomer.
If you already know a language, reimplementing a small application from the old language to the new language can help a lot.
Also there are often books for common language transitions - the C# for C++ developers books are good examples. I recommend reading them.
Here's my teaching plan (in short summary):
Give an overview of C# language (types, methods, Main()
Have students write Hello World from the console.
Have students implement the "Simon Says" game from the console.
Have students implement "Simon Says" in WPF. (Using the designer. This used to be Windows Forms, but WPF is a cleaner model)
Give a survey of the more advanced features in C# - delegates, events, etc.
Have students implement "Simon Says" in ASP.NET.
I disagree about learning C# in a bubble. If your end goal is to do web development why start with developing anything but?
The one exception is the console. It's incredibly easy to learn if, for, foreach, etc. in the console.
Do you have any programming experience, web or otherwise? If the answer is no, I'd learn XHTML and CSS first. There are a million tutorials online and it is pretty easy.
If you already have web programming experience then learning C# and applying to the web shouldn't be very difficult. Make sure you read the basics of the two types of ASP.NET (WebForms and MVC) and pick which makes more sense to you. Go thru the tutorials on the asp.net and you should have a fairly good start.
That's how I did it anyway.
My suggestion would be to do both as if you are doing only web development, then console or Windows applications may not be meaningful to complete. Another point is that there may be parts of C# that are specific to Webforms such as AJAX functionality to name one example though the ASP.Net MVC may be another worth looking at to some extent.
I would start with the simple, "Hello World!" example(Which can be done in a few ways in the web case and it is worth knowing all of them, e.g. straight HTML that doesn't have anything fancy, a Response.Write in the .aspx file, a Response.Write in the code behind, and using the "<%=" and "%>" tags for the last form) and then expand on that by using storage in files or databases and work towards building up various skills around a core of seeing C# used within web stuff.

Categories