I have a classic ASP front end which serves to collaboratively enter data into a sqlite database, meant to be used later in an android app. I need to deploy this ASP webapp onto an online server with sqlite odbc installed, because the only other option I know is to use my own computer as a server, and I don't think it would be a good idea to keep my fairly modest PC always on for 3 months or so.
The problem is, I can't find any server (preferably free) fitting these requirements.
Any ideas?
For example, is it possible to host just the sqlite file somewhere, and have the asp script (which I will then install on all the users' machines) access it remotely? I've looked around, and I've found a solution (for MS Access), but it involves changing user permissions on the server machine, which I won't be able to do.
Ok, I came up with a good solution:
I imported my database into MS Access (from Access -> external data -> ODBC database -> follow the steps to choose your database). It works well with my ASP front-end after a few minor modifications.
I can now use any ASP hosting service as they all support MS Access.
When I'm done, I can convert it back to sqlite using this excellent program (SQLite2009Pro - it's actually free despite what the name may imply). I've tested the converted database with my android app and it works flawlessly.
Hope this helps anyone who's still stuck using ASP like me.
Related
I have an ASP.NET web app on a shared hosting server and a SQL Server database on a database server. I would like to backup and restore the database programmatically in the web app where the site owner can download/upload the backup file from a browser. Looking for a solution which works in medium trust. I think SMO (shared management objects libraries) requires full trust and not sure if it even meets my needs. Writing files on the database server, using a control panel or SSMS is not an option.
While I might be able to write SQL Scripts to do all this work, it's going to take some time to have it work reliably for any database. I was wondering if these kind of scripts or a suitable library is available.
Based on the shared hosting, and the desire to get backups on-demand, you may need to actually run a SQL query that essentially iterates all the metadata and raw data and generates a bunch of SQL INSERT statements.
The good news is, this is a well-solved problem. See this question: What is the best way to auto-generate INSERT statements for a SQL Server table? or just Google "SQL script generator". If you look at some of the open source projects out there, that might be the easiest code to integrate.
With the caveat, it might be worth giving your hosting company a call and just explaining your needs, especially if they are a smaller company. I used to be Dir of Engineering for a small web hosting company and we'd setup ad hoc solutions for folks all the time.
Looking for a good embedded db for my asp.net apps while trying to avoid SQLExpress (I need it to be a downloable file(s) with no need to install at server), I found Firebird. But:
According to this:
http://en.wikipedia.org/wiki/Embedded_database#Firebird_Embedded
It has the same features as the classic and superserver version of Firebird, except that two or more THREADS (not just applications) cannot access the same database at the same time. So Firebird embedded acts as a local server for a single threaded client accessing its databases (that means it doesn't work properly for ASP.NET web applications)
According to this http://www.firebirdsql.org/en/development-net-provider/, however, there are some ASP.NET providers released.
Weekly builds of the ADO.NET Data Provider, the ASP.NET Web Providers and the DDEX provider can be found here.
So the question is: is it or is it not a good embedded db alternative to use in asp.net?
If not, what would you recommend instead?
I have fixed the wikipedia article , firebird 2.5 embedded is fully multithreaded and it is fully supported for asp.net
http://blog.cincura.net/231742-firebird-embedded-in-comparison-to-sql-server-compact-edition-4/
Also from what i have read on jiri's blog it is possible to run it on azure
http://blog.cincura.net/232332-using-firebird-inside-azure-without-vm-role/
and on amazon
http://blog.cincura.net/232333-amazons-ec2-micro-instance-and-firebird/
Yes, it is. And I believe it is one of your best options.
Specially because you will be running it in a non MS environment. I know PostgreSQL is a good Open Source DB, but it does not have an embedded version.
Your other option is SQLite.
One thing that might be worth looking at is SQL Compact. The latest version works with ASP.NET and runs in-process. All you need to deploy is a couple of DLLs.
I must confess I don't really know anything about Firebird so can't compare it directly.
I searched on Google and I can't find any, do you know some ?
Not that I'm aware. Most open source projects however use one specific database engine (which makes sense), or xml (for example dasBlog).
However you can always swap your SQL Server for MS Access in a project if you want. The provider system for membership etc in ASP.NET itself is already a great example of that possibility (though not open source as it comes from Microsoft). For example take a look at this tutorial: Using Access instead of SQL server for your ASP.NET Application Services.
Personally I would rather find it strange to see an open source project making use of 2 different, especially MS Access in the first place. People tend to use SQL Server Express or SQLite or SQL CE for something like this.
Ok, so here's the thing.
I'm developing an existing (it started being an ASP classic app, so you can imagine :P) web application under ASP.NET 4.0 and SQLServer 2005. We are 4 developers using local instances of SQL Server 2005 Express, having the source-code and the Visual Studio database project
This webapp has several "universes" (that's how we call it). Every universe has its own database (currently on the same server) but they all share the same schema (tables, sprocs, etc) and the same source/site code.
So manually deploying is really annoying, because I have to deploy the source code and then run the sql scripts manually on each database. I know that manual deploying can cause problems, so I'm looking for a way of automating it.
We've recently created a Visual Studio Database Project to manage the schema and generate the diff-schema scripts with different targets.
I don't have idea how to put the pieces together
I would like to:
Have a way to make a "sync" deploy to a target server (thanksfully I have full RDC access to the servers so I can install things if required). With "sync" deploy I mean that I don't want to fully deploy the whole application, because it has lots of files and I just want to deploy those new or changed.
Generate diff-sql update scripts for every database target and combine it to just 1 script. For this I should have some list of the databases names somewhere.
Copy the site files and executing the generated sql script in an easy and automated way.
I've read about MSBuild, MS WebDeploy, NAnt, etc. But I don't really know where to start and I really want to get rid of this manual deploy.
If there is a better and easier way of doing it than what I enumerated, I'll be pleased to read your option.
I know this is not a very specific question but I've googled a lot about it and it seems I cannot figure out how to do it. I've never used any automation tool to deploy.
Any help will be really appreciated,
Thank you all,
Regards
Have you heard of the term Multi-Tenancy? It might be worth look that up to see if that applied to your "Multiverse" especially if one universe is never accessed by another...
See:
http://en.wikipedia.org/wiki/Multitenancy
http://msdn.microsoft.com/en-us/library/aa479086.aspx
UPDATE:
If the application and database is the same for each client (or Tenant) I believe there are applications that may help in providing the same code/db as an SaaS application? ie another application/configuration layer on top that can handle the deployments etc?
I think these are called Platform as a Service (PaaS) applications:
see: http://en.wikipedia.org/wiki/Platform_as_a_service
Multi-Tenancy in your case may be possible, depending on client security requirements, with a bit of work (or a lot of work):
Option 1:
You could use the one instance of the application, ie deploy the site once and connect to a different database for each client. You would need to differentiate each client by URL to isolate content/data byt setting a connection string for each etc. (This would reduce your site deployments to one deployment)
Option 2:
You could create both a single instance of the application and use a single database. You would need to add a "TenantID" to each table and adjust all your code to accept a TenantID to ensure data security/isolation. Again you wold need to detect/differentiate the Tenant based on the URL to set the TenantID for the session used for every database call. (This would reduce your site and database deployment to one of each)
Is the generated aspnetdb.mdf ever meant to be used online? It has been a while since I looked at it, but from what I remember the generated username database could only be configured and maintained locally within your visual studio environment. Is this still true? Does anyone use this online for big apps?
EDIT:
I ask because all the examples I see just use the built in VS tools to build the example database, but I haven't found where they did a "real" one online.
EDIT:
It just seemed like a big let down to know that you could create this username/password db for use in your projects and then find out you really can't.
It is simply a SQL Express db. You can certainly maintain the membership information in aspnetdb.mdf through your own administration pages if you want to.
As a matter of fact, if you're going to use SQL Express as your database (very limited scenarios where this would be appropriate) you could add the rest of your tables/sprocs to aspnetdb.mdf and use just the one db rather than using aspnetdb.mdf for membership and creating another one for your other needs.
This article has information on the limitations of sql express as well as links to the featureset (2005, 2008)
Basically the limitations are:
Only 1 CPU. If a system has more than 1 SQL Express 2008 will still run but limit itself to 1 CPU.
RAM: 1 GB. More RAM can exist, but again SQL Express 2008 will only make use of a maximum 1 GB.
Max Database Size: 4 GB
configured and maintained locally
within your visual studio environment.
Is this still true
No, it's not true.
You can use aspnet_regsql scripts to generate all the required tables/scripts/views in your database, and you don't have to use the aspnetdb.mdf.
After all, it's just a bunch of database objects required by the membership/security api.