Publishing my Web Site

J

Jonathan Wood

Okay, looks like VS 2008 finally includes an automated feature to precompile
my site before publishing. Cool.

However, when I run this dialog box and click OK, it then complains that
access is denied by my database file (in the App_Data folder). And
everything appears to end there with no additional information. (I don't see
that the database is in use other than it is attached to SQL Server 2005.)

My database file should *not* be transferred to the site. The data has
already been copied via an involved process. But I seem to be given no
options regarding which files should not be transferred and the entire
process just stops if a file that cannot be copied is encountered.

Is there some trick to making this work?

Thanks.
 
M

Mark Rae [MVP]

Jonathan Wood said:
Okay, looks like VS 2008 finally includes an automated feature to
precompile my site before publishing. Cool.

However, when I run this dialog box and click OK, it then complains that
access is denied by my database file (in the App_Data folder). And
everything appears to end there with no additional information. (I don't
see that the database is in use other than it is attached to SQL Server
2005.)

My database file should *not* be transferred to the site. The data has
already been copied via an involved process. But I seem to be given no
options regarding which files should not be transferred and the entire
process just stops if a file that cannot be copied is encountered.

Is there some trick to making this work?

Thanks.
 
J

Jonathan Wood

I'm not really clear on what that is but it is something quite different
from the Build|Publish Website command.
 
M

Mark Rae [MVP]

I'm not really clear on what that is but it is something quite different
from the Build|Publish Website command.

Yes, that's exactly what it is - an add-in to Visual Studio.NET designed
specifically to simplify the precise task with which you're currently having
difficulty...
 
J

Jonathan Wood

Sorry for the long delay. (I've been very busy.)

I still say it looks like something else but I will look into it further
when I get a chance to better explore what you are saying.

Thanks.
 
L

Lars

Web Deployment Projects is exactly what its name suggests - what do you
think it looks like...?

Is there a differense between publishing the page to a local folder and then
using another program to upload the page to the server or publishing the
page direct to the server. Imagine you have a database with several hundred
of megabites or several Giga Bytes. Then you might want to do it in the
backgroud using WSFTP Pro for example which handled interupted FTP and FTPS
connction very nicely.

As I've seen when you add a MasterPageFile to a document it adds "~/" to the
file name. I always remove this and use relative linking to the Master File.
After all I might want to add the page tu subdirectory to the homepage. For
example www.mysite.com/site2/

Is there a reason why VS 2008 adds "~/" to the page. On a linux server "~/"
means the users home directory. Renerally /home/username. What does it mean
if you use IIS?


Lars
 
J

Jonathan Wood

Well, as I thought I mentioned, it seems to be missing a bunch of stuff to
publish the site.

For starters, there doesn't appear to be any place to enter my FTP username
and password. Second, there doesn't appear to be any place to specify which
files should be copied, etc.

Am I the only one who needs a different web.config file on my site from the
one on my development machine? I seriously doubt it but MS seems to assume I
am.

When I attempt to run this command, I get an error that access is denied
with my database file. That is expected since it is attached to SQL Server.
But this feature doesn't seem to allow me to do anything about it.

I guess I just assumed a web deployment tool would allow me to specify login
information and specify which files need to be transferred.

Did I miss something?

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
 
M

Mark Rae [MVP]

Am I the only one who needs a different web.config file on my site from
the one on my development machine? I seriously doubt it but MS seems to
assume I am.

I guess you haven't had time to read the documentation yet, so...

1) Right-click your web deployment project

2) Select the build for which you want different web.config sections
(usually the Release build)

3) Click Deployment

4) Check the checkbox entitled "Enable Web.config file section replacement"

5) Click the [examples] hyperlink for some examples
 
J

Jonathan Wood

Mark,
I guess you haven't had time to read the documentation yet, so...

Huh? I've read boatloads of documentation and have stacks of books I'm still
reading. If you mean that I haven't had time to read all the documentation
ever written, then you'd be correct.
1) Right-click your web deployment project

I don't know what this means. I have an ASP.NET project. I want an easy way
to place it on my Web server, preferrably precompiled. So I don't have a
"web deployment project."
2) Select the build for which you want different web.config sections
(usually the Release build)

3) Click Deployment

4) Check the checkbox entitled "Enable Web.config file section
replacement"

5) Click the [examples] hyperlink for some examples

Right now, my project is working on the Web. But a better way to publish it
would be nice. Clearly, there is some functionality here I guess I need to
look into. But if I need to learn a whole different project type in order to
accomplish that, then it's going to have to wait for some other things I
have to learn.

Thanks.
 
M

Mark Rae [MVP]

I don't know what this means. I have an ASP.NET project. I want an easy
way to place it on my Web server, preferrably precompiled. So I don't have
a "web deployment project."

At the risk of repeating myself, Web Deployment Projects are a *separate
add-in* to Visual Studio.NET... The purpose of this separate add-in is to
make the whole business of deploying web projects much easier. One of the
many functions which it supports is the ability to have different web.config
settings for development, testing, production, etc...

Being a separate add-in, if you want to use it you have to download it and
install it:
http://weblogs.asp.net/scottgu/arch...-web-deployment-project-support-released.aspx

There's also an older version for Visual Studio.NET 2005...

See also:
http://blogs.iis.net/msdeploy/archive/2008/01/22/welcome-to-the-web-deployment-team-blog.aspx
 
S

Scott Roberts

Jonathan Wood said:
Well, as I thought I mentioned, it seems to be missing a bunch of stuff to
publish the site.

For starters, there doesn't appear to be any place to enter my FTP
username and password. Second, there doesn't appear to be any place to
specify which files should be copied, etc.

How many files do you want to exclude? Just the DB and web.config?

Here's what I do:

1. Publish to a local folder.
2. Remove/modify files as needed (try to minimize this, of course).
3. Zip the entire folder.
4. FTP zip file to "sandbox" site.
5. Unzip the file on the server (hopefully your web host gives this ability)
6. Test
7. Copy the exact same zip file to production site.
8. Unzip the file on your production site.
Am I the only one who needs a different web.config file on my site from
the one on my development machine? I seriously doubt it but MS seems to
assume I am.

What, specifically, is different? For me, it's only connection strings,
which I modify manually after the "publish" to a local folder.
When I attempt to run this command, I get an error that access is denied
with my database file. That is expected since it is attached to SQL
Server. But this feature doesn't seem to allow me to do anything about it.

Hmmm, I assume you mean the ".mdf" file? If so, why is it located inside
your web site? I'd say put it somewhere else.
 
S

Scott Roberts

Mark Rae said:
That's precisely what I used to do too - until the Visual Studio.NET team
released the Web Deployment Projects add-in...

Your link is open in another window. I'll check it out. Thanks.
 
J

Jonathan Wood

Mark,
At the risk of repeating myself, Web Deployment Projects are a *separate
add-in* to Visual Studio.NET... The purpose of this separate add-in is to
make the whole business of deploying web projects much easier. One of the
many functions which it supports is the ability to have different
web.config settings for development, testing, production, etc...

Being a separate add-in, if you want to use it you have to download it and
install it:
http://weblogs.asp.net/scottgu/arch...-web-deployment-project-support-released.aspx

I will definitely look into this, but this is still a little confusing. We
were discussing the Build|Publish Web Site command. I have that command now.
But now you're saying this is an add-in that I must download. If I have the
command we were discussing, but need to download this "separate add-in",
does that not mean that these are two different things?

Thanks.
 
J

Jonathan Wood

Scott,
How many files do you want to exclude? Just the DB and web.config?

I also have a folder that I keep my notes and some working graphics files.
Here's what I do:

1. Publish to a local folder.
2. Remove/modify files as needed (try to minimize this, of course).
3. Zip the entire folder.
4. FTP zip file to "sandbox" site.
5. Unzip the file on the server (hopefully your web host gives this
ability)
6. Test
7. Copy the exact same zip file to production site.
8. Unzip the file on your production site.

I'm not sure if I have the ability to unzip a file on my host server. I'll
check it out though.
What, specifically, is different? For me, it's only connection strings,
which I modify manually after the "publish" to a local folder.

There's a few things (some error settings, for example). Does this mean you
have to recreate the settings after every time you publish your site?
Hmmm, I assume you mean the ".mdf" file? If so, why is it located inside
your web site? I'd say put it somewhere else.

It's been a long road getting the darn thing to work. The next one won't be
in a subfolder like that. I may move it sometime.

Thanks.
 
M

Mark Rae [MVP]

We were discussing the Build|Publish Web Site command.

That's right - the command that was causing you difficulty...

I was merely suggesting that you download and install an add-in to Visual
Studio.NET (written by the same people who write Visual Studio.NET) which
would have solved all your problems for you...
But now you're saying this is an add-in that I must download.

You don't have to download anything if you don't want to...
 
S

Scott Roberts

How many files do you want to exclude? Just the DB and web.config?
I also have a folder that I keep my notes and some working graphics files.

Gotcha. Just delete the folder after the "local publish".
There's a few things (some error settings, for example). Does this mean
you have to recreate the settings after every time you publish your site?

Well, yes and no. I tend to not change my web.config very often so many
times I simply exclude it from the zip file that I upload to the web host.
Since I don't delete existing files first, the new files simply overwrite
the existing ones and the existing web.config remains in-tact. On bigger
changes (where you *do* want to delete existing files) or if you have added
settings to your web.config then yes, you have to modify web.config after
the "local publish".

If all of this "modify after you publish locally" stuff is too cumbersome,
you might consider the add-in recommended by Mark. It appears to have been
developed specifically to address the short-comings of the built-in
"publish" command.
 
J

Jonathan Wood

Mark,
That's right - the command that was causing you difficulty...

I was merely suggesting that you download and install an add-in to Visual
Studio.NET (written by the same people who write Visual Studio.NET) which
would have solved all your problems for you...


You don't have to download anything if you don't want to...

I'm sorry that I have been unable to find the words that correctly convey
the point that's causing confusion. Earlier in this thread, you were telling
me about using this command to copy my project to my server. I responded
that the command in question did not appear to have the functionality that I
was asking for. It seems you responded by insisting it had exactly that
functionality. When I went into more detail about why it didn't seem to do
what I needed, you responded with some information that included that I must
download an add-in.

I understand that I do not have to download anything if I don't want to. And
I've already indicated I will research the link just as soon as I get a
moment. What I don't get is what part I missed between you telling me what a
particular command did, and you telling me that I need to download an add-in
to use the functionality being discussed.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top