Are there any real limitations in Mono regarding ASP.NET? - asp.net

I am a junior developer, doing my last year at college. I'm mostly asp.net oriented and even have a part time job coding in that language. I am interested on converting to linux and since visual studio is unsupported write my code in Mono.
Are there any notable limitations in Mono that I should be aware of (regarding ASP.NET)?

According to the Mono website:
Mono's ASP.Net does not implement the
following features:
Precompiled Websites
Webparts APIs.
Also most if not all 3rd party ASP.Net controls are not compatible with Mono unless otherwise specified. ComponentArt controls for example are not usable in Mono. However, there's no reason to think that this won't change as Mono gains popularity. ComponentArts has already mentioned that they are considering adding support in the future.

I'd say the biggest thing you lose is IIS. ASP.net and IIS were very deeply linked. Many of the advantages from ASP.net come from the utilization of hosting features in IIS. The biggest one I can name is the ability of HTTP.sys to directly respond to a request in kernel mode if the page is in cache. This means that the socket open is responded to immediately and can allow for orders of magnitude more hits to your webserver.

Its a bit of an edge case but Microsoft's Web Service Enhancements are not supported on Mono. I ran into this problem trying to get some WSE services working on Mono.

Regarding web services there are two very good open-source alternatives: ServiceStack.Net (using it) and NANCY.
These area a lot easier implement, use and maintain, IMHO, than services built on top of WCF.

Related

Migration of asp to asp.net(c#.net)

I've a website developed in classic asp.
Now I want to convert it to asp.net(2.0 or above).
How can I do it without coding from scratch?
Can you suggest a free or cheap tool to do the work?
In my experience when you switch platforms like this you are basically doing a full rewrite. Any conversion tools that you find will end up producing code that 1) probably doesn't fully work, and 2) is messy code in the destination language that will be hard to maintain.
Then of course there is the bigger problem: you most likely want an entirely different architecture in ASP.NET versus what you had in ASP. Better to revisit the requirements of the application, think about the architecture and design, and reimplement. Use the source code as a guide for how certain pieces work, but don't do a pure conversion.
I don't think there is any good news here. Automatically translating ASP code to ASP.NET will require a lot of busywork. Perhaps you can farm out to an offshore developer who can do this gruntwork for you?
Rename all the pages to .aspx (or of cource configure iis to use .net to process .asp pages). Classic asp runs fine in .net. Now start one page at a time and change only the stuff that actually benifits from being asp.net. Just an option. I'm just saying.
Using asp to asp.net migration assistant we can do it. I could convert my asp project to asp.net 1.x using asp to asp.net migration assistant.
But there were a few run time errors as well as DB connecting problems after the conversion.........
System Requirements
Supported Operating System
Windows 2000, Windows 98, Windows ME, Windows NT, Windows XP
Microsoft .NET Framework Version 1.1 Redistributable Package
as per http://www.microsoft.com/en-us/download/details.aspx?id=18312

Looking for LAMP equivalent to ASP.NET

We have a fairly large system involving multiple applications running on Windows, written in .NET. These include a number of web applications using ASP.NET.
We have a number of unrelated web applications written in LAMP - Linux/Apache/MySQL/Php.
The greatest advantage we've seen in ASP.NET is the ease with which code can be shared between web applications, win-form applications, windows console applications, and windows services. We have signficant code in .NET assemblies that are shared across all of these environments.
Apache/Php has some significant advantages over ASP.NET as a web programming environment, but if there is anything in it that is equivalent to .NET when it comes to integrating code that is shared across non-web applications, I'm unaware of it.
So I'm asking. Are there any technologies that provide the same sort of easy and seamless integration of shared code modules between Apache/Php and non-web applications?
The only environment with most of what you are asking for is Java.
Take the same code, stick it in a swing app, servlet, applet, heck even throw it in a mobile device, it'll work. JDBC should be a nice abstraction over most databases, so you're clear in that area.
Other than that, requesting something similar over the LAMP stack is something I believe does not exist at the moment.
Not that I know of, but I do know that Mono has a runtime module that can be plugged into Apache, effectively running an ASP.NET application under it. See here on the blog on how to do this.
Edit: As per Robert's comment, the link on that blog is broken! Here's the official link to sourceforge.net. Sorry!
Hope this helps,
Best regards,
Tom.

ASP.Net portable server

I'm trying to start on a new project to help enrich my asp.net knowledge, since I'm not completely satisfied with what my class is teaching me. From my (very little) experience with Rails, I recall every application containing its own development web server. Say I were trying to create a local-only application, but I want it to run in a web browser (Therefore ASP.Net). Are there any options in terms of being able to distribute an application and have it launch its own, or just not require IIS/VS/Apache-mono?
You may want to look into aspNETserve. It sounds like it would fit your needs. I haven't worked on it recently, so it probably has some rough edges.
On the plus side its all open source, and if you are just getting started with ASP.NET it would be a real eye opener on how the internals of the ASP.NET lifecycle operate.
The simple answer is that you need a web server to run the application. It cannot run without one.
If we're talking demo purposes or you don't require that many features of a web server there are redistributable web-servers that you can include with your setup package.
Like Alex mentioned the most popular one seems to be Cassini.
I'm assuming that you want to run the site on the same machine you are developing it on.
Visual Studio 2005 and up allows you to run the site from VS itself if you want to view it locally on your development machine.
To my understanding Visual Web Developer allows you to do the same as well.
Visual Web Developer
You can use the cassini web server. Please note that those are different redistributable:
http://www.asp.net/Downloads/archived/cassini/
http://ultidev.com/products/Cassini/
I'm not really certain why you would want to develop a web application (with all the difficulties it entails, due to the fact that you are dealing with a stateless connection to an unknown client machine), but then run the entire thing on the client machine.
Surely it makes more sense to develop a WinForms application?
Follow this guide to setup IIS on your PC to run ASP.NET apps:
http://www.geekpedia.com/tutorial25_Setting-up-your-ASPNET-server-IIS.html

Why migrate from IIS6 to IIS7?

I have a number of web apps running on several IIS6/Server 2003 boxes. They run well and are happy. They are all asp.net web apps and use .NET 3.5.
What, if any, would be valid reasons for contemplating moving the web apps to IIS7/Server 2008?
IIS7 is rewritten from the ground up with a concept of being "pluggable". IIS7 is more extensible than it ever has been before. The entire request pipeline has be reworked to allow you to more easily work with requests, as well.
From a performance aspect, these changes are immediately recognizable. You can run sites developed for IIS6 in a "Classic" application pool that will preserve compatibility, but provide a noticeable performance boost. In the non-scientific evaluation that we have done so far, our legacy application has seen about a 20% reduction of load times on our IIS7 test machine.
Of course, the reason we have to run in "classic" mode is an interesting side note. Inside the global.asax, there is some pre-fetching on application start which touches the HttpContext. Specifically, there is pre-caching done, which IIS7 does not allow. So, before we can switch from "classic" mode, there are some changes that we will have to make.
Eventually, Microsoft will discontinue Server 2003 support. Admittedly, that won't be for several years, so it doesn't impact you today.
Improved support for ASP.NET MVC. This is probably the big one for most of us. You can get ASP.NET MVC working on IIS6, but there are some hoops to jump through.
I'd give you more, but I myself am not yet on Server 2008 yet, and have nothing else to give. Presumably Vista (which I do use, both at work and at home) has the "same" IIS7 as 2008 does -- the UIs certainly look very similar -- but I wouldn't consider my experience there to be useful to your question.
Ability to write pipeline components in managed langauges. Previously, if you wanted to write an ISAPI filter to handle a certain type of web request, you'd have to write it in C++. Now, you can use good ol' .NET code. This allows more customization with the ability to write reusable pipeline components for handling various types of request. For example, all .js file request are routed to a ScriptCompressor pipeline component which zips and returns them with lots of cacheability set up.
The improved support for MVC is linked to this as you can set II7 to route requests without extensions to .NET so you can have urls which are "cleaner" such as http://www.yourwebsite.com/customer/1 without having any extension visible which reveals what type of server technology you're using and is very untrendy these days.

What is ASP.NET?

I've been strictly in a C++ environment for years (and specialized statistical languages). Visual Studio until 2001, and Borland since. Mostly specialized desktop applications for clients.
I'm not remaining willfully ignorant of it, but over the years when I've dipped into other things, I've spent my time playing around with JavaScript, PHP, and a lot of Python.
Is "ASP.NET" the language? Is C# the language and "ASP.NET" the framework? What's a good answer to "What is ASP.NET"? Is there a correspondence between ASP.NET and anything I'd be familiar with in C++?
I know I can google the same title, but I'd rather see answers from this crowd. (Besides, in the future, I think that Google should point here for questions like that.)
I was going to write a lengthy answer but I felt that Wikipedia had it covered:
ASP.NET is a web application framework
developed and marketed by Microsoft,
that programmers can use to build
dynamic web sites, web applications
and web services. It was first
released in January 2002 with version
1.0 of the .NET Framework, and is the successor to Microsoft's Active Server
Pages (ASP) technology. ASP.NET is
built on the Common Language Runtime
(CLR), allowing programmers to write
ASP.NET code using any supported .NET
language.
So ASP.NET is Microsoft's web development framework and the latest version is 4.0.
How do I get started? Check out the following resources:
Learn ASP.NET
ASP.NET Documentation
ASP.NET Developer Center
ASP.NET is the framework, just like .NET
The code itself, will be a mix of HTML, JavaScript(for Client-Side) and any .NET compatible language. So C#, VB.NET, C++.NET, heck...even IronPython
ASP.NET is a web application framework
developed and marketed by Microsoft,
that programmers can use to build
dynamic web sites, web applications
and web services. It was first
released in January 2002 with version
1.0 of the .NET Framework, and is the successor to Microsoft's Active Server
Pages (ASP) technology. ASP.NET is
built on the Common Language Runtime
(CLR), allowing programmers to write
ASP.NET code using any supported .NET
language.
ASP.NET (Wikipedia)
That's on the second result searching on Google so I'm guessing (half-expecting) that you don't understand what that means either.
Webpage development started with simple static HTML pages. That meant the client asked for a page by means of an URL and the server sent the page back to him/her exactly as it has been designed. Sometime after that several technologies emerged in order to provide a more "dynamic" or personalized experience.
Several "server side languages" were developed (PHP, Perl, ASP...) which allowed the server to process the Web page before sending it back to the client. This way when a client requested a webpage the server could interpret the request, process it (for example connecting to a database and fetching some results) and send it back modifying the contents and making them "dynamic". The fact that the process took place on the server stands for the name of "server side".
So the original ASP (predecessor of the ASP.NET) was a server side language that was focused on serving web pages. In such way it supported several shortcuts such as the possibility to intercalate HTML and ASP source into the file which was on that time much popular due to PHP implementation. It was also (as most of these languages) a dynamic language and it was interpreted.
ASP.NET is an evolution of that original ASP with some improvements. First it does truly (try to) separate the presentation (HTML) from the code (.cs) which may be implemented by using Visual Basic or C# syntax. It also incorporate some sort of compilation to the final ASP pages, encapsulating them into assemblies and thus improving performance. Finally it has access to the full .NET framework which supports a wide number of helper classes.
So, summing up, it is a programming language located on the server and designed to make webpages.
ASP.NET is a framework, it delivers:
A class hierachy you hook into, that allows both usage of supplied components, as well as development of your own.
Integration with and easy access to the underlying webserver.
An event model, which is probably the "best" thing about it.
A general abstraction from the underlying medium of HTML and HTTP.
Not sure if ASP.NET compares to any C++ frameworks you may be familiar with. Web frameworks usually tend to be unique due to the statelessness of HTTP and the relatively low-tech technologies involved (HTML, scripting, etc).
Let's say it's a technique from MS to build web applications. ASP stands for Active Server Pages, .NET is the framework behind it.
C# and VB.NET are the languages which can be used, but I guess other .NET languages also can be used.
Take a look at MS' info for those who don't know or understand the platform.
http://www.asp.net/get-started

Resources