How do I find a ASP.NET hosting company that supports SQL Server with CLR enabled? - asp.net

So I developed a web application in ASP.NET and SQL Server 2008. Part of the SQL code I implemented as a .NET assembly (instead of t-sql) because it is performing intense calculations that are better written in C#.
Now I am ready to deploy my application, but I am stuck looking for a hosting company that allows this. Scratch out Discount ASP (see this forum post). I tried emailing other hosting companies and I either get no reply or they say they will not support it.
Any recommendations? What's the big deal with having CLR enabled in SQL Server?

it is disabled by default and most shared hosts will be reluctant to enable it because of the potential added security issues. You could post a request to webhostingtalk. Some options:
Amazon EC2 with SQL Server or SQL Server Express Edition, a VPS (1and1 has a pretty good deal right now) running Express Edition, or of course your own dedicated box

On Amazon EC2 you get your own dedicated box, so you are free to enable / install what you see fit. You could configure a vanilla server then install the SQL Enterprise eval if you wanted.

Your own dedicated box with SQL Express may be your best bet.

Related

Synchronization between Two SQL Server Databases, Online and Offline

We have a local intranet based Project Management tool, we built it in asp.net .net 4.0 and sql server 2008. We cannot access this system online as it is lan based, neither we want its files to be appear online. But most of the cases we and other managers need to post project on it from home, but the issue is we dont wana use this system only on online server but also local intranet should be working, live ip is not prefered in any case because of electricity issues etc. We have an idea in our mind, that if we launch the same published site on online server (dedicated vps), and people use to work on offline system, but we can make some .exe utility which will upload our latest records from offline server to online server using the internet, does sql server provide any built in functionality for this, what is the best way to do this, either with our own custom logic with windows task scheduler or .Net provides any kind of facility for that. The reason of not using this system only as online is, our employees used to upload files in GBs, and the internet is only 4MBps, which will slow down the work, also we dont want internet dependency every time, also there is security issue.
Regards
Atif
Check out Microsoft Sync Framework: http://msdn.microsoft.com/en-us/sync/bb736753

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! :)

How to just deploy the Visual Studio 2010 ASP.NET website example to a remote dedicated web 2008 server?

I can't believe my eyes it's so hard to do just that ! Why can't I use MS Access instead of SQL Server Express ? So since I'm stucked with SQL Server Express, how can I make it work on my dedicated IIS 7 Server on Windows 2008 ?
I have copied under the root directory of the server. The website works until I try to login then I get:
Failed to generate a user instance of
SQL Server
I cannot find a single article that just explains step by step how to deploy this simple example used by Microsoft or can I ? Then can you point me to this tutorial thanks.
Update: in case it does matter I have installed SQL Server 2008 Express Advance Services Edition.
"Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment" [1]
Plz check the enumeration of problems in "Problems using server-side Automation of Office" section of [1]
Had not I answered it [2a] in you previous question [2] that in order to deploy one should have managed something to deploy first, i.e. first manage to develop on developing machine targeting the same environment as target machine?
If you cannot manage to do it with SQL Express, you certainly wpuld not manage it with MS Access. It is more complocated and involved.
Update:
I still insist on my answers.
Deployment is not magic nor fortune teller, it will not correct your configuration errors or guess what you did not bother to formulate or even wish about. You confuse deployment with the necessity of configuration or even setups as well a knowing them
You cannot deploy without configuring (or knowing) production and developing environments and properly formulating your objective (and question) accordingly.
Just because you do not know what you want, what you can and how does not mean that you cannot believe your eyes.
Cited:
CITED:
[1]
Considerations for server-side Automation of Office
http://support.microsoft.com/kb/257757
[2]
Why do “I get Failed to generate a user instance of SQL Server” with .NET 4 and not .NET 2 ?
Why do "I get Failed to generate a user instance of SQL Server" with .NET 4 and not .NET 2?
[2a]
My answer to your question [2]
Why do "I get Failed to generate a user instance of SQL Server" with .NET 4 and not .NET 2?
OK guys I found one kind guru on ASP.NET forum who could answer to the question so never mind. For alone newbies like me it is due to context/user which was application pool identity which has no rights.

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.

Best practices for maintaining shared hosting websites with ASP.NET and SQL Server?

I've been doing PHP/MySQL websites with shared hosting providers for the last couple years. The day-to-day process is basically:
develop in Eclipse, one website per folder
upload via FileZilla, one website per folder
use PHPMyAdmin to create and manage your local and online databases and transfer data from one to another
to backup the online database I do dump of the database tables into script and copy them locally
I now want to build websites with ASP.NET with SQL Server 2008 on shared hosting providers, and am trying to get into this new paradigm, hopefully some of you can give me some pointers based on your experience and tell me what I am not doing optimally:
I've installed both the Visual Web Developer 2008 Express as well as the full version of Visual Studio 2008, both seem to be full-featured tools for developing ASP.NET sites. In terms of websites at shared hosting providers, what can you do with the full version that you can't do with the express version?
I use FileZilla to upload my sites, which seems to work fine. Do you use an external FTP program to upload your sites or do you use the "Publish" or "FTP Website" in the above IDEs?
I installed SQL Server 2008 Management Studio and can now issue SQL commands to my online SQL Server database (although I strangely can't see my database in the list on the left, I can still access it, I assume this is some rights issue with my provider, www.domainbox.de, but this provider told me to use their online manager instead, which is called "ASP.NET Enterprise Manager" which is extremely simple but at least has a "Query Box" which allows me to send queries to my database.) Is this "ASP.NET Enterprise Manager" standard with ASP.NET hosters or is there something else that is better, e.g. where you could edit your data in the grid, etc.? And I assume that with most providers you are able to manage your online SQL Server database with SQL Server Management Studio, is that correct? (I remember back in 2001 managing online SQL Server 2000 database at a shared hosting provider with Enterprise Manager and it would take literally 10 minutes for me to see my database on the left because it listed out the other 800 customer databases as well -- hopefully this has been solved by now).
How do you backup your data in your online database to local storage? (currently I would have to write code that output my data to some other format, e.g. XML or SQL Script)
And after you make a number of structural and data changes to your local database, how do you transfer those changes and the new data to your online database? (I had to install SSMS Tools [http://www.ssmstoolspack.com] to be able to dump my data into a script so that I could get it back into my online database).
So, although I've gotten most things to work, I feel like there must be better ways to go about this, better providers, better tools, etc. Would like to hear some "best practices" advice from anyone who works with ASP.NET, SQL Server and shared hosting.
For the most part, what you're doing now will work with an asp.net website.
For your development environment, I don't think you will be limited by using Visual Web Developer 2008 express for what you want to do. Here is a microsoft page that compares every version of visual studio 2008, including Visual Web Developer 2008 Express: Visual Studio 2008 Product Comparison
For deploying your website over the net, I would generall stick to deploying manually. You can use some of the automated stuff in visual studio, but your deployment will tend to be a little slower. After compiling your application, it will then delete every file in your destination website, and upload everying from scratch (uncompressed I think). Your whole site will be down while this happens. When you deploy manually you can upload just the changed files, or everything in a compressed format.
Regarding the SQL server, many shared hosting services will let you connect with some sort of local SQL management tool. However, connecting this way generally uses a lot of bandwidth so they throttle the allowed bandwidth for this way down. This is probably the performance issues you previously saw. If you can get by with it, I would use their hosted SQL tools for most of your work, but then use the management studio for anything it can't handle.
For backing up your SQL server, if your host doesn't have a way for you to perform an automatic backup then you will have to do something yourself. I would first check to see if they will allow you to at least run a SQL backup command. This will generate a .bak file of your database, but on the local database server. Most places will work with you on this, since many customers need this.
For applying changes to your database, your best bet is to script all of the changes into one sql script and run it using the remote SQL management tool. These aren't hard to write, and there are a few tools out there that will help you with it. I personally like to use Visio. It lets me compare two databases (local and remote) then generate a script to apply to the remote one with all the changes.
Good luck
As far as capabilities of VS Express vs Standard - Standard is still the better tool. It gives you a richer debugging experience, broader support for solutions/projects dependencies among other things.
These things still matter even when doing shared hosting b/c you absolutely need to debug your app (client and server side). You can do this adequately with Express with some caveats (cant attach to an arbitrary process, client side javascript debugging is a pain), Standard makes this MUCH easier.
For publishing/deploying - I would recommend 'Web Depoyment Projects' - an MSBuild extension that you can download from MS. This gives you a lot of customizability of how you want to build and deploy your website - which can include sending it to an FTP site. If you have ever used MSBuild and like it - Web Deployment Projects are the easiest hook to extend your build process with an ASP.NET website.

Resources