Displaying an ASP.NET Web Application

C

Carl

Help!!

What are the best concepts / startegies to deploy an ASP.NET web
application? My idea is work first in Production PC then after completing
the project deploy it on the Web Server. But what about the database - do i
need to reconnect the database and the components-register again the
components in the Web Server. And question like how can i customize the
installation and how can i update the existing files on a deployed ASP.NET
Web application?

thanks in advance - carl
 
C

Cor Ligthert

Carl,

You mean probably development PC with development database and how can you
deploy that.
It is of course first a kind of correct setting of the IIS for both
environments what is more IIS than AdoNet.

To deploy an aspnet application is in VSNet by the way possible by the
option in Project Copy project. The problem is that it copies everything
what you don't want, so making your own deployment for that using the
deployment tools or just using copy. Samples are on MSDN.

The last problem is your database.

For that is only the connectionstringimportant.

You can in every place in your program set the connectionstring to the
connection.

While it recommended to open and close as much as possible. Is that not a
problem at all in my opinion.
(When you use the designer to create connections, don't than change settings
in that in the designer part. That gives only trouble.)

I hope this helps?

Cor
 
O

Otis Mukinfus

Carl,

Cor is not giving you the correct information. See my input below.
Carl,

You mean probably development PC with development database and how can you
deploy that.
It is of course first a kind of correct setting of the IIS for both
environments what is more IIS than AdoNet.

To deploy an aspnet application is in VSNet by the way possible by the
option in Project Copy project. The problem is that it copies everything
what you don't want, so making your own deployment for that using the
deployment tools or just using copy. Samples are on MSDN.

You can deploy your Web project from VS .NET by using Copy Project as Cor says,
but if you set the "Only files needed to run this application" radio button,
only the files needed to run the application (Web Application) will be copied to
the web site. The *.cs files and the other files will not be copied. None of
the files not needed on the web site will be copied.
The last problem is your database.

For that is only the connectionstringimportant.

You can in every place in your program set the connectionstring to the
connection.

While it recommended to open and close as much as possible. Is that not a
problem at all in my opinion.
(When you use the designer to create connections, don't than change settings
in that in the designer part. That gives only trouble.)

This is bad advice. Closing the connection when the user of the database on a
web site relieves the web sites database of the heavy burden of keeping
connections open. When you use a database on a web site (or anywhere else) you
cannot be sure how many users will be connected. This makes it important for
you to close your connections when they are not needed.

As for the connection to the database, you can set this up in your web.config
file. Look at the properties of your connection object in the IDE and find the
"DynamicProperties" menu item and proceed from there. Once you have done this,
you can change the Connection string of every connection in the web application
by simply changing the Web.config connection string.

When you use the connection to your database in the designer, hopefully you are
not connected to a "production" database. Typically you will be only connected
to the database on your development machine. That is why Cor believes it is OK
to keep the connection open, but in the real world, you should never develop
against a "production" database.
I hope this helps?

Cor

The answer to the question you asked about the database depends on whether the
database exists at the web site. If it does and you have permissions to create
tables, stored procedures, etc., then you will probably want to make a creation
script for all of the objects in the development database and then run it
against the database on the web server.

You can do this in one operation if you have the SQL Server Enterprise Manager,
by using the Copy Database Wizard (right click on Database and choose "Copy
Database Wizard..." from the context menu.

Otis Mukinfus
http://www.otismukinfus.com
 
C

Cor Ligthert

Otis,

Do you mean that you can copy with "Project Copy" only the changes reflected
to your website, it cannot? (Although my sentence was not intended for that
can you read that as well that this is not possible.)

In addition will you please be so kind not to propagate in the newsgroups
that I have said to keep the connection Open.

I gave an unasked advice what not really had to do with the question from
Carl, however about a seemly problem he could get when he wants to open and
close consequenly. There was not problem for that.

That advice is by the way only as he uses a real server database what I do
not know. For an Access Database there is a reason to keep it open.

Before you are telling that people are giving wrong information. Please
verify than first, if what you read, can be read in another context.

When you think that I maybe wrote it in a wrong way. Please be than so kind
to ask first before you start telling that I give wrong information.

I really do not understand why you think that I, as a standalone sentence in
a message, would write it in the way as you have read it.

Cor
 
O

Otis Mukinfus

Otis,

Do you mean that you can copy with "Project Copy" only the changes reflected
to your website, it cannot? (Although my sentence was not intended for that
can you read that as well that this is not possible.)

In addition will you please be so kind not to propagate in the newsgroups
that I have said to keep the connection Open.

I gave an unasked advice what not really had to do with the question from
Carl, however about a seemly problem he could get when he wants to open and
close consequenly. There was not problem for that.

That advice is by the way only as he uses a real server database what I do
not know. For an Access Database there is a reason to keep it open.

Before you are telling that people are giving wrong information. Please
verify than first, if what you read, can be read in another context.

When you think that I maybe wrote it in a wrong way. Please be than so kind
to ask first before you start telling that I give wrong information.

I really do not understand why you think that I, as a standalone sentence in
a message, would write it in the way as you have read it.

Cor

My answer was based on my understanding of what you wrote. Thank you for
qualifying what you really meant to say.


Otis Mukinfus
http://www.otismukinfus.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top