ASP.NET app running from CD - asp.net

I've developed a very simple ASP.NET (jQuery) application.
The RDBMS is MS Sql Server but I could easily convert it in MS Access.
My client would like to have it available on a CD, ready to run.
I was thinking to convert it in a WinForm app but, still, I have to install the framework on the client.
Is there any other "possible" solution?

You're going to have more trouble trying to run a web app on a client machine than you will a desktop application.
A web app requires some sort of web server running, but a desktop app just needs the framework.
You're going to be better off converting it to a desktop app.

If your users are running versions of XP, Vista, or Windows 7 that include IIS, you could conceivably install the application into a virtual directory. That's a lot to ask from end-users, though. Most users won't have IIS installed even if they are running a version of Windows that offers it.

I haven't tried this, but I just found it by searching for "portable asp.net web server"
http://www.codeproject.com/KB/aspnet/TinyWebServer.aspx
Introduction
Have you ever wanted to show up an
ASP.NET project where IIS was not
accessible? Have you ever thought of
if there can be a way to carry your
web server wherever you go, i.e., on a
USB flash stick or even a CD?
If so, then this cool TinyWebServer is
for you! This tiny portable web server
can be used for testing and developing
ASP.NET projects, wherever IIS is not
available.

Should be simple if you convert it to HTML & jquery script. As HTML doesn't require any seperate runtime & also worth considering asp.net runtime also does the same thing when the response is sent to the client.

You maybe able to do this by using something like cassini http://www.asp.net/downloads/archived/cassini/. This is a simplified version of the visual studio web server that you see when you run from visual studio.
In my team we have used this and wrapped it in a exe that allows us to start the cassini server and start a browser to the cassini server address.
This still relies on the right version of .NET Framework being installed.
EDIT: Some more recent links http://ultidev.com/Products/Cassini/ and
http://blogs.msdn.com/dmitryr/archive/2008/10/03/cassini-for-framework-3-5.aspx

Related

Asp.net website not starting default.aspx (apache 2.4 on Windows 10 Pro; IIS 10)

So, I setup a Win10 box as an Apache server; built VS19 Asp.net webforms app, which works as expected when run in VS. published to the C:\Apache24\htdocs folder. Now, I setup port forwarding on my ISP-provided "Internet IP Address" to point to my local server. If I use any browser (outside of my LAN) to access that address (e.g. http://xx.yy.zz.qq - not showing actual IP for security reasons) I will see the page titled "index of /", and the list of files that I published to that htdocs folder. If I put in INDEX.HTML file in that folder, it will be displayed; but since I see Default.aspx as the 1st entry in the IIS Default Documents list, with NO index.html present, I still just see the list of files, not the aspx. I don't think the fact that I've not yet established a DomainName-to-IP binding should make any difference to this issue, but I can't be sure. Any thoughts? As you might guess, I've not done this before! :) ). TIA!
Jim
I made sure that the VS instance of the website was not running, just in case that might cause IIS confusion; but I don't think that would be the case.
As noted, I can't see how a non .net server going to run/launch/process correctly aspx pages that require IIS as the web server?
I mean, IIS can't run a web site designed for Apache, nor can say IBM "web spere" web server either.
I am trying "hard" to think how a application built in .net framework going to work with a web server that not designed to work with the .net framework?
I mean, if you have a computer, and have a word document, then you need word installed to work with that document.
If you have a PDF file on your computer, then you have to install some PDF software to use that PDF document.
A web server is not some "magic" box, but is a plane jane computer, with some software installed on it. So, if you build a aspx .net framework site in .net, then that computer will require the .net framework to have been installed, and require the correct type of software to work with those pages - in this case IIS.
Now, to be fair, you CAN do this with .net core, since .net core can run on quite much "any" computer (that supports nigex). However EVEN in that case, they FAKE and TRICK you, since how they achieve this "magic trick" is when you build the .net core application, the build process includes a WHOLE WEB SERVER as part of the build!!! (this lighter weight web server (kestrel) thus can work if you forward the ports and requests say from Apache, or quite much any web server. But MAKE NO MISTAKE here, a WHOLE .net core compatiable web server is included in that build, and thus that .net web server IS STILL required to run that .net code.
Unfortunately, the .net framework (as opposed to the .net core choice) does not upon build of your web site INCLUDE that WHOLE WEB SERVER as part of the build.
So, .net framework sites requite the correct software to work, and that correct software in this case is the web server called IIS (Internet Information Services).
You can no more suggest/attempt/assume that some program to load and read a PDF document is now out of the blue going to consume and work with Excel files, or word files.
hint:
Software build to a particular library of code requires the correct software to run and work. Kind of simple!!
So, a computer with a web server?
That is JUST a computer with software installed on it, and you need the correct software installed on that computer to consume the files etc. it was designed form.
Apache web server can no more consume a "application" or "web site" designed for IIS then it can consume other files etc. that are designed for use with a 100% different application. this is how all software works, and it not clear why you would think that Apache, or IIS, or word or Excel would work any different at all here?
Now, there was the "mono" project, and that was a port of .net framework that allowed the .net framework to run say on Linux, and there are some examples of some attempts to run aspx pages that way, but it is a galactic mess of epic proportions, and really not the way to go.
However, as stated, the .net core system DOES run on just about any platform, and it does have the above "magic trick" of being able to run on Apache, but behind the scenes, that software build actually includes a WHOLE WORKING web server that is .net core compatible, and that WHOLE web server is included with your build, and thus some are "fooled" by this magic trick that .net core web sites can run on Apache. They look like they can, but they are not, and in that example case (of .net core, NOT .net framework), the site seeming to work on the Apache web server? Nope, what occurs is the Apache web server simple hands off any web request to the REAL WORKING AND INSTALLED .net core web server!!! (thus Apache really only acts as a router, or "hand off" machine, and all the REAL web processing occurs in the .net core web server called kestrel).
So, you can do as you ask, but you would have to dump "web forms" and build the web site with aspx pages as a .net core web site. If you do that, then YES you can use Apache, and it will work, but behind the scenes, it ONLY works because that build process of the .net site ALSO includes THAT WHOLE COPY AND WORKING COPY of a .net core web server as part of the build. As noted, this magic trick option during the build process is NOT available for .net framework, but is most certainly available for the .net core choice.
So, in your case of using Apache? Software designed for a particular type of web server must use the correct type of web server. Same goes for IIS - it can't consume nor run a web site designed for Apache. I mean, how software works on your desktop is not any different then how software on a web server
The pages you have implemented with the .aspx are part of the ASP.NET Web Forms framework. This framework is part of the .NET Framework. The main server required to host Web Forms applications is IIS (Internet Information Services). Since you are working on a Windows machine, you can research how to setup IIS to host your Web Forms site if you wish. If you still want to use Apache as the front end for your site, you can even have it proxy requests to your site hosted in IIS, although there's probably little benefit and much complexity from such a setup.
Apache out of the box does not include support for hosting Web Forms applications. There is an open source project called Mono that seeks to implement an alternative version of .NET Framework and allows the use of alternative web servers such as Apache. But Mono has largely been superseded by .NET Core.
.NET Core is the official replacement for .NET Framework. It is open source and cross platform by default, and the ASP.NET Core web framework that runs on .NET Core includes a Kestrel web server. This can be utilized with Apache (or any other web server) in front of it, acting as a reverse proxy. It is not a magic trick, but a rather standard approach for web applications these days. However, ASP.NET Core does not include the Web Forms framework, so you would need to re-implement your application in a more modern alternative that's supported by ASP.NET Core if you intend to stay in the .NET ecosystem. There are many alternatives in ASP.NET Core including MVC, Blazor, Razor Pages, and Web API.

How to deploy a .NET web application in Mono hosted on a Linux Server?

We have a web application we've been writing in VB.NET. We want to get that running within a Linux server, specifically CentOS. I installed Mono version 4.0.1 on the server, as well as xsp and mod_mono. I'm not sure however, how to properly configure the setup to get the application running. We have several .aspx and .dll files. Do I just FTP them over to the server? I think we would need some wrapper executable script to get the application going, since all the websites I have been looking at state that, but I'm not sure how that works for a web application.
If you are using Visual Studio, you should use FTP to deploy your asp.net applications into GNU Linux environment. The IDE would take care of what files has to be deployed in order to get your asp.net application working.
But if you are using MonoDevelop you could use SSH Fuse. Here you have a Getting Started guide about working and deploying ASP.NET apps from MonoDevelop to an Linux environment:
http://www.monodevelop.com/documentation/creating-aspnet-projects/
If you don't have experience with FUSE, don't worry I get this for you
https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh
That's all. You don't need a wrapper as you mentioned before, it is pretty much like and an standard IIS site. Quite easy right? It has to work always that your application and its dependencies are compatible with mono, and indeed with apache or xsp configured correctly.
Cheers!

Are there any file-copy deployable web servers that can serve Asp.Net MVC content?

I have been using the Uniform Server for doing local development without any huge commitment or any server-style footprint on my dev box.
I'd like to enable a similar experience for Asp.Net MVC 3 and Razor development. But I'd like to avoid installing IIS, SQL Server, and Visual Studio. I'd like to avoid installing any server software, except via a file copy. The express versions of VS aren't an improvement, for example.
I can deal with having to install frameworks, like the .Net Framework 4.0, MVC3, etc.
Questions:
Is there any existing software capable of this? Is it possible to bend my existing Apache file-copied deployment to do this and work with the .Net Framework?
If not, what is the least I could get away with? Is it possible to install some version of the Asp.Net Development Server without installing full IIS, SQL Server, and Visual Studio?
Reason:
My hosting provides PHP and Asp.Net support only, and I don't really want to use PHP. I don't want my in-development or throw-away projects to be public, so I'm not going to use my hosting for development. I also want to enable the whole "wipe it clean and start fresh by wiping a directory" development workflow.
On the web server side, the closest approach I know of to what you're suggesting is probably IIS Express.
For the database, have a look at SQL Server Compact Edition -- it's an embedded version that shouldn't require installation.
I believe Cassini is what you are looking for. While I haven't got around to using it, for exactly the same target (MVC 3), it has been sitting in my findings a while now, so please report back if you actually use it with MVC3!
As for a database solution, I would go with an embedded sql ce 4

Is there a small classic ASP server like ASP.NET Development server that comes with Visual Studio?

I would like to hear if there is a small classic ASP server, similar to the ASP.NET Development server that comes with Visual Studio?
We are a small group that supports a legacy (classic) ASP site, and would therefore like to have a small server that easily can be executed on a Windows XP machine. Currently we're stuck with IIS 5.1 on our development machines (and because we're running XP Pro, we cannot update to IIS 6 or 7).
I've tried installing the Cassini web server, but that doesn't seem to work with classic ASP either.
You're not going to get anything extra from ASP by running on IIS 6 or 7. Are you having any specific issues with being stuck on IIS 5.1?
Have you tried Baby Web Server? - http://www.pablosoftwaresolutions.com/html/baby_web_server.html
The short answer is No, there is no small web server that runs classic ASP. There are many alternatives, as mentioned here, such as IIS or Apache plug-ins, but none that has a similar small footprint like the ASP.NET Development Server that comes with Visual Studio and that supports debugging.
There is a small footprint web server that runs Classic ASP.
Its called Abyss Web server. Abyss Web server is produced by Aprelium software and can be downloaded free of charge. Abyss Web server can be configured to run with ASP.net OR Classic ASP.
The Server can be configured to run ASP.net without any addition downloads.
To run Classic ASP on the server a program called ActiveHTML written by Selisoft must be downloaded and configured to allow Classic ASP to run on the Abyss web server. Active HTML is on a 45 day free trial and if you like it the purchase price is currently around 30 to 40 euros depending on whether you need a client or server version.
Hope this helps.
Anthony
Abyss web server http://www.aprelium.com/ supports classic ASP (also ASP.Net, Ruby, and PHP) with a 3rd party extension that cost $$$. But at one point there was a free version of the third party component, you MIGHT be able to find a copy of that still floating around. Not sure about debugging.
Baby ASP Web Server can take care of things for you, PLUS you don't have to install it, so it doesn't plop all sorts of crazy settings into your registry.
Get it here
Your only real choice is to either run Windows server or Vista in order to get the latest version of IIS.
Cassini doesn't support classic asp.
According to this post it is not possible to run ASP on Cassini. A couple of google searches later I have still not been able to find any other alternatives either.
What functionality is it that you're after? If it is the quick-and-easy running features of VS, you can quite easily make the IDE debug on IIS (although ASP cannot technically be "debugged" - what you really do is just run it with the Ctrl+F5 command).
Here is a web site that allows you to run classic ASP pages from any web server (including IIS and Apache), but it costs money:
http://www.selisoft.com/en/ahtml/index.phtml

An easy way to run an ASP.Net application at home?

I'd like to run some small private/home applications on a local machine, but I dislike the idea to set up a full Win2003 Server with IIS for this.
Is there a easy and cheap way to get an ASP.Net application running at home?
Windows 2000 has ASP, Windows XP Professional also can run it. Look up how to turn on IIS, the built in webserver. Sure Win2k3 Server would be a nicer implementation, but for personal stuff, any of them work.
The easiest way, assuming your desktop has an OS that supports it, is the Microsoft Web Platform Installer. Requires XP or higher, but doesn't work on Home editions of XP or Vista. It'll install IIS (which version depends on your OS), SQL Server 2008 Express, the .Net Framework, Visual Web Developer 2008 Express, ASP.NET MVC, Silverlight, and more. There's even a video on the linked page that'll show you how to set it all up.
Try VIsual Studio 2008 Express Web Developer. It's free, and better than many that are not. It comes with a built-in web server so you can compile,deploy and test immediately. No need for IIS.
http://www.microsoft.com/express/vwd/
Depending on what kind of app and what version of .Net you could run Cassini. It's the free, open source web server that supports .Net. I'm not sure if it's been updated to handle 3.5, but I used to use at home to run some pretty serioud 2.0 apps that I had written.
Here's the Ultidev version which has been updated: http://www.ultidev.com/products/Cassini/ Looks like it'll handle 3.5, so pretty much anything you have.
I have been running .NET apps on my home machine (XP) for years, and ASP apps for years before that. Just install IIS and then the .NET frameworks (and whatever else you need, e.g., MVC) and you are good to go. If your machine is behind a router you will need to port-forward port 80 to your desktop. If you do not have static IP, you can use a free service like DynDNS.org to give you a hostname, and you run a small client to keep the DNS for that hostname pointed to your router's IP. If you want to use your own hostname, register one with someone like GoDaddy.com, and then use a free service like ZoneEdit.com to keep the DNS updated with the correct IP.

Resources