Hosting an in-process document database on Windows - asp.net

Are there any document-databases, similar to MongoDB, that run within an ASP.NET web application, and could be hosted on a server without any unique machine configuration?
I'm asking this because the hosting provider I'm currently with only support SQL Server 2008 as a database, but I'd like to run my website off a document database.
(Or am I better off going with a specialized database host, such as MongoHQ)?

I currently use MongoDB for ASP.NET apps and it works quite well ... however we have our own servers.
The question here seems more to do with the host then MongoDB, or CouchDB, etc.
In this case, yes ... I would say a good option would be to go with a hosting service like MongoHQ (they have quite reasonable rates compared to SQL Server hosts for example.)
That said why not just get a VPS that gives you total control of you Windows server?
You can find a Window VPS for reasonable prices and install whatever you want on them ... including MongoDB.

Related

Moving to Azure hosting and how to choose session state, Database and server

I am totally new to Azure and have been asked to move websites to Azure hosting.
Moving to Azure hosting do seems to an issue but problem seems to be with the asp.net session state, our website which are developed using asp.net 4.0 & MVC & some of the website are quite old developed few years back around 2013-2014.
My big worry is how to choose session state or third part session cache where we wont need to make any change in code other than to web.config file.
We so many article around it has created confusion.
I would appreciate best way we can migrate to azure hosting without making changes to code other than web.config file.
I looked at Azure Redis Cache but this also required to install Microsoft ASP.NET Universal Providers and changes to config file link.
Does Azure provide MS SQL Database with build in support for SQL Session, so that we only need to make change to web.config file rather than installing packages using nuget etc..
This option of Microsoft blog seems to be the option can some config if this right & easy approach. but also at the comment user have posted few issue with this approach
https://blogs.msdn.microsoft.com/sqlserverstorageengine/2017/11/28/asp-net-session-state-with-sql-server-in-memory-oltp/
Based on above let me give more details
We use windows based dedicated server for hosting
We use MS SQL SERVER Windows 2012 for database
IIS 7.5
and other software to managing website such as plesk
We have website developed in asp.net webform based website running with framework 4.0 or 4.5
We also have few asp.net MVC based website running on framework 4.5
We use InProc default session state
Firstly, my big concerns are session state, i want to migrate to Azure without making any changes to code except changes to web.config is this possible?
Second we use MS SQL SERVER 2012 as database what is equivalent of same in Azure as in some page it refers database as SQL Database and some where as Azure SQL Database which creates confusion of this SQL Database or Azure database as i have red that these are two different things?
Third, let us say i choose Meb+Mobile--> App Service Standard Package (which comes with upto 10 instance) what are these instance? and will individual session always connect to same instance?
Forth: Database i have about 20 database one of them is about 6GB & other database are about 200MB-700MB which service should i use for database
Single Database or Elastic?
Can i create multiple database under elastic mode?
Let us say if i choose "100 eDTUs: 10 GB included storage per pool, 200 DBs per pool, $0.20/hour" will i have total of 10GB space for all database in elastic pool and what is per pool and how many pools will i get in this option.
Fith:Disk Space, let us say i choose App Service "S2: 2 Cores(s), 3.5 GB RAM, 50 GB Storage, $0.200", is 50GB diskspace include OS or space allowcated to file which we upload?
I have asked too many question as i didnt had clarity from MS chat as they just passed links which can be confusing at time
Yeah, the Redis session state provider is a Nuget package, though you could possibly install it in another project and just throw the DLL in the app's bin folder. I have not tested this, so I can't know if it would actually work.
But another option for legacy apps is to keep ARR Affinity on in the App Service (if you are using them). This effectively sets a cookie on the client when they first connect so the load balancer will always connect them to the same instance, so in-memory session state works.
The problem with that is of course if the instance restarts for any reason, you lose the session state. Auto-scaling is also a bit of a problem.

ASP.NET Forms Authentication from Remote Server Okay?

I have a Visual Studio solution that consists of an ASP.NET website and a Lightswitch (soon to be 2 LS apps). I have configured everything so that a single login allows the user access to both apps. Currently both apps and the aspnetdb database are all on one machine.
Eventually, I want all three apps to be Azure websites with authentication via an Azure SQL database.
I want move the aspnetdb authentication database to an Azure and deploy the second LS app as an Azure website. Eventually the other 2 apps will be migrated to Azure, but in the meantime they will remain on the old server.
My question is are there any extra security issues I should be concerned with this arrangement? I have never had authentication and websites on different servers.
I don't think there are extra security issues as long as you're happy with the security around the connectivity to the SQL Database (which is based on HTTPS).
I do, however, think you should consider using Windows Azure Active Directory instead which will offer a potential cost saving and reliance on recent standards for authentication. if you haven't already look at this walkthrough. it does not talk about LS but rather an MVC application, but you should be able to see the setup process
You replied my question late, and accepted the answer. Anyhow, I'll answer your question so that this might be able to safe your time in the future.
If you want to host in Azure, you should not use Legacy Membership Provider (in which tables are generated using aspnet_regsql.exe).
Instead, you want to use new ASP.NET Universal Providers which is SQL Azure compatible.
any extra security issues I should be concerned with this arrangement?
You can configure to allow certain IP address(es) to access to your SQL Azure DB from outside of Azure. However, if someone knows your SQL Azure's username and password, they can access your Database within Azure.
Basically, you should be fine as long as nobody know your SQL Azure DB's username and password.

Hosting java web application with oracle database

I have been trying to find out how best I can host a JavaEE5 web application with Oracle11g database. I have got my domain registered and currently pointing to my Jboss web application on my laptop.
I would like to host it for a while untill my application gets finished and ideally would like to go on hosting on a professional company server when I start getting increased traffic.
Firstly, to host at my home I want to use a separate dedicated server. Can you please let me know what options I have? Because I have no clue on what to purchase.
Secondly, when I want to go with a professional company server, which ones should I consider that supports JavaEE5 deployments and Oracle11g databases? Let me know if you need more details.
Personally I have experience with OpenShift. Free plan offers JBoss AS 7.1.1 and MySQL or PostgreSQL, but it's very slow (you might want to try these two my demo applications: personal site and e-shop). Paid plans looks for me too expensive here. This solution might be appropriate if you don't wanna configure application server and database.
Another possible solution is Amazon Web Services. There are such services as Elastic Beanstalk that offers you different servers including Tomcat, Amazon Relational Database Service that offers you Oracle Database as well as other RDMSes, and Amazon Elastic Compute Cloud that enable you install JBoss AS yourself even if Beanstalk with Tomcat doesn't work for you. It looks like AWS is cheaper than OpenShift, but as for me, EC2 is still expensive. Check if price works for you. Buy the way AWS has a free tier the first year of usage that includes EC2 instance. So if you're sure that your project will long less than a year, it might be a good choice. ASW would be appropriate for you if you are ok with Tomcat instead of application server and you don't wanna configure application server and database.
Also I heard positive comments about Digital Ocean, but never tried it. It looks like it offers only infrastructure as service (like AWS EC2) so you will have to install and configure all servers yourself.

Which database to use for C# ASP.NET website?

I am developing an online internal web portal (like users write tests, provide document links to study, completing a study roadmap, admin user to view ststistics, etc). It caters some 150 users. I have planned to use ASP .NET with c# in Visual Studio 2008 on windows xp. I am implementing using Forms and NOT MVC since I feel at home with forms.
I do not want to use windows authentication since each user will have many attributes related to him and so it will be easy using a database. Security is not an issue since it is being used internally only.
I have only a fair knowledge about ASP and C# and VS 2008.
Now my questions:
Can I use MS SQL server database that is built in in VS 2008?( I cannot ask for external databases)
Can I export the website totally along with the databases to IIS server running in some other computer? How?
Do I need to export databases separately or provide a database creation script like PHP?
(I have more questions. Will update once I start off).
(This is my first .net web app. so can i know where i can find login scripts, pagination, examples, and pretty much all the stuff)
edit: which to use? New website or New Webapplication?
You can pretty much use any database, but it seems from your requirements that you want to look closer towards something like SQLExpress, SQL Server Compact Edition or SQLLite.
Can I export the website totally along
with the databases to IIS server
running in some other computer? How?
Your database will be shipped along with your application if you use one of the database options that I have specified above.
Do I need to export databases
separately or provide a database
creation script like PHP?
See my comment above, the database will exist when you deploy your website to IIS. It's a physical file that will be in your APP_DATA folder.
You can use:
MySQL. The reason: It has no space or memory limit!
SQL Server or SQL CE. These are both alike. They just differ in slite functions, and also the storage!
The SQL CE allows you to have 4GB. But the SQL Server lets you have 10GB.
So it depends on your work!
Also, I wanted to point out one error in a post, that the SQL CE is present in App_Data, Correct! But the SQL Server is placed somewhere like:
C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\here_will_it_be
And yes, you can migrate it to wherever you want to place it. I mean if you want to upload it to a hosting server, you can upload it using Web Deploy! Or what ever service. When downloading you will have to repeat same process!
I hope you are doing good with your first web app! :)

Can Someone Explain VistaDB Please?

I'm seeing it pop up more and more and not really understanding the purpose of it? Can I only use it when I am developing locally on my desktop?
Or can I put a commercial site on a server with say Win2003 thats using VistaDB? Is it faster than using a SQL DB? Is it secure?
Confused...
VistaDB is a .NET alternative to the lightweight database systems offered by Microsoft: Jet (Microsoft Access), MSDE, Sql Server CE or Sql Server Express. You can use it in any .NET application where you need a database and you don't really want the overhead of having a client/server database.
VistaDB is an embedded database (some other embedded databases are SQLite and FireBird). This basically means that your database is totally "invisible" to your end users. They don't need to install a client/server database like SQL Server for instance. Deploying VistaDB is simple. All you need is the database file and a reference to the VistaDB runtime DLL within your application.
A commercial application that uses VistaDB for it's backend is Graffiti CMS.
From what I can make out of their website http://www.vistadb.net/:
You can use it for both development and commercial purposes
It's not a server, it's an assembly for your website/application
My guess is that since it's not a full featured SQL server it should be faster and lighter on the resources
Don't know how secure it is, but they state that you can put it on "medium trust" websites.
You may also want to see this StackOverflow topic about VistaDB.
Nothing is faster than SQL Server for what it does. If you think SQL Server is too slow you are probably doing something wrong. It is incredibly fast. There is no way a 100% managed engine is going to be faster than SQL Server on everything.
Lighter on resources - Yes
Easier to deploy - Yes (xcopy deployment)
Desktop database - Yes, you can use it for desktop development of applications. Some people also use it for multi user applications on a shared drive. Websites are another target where you can't install a service or don't want to pay extra for SQL Server access on the hosting account.
Security - VistaDB runs in-process with your application. There is no concept of user security since you are loading it directly.
Concurrency - Depends on your application. We support multiple processes access the same database, but some operations will still have locking issues you have to work with in your code.

Resources