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

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.

Related

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

ASP.NET app running from CD

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

Getting started with SQL Server Reporting Services

I'd like to set up SQL Server Reporting Services but I don't know where to start. The books out there are okay but don't seem to fit what I need to do. That is, I want to set up my ASP.NET 3.5 application to be able to view reports I create, both in a web report viewer and downloadable as PDF/Excel.
What are the basic steps to do this? Do I need IIS installed on the SQL box?
Reporting Services for SQL Server 2005 is built on top of IIS. Reporting Services for SQL Server 2008 is not, but you may still need IIS installed anyway; I seem to remember that the install process checked for IIS as a precondition.
What version of SQL Server are you using? I assume that you have a version with reporting services, but just to verify, the Express editions don't have it. SQL Server developer edition is the cheapest way to go; it's usually available on Amazon for something like $45. Developer edition has everything, but with a restricted license.
I haven't messed with reporting services much (it's on my list, but never seems to get to the top of the list). However, the 2008 version uses Visual Studio 2008 for developing reports (renamed as SQL Server Business Intelligence Development Studio). Once you have all that installed, you should be good to go.
You can access the SSRS implementation via a SOAP API.
http://msdn.microsoft.com/en-us/library/aa256607(SQL.80).aspx
This should allow you access to reports via a report viewer which you has built in means for exporting to pdf / excel etc.
Install it from the main SQL Server installer. Make sure you also install the client tools on the machine you'll be using for development.
Use Visual Studio (or BIDS) to create and deploy your reports. There are standard templates to get you started.
When you access the reports over the web, you will have the option of downloading them as PDF or Excel (no special settings or code is required)
Embedding reports in an ASPX page takes a little more work. When you get past the items above, post another question about the details (it mainly involves a couple of special controls).
The ASP.NET ReportViewer control can operarate in two modes, local or remote. In remote mode it will display reports from a SSRS server, in local mode you can add the reports directly to your visual studio project and the control will handle the rendering. This might be more suitable if you don't want to install IIS.
In my experience it is easier to create the reports in remote mode but in local mode you can use business objects as a data source.
Have a look at http://www.gotreportviewer.com, this has a good explanation and links to other resources and sample code.

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

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.

"Data Execution Prevention" kills (VS2008) local ASP.Net Development Server (aka Cassini) on Vista 64

Occasionally, I find that while debugging an ASP.Net application (written in visual studio 2008, running on Vista 64-bit) the local ASP.Net development server (i.e. 'Cassini') stops responding.
A message often comes up telling me that "Data Execution Prevention (DEP)" has killed WebDev.WebServer.exe
The event logs simply tell me that "WebDev.WebServer.exe has stopped working"
I've heard that this 'problem' presents itself more often on Vista 64-bit because DEP is on by default. Hence, turning DEP off may 'solve' the problem.
But i'm wondering:
Is there a known bug/situation with Cassini that causes DEP to kill the process?
Alternatively, what is the practical danger of disabling Data Execution Prevention?
The only way to know for sure would be to dig through the Cassini source and see if there are any areas where it generates code on the heap and then executes it without clearing the NX flag.
However, instead of doing that, why not use IIS?
EDIT:
The danger of disabling DEP is that you open up security holes. DEP works by not allowing arbitrary generated code on the heap to be executed. This helps prevent malware programs from inserting code into the data segments of legit programs.
You are on vista, iis got better (7), cassini stayed crappy.
So just start this app on iis with a host header and a hosts file entry.
You can grant certain programs exclusion from DEP if you need.
As Jonathan
mentions this does open up any vulnerabilities that application may have.
Using IIS in Visual Studio isn't the pain in the ass that it used to be in 1.1/VS02/03 days. There are lots of good reasons to prefer IIS over the Cassini server (articles by Dominick Baier):
Cassini considered harmful
Another Reason why I would not recommend Cassini
Dominick is 'the man' when it comes to IIS and security stuff.
When using IIS for a web app, I always create the app in IIS first, point it at my preferred folder, then get VS to create the project. This means you don't end up cluttering c:\inetpub\wwwroot with your web apps.
Of course, now we have IISExpress which if you're targeting IIS7.x it's the obvious choice for developing ASP.NET applications in Visual Studio.
Thanks for the answers. I guess I developed such an aversion to IIS in the .net 1.x era that I've refused to consider re-using it -- until now.
aside: when choosing between two equally acceptable answers from ChanChan and Jonathan, I arbitrarily marked Jonathan's as 'accepted' because a) he got in first and b) his rep is currently lower.

Resources