Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 16th, 2009, 09:27 AM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 119
Thanks: 26
Thanked 0 Times in 0 Posts
Default Deploying the site

Hello Imar:

I am using SQL Express 2008 and most of the instructions I think is for the standard version of SQL. I tried deploying my site by using (from the file menu inside VS 2008) Build --> Publish Site. I left checked the box that states "Allow this precompiled site to be updatable".

It appeared to be publishing, and when it was all done, it gave no errors and said it succeeded.

I then went to my website but I didn't see any .dll file. But they didn't show extensions on any of the files so maybe its there??

But I don't see my web. Am I supposed to run the database publishing wizard to create .SQL scripts for my site? Somewhere I thought I read with Express, I didn't need to do that and that you just copy it?

Rachel

EDIT.... Never mind. Its working now! Guess it just needed a little time

Last edited by Rachel; March 16th, 2009 at 11:41 AM..
 
Old March 16th, 2009, 01:28 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Right, just saw you fixed it...

With regards to DLL files: publishing a Web Site Project doesn't generate a DLL; it basically just copies all the files you need to run your site.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 16th, 2009, 02:55 PM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 119
Thanks: 26
Thanked 0 Times in 0 Posts
Default

Hi:
I found out that THEY changed my web.config file. They said it was wrong and changed it for me and told me to make sure I downloaded it before I republished. I thought the whole point in using that technique to publish the site was so that others couldn't look at it or change it?

Rachel
 
Old March 16th, 2009, 03:39 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Forget my previous post. Somehow I thought you were working with the Copy Web Site tool. As you may have found out by now, publishing does indeed generate DLLs... ;-)

However, the checkbox "Allow this precompiled site to be updateable" may not do what you think it does. It doesn't make the entire site unreadable to users, only some of the files. So, unchecking the checkbox doesn't change the web.config file. It does however change ASP.NET files like .aspx and .ascx files and their code behind. ASP.NET needs to be able to access web.config at run-time, and so may you. The whole idea of a web.config file is to be able to make configuration changes on a live site. For stuff you don't want to be visible, consider adding them to code classes (although those can be be read quite easily as well) or look into encrypting the config file if you have real big secrets to hide.

It would be interesting to compare your version and the one THEY (I assume your hosting company?) changed to see what was necessary to make it work.

Hope this clears up some of the confusion,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
Rachel (March 16th, 2009)
 
Old March 16th, 2009, 04:09 PM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 119
Thanks: 26
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Imar View Post

It would be interesting to compare your version and the one THEY (I assume your hosting company?) changed to see what was necessary to make it work.

Hope this clears up some of the confusion,

Imar
Thanks Imar. Yes, it does. And I did check before I changed the webconfig to see what it was they changed. It looks like the only things they changed were:

I had:
<?xml version="1.0"?>

and they changed it to:
<?xml version="1.0" encoding="UTF-8"?>

I had:
<customErrors mode="RemoteOnly"

and they changed it to:
<customErrors mode="Off"

I compared mine and theirs pretty good line by line so don't think I missed anything. I need to go back over what you suggest in book should also be changed.

Thanks a lot,
Rachel
 
Old March 16th, 2009, 04:15 PM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 119
Thanks: 26
Thanked 0 Times in 0 Posts
Default

I forgot something I wanted to ask:

I just noticed when I republished with that method, a pop up window comes up and tells me that all the files on the server will be deleted and asks if I want to continue. I said yes, and it re-precompiled and republished.

Is there a way to only republish changes with this method or will it have to delete the website files each time I update? Seems like a waste when a file hasn't been modified.

Rachel
 
Old March 16th, 2009, 04:16 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
<customErrors mode="RemoteOnly"
and they changed it to:
<customErrors mode=*"Off" *
You probably want to change that back again now that everything works. With the setting to off, full error details are always sent to the client browser. This may reveal sensitive data. If you need to do some debugging, you can also temporarily turn it off again to see the real underlying error.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 16th, 2009, 04:18 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

AFAIK, it always deletes all files and recreates them again. However, if you publish locally and then use a smart FTP program, it'll be able to skip files that haven't been changed locally. This is particularly useful for larger content files like images and documents....

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 20th, 2009, 04:58 PM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 119
Thanks: 26
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Imar View Post
AFAIK, it always deletes all files and recreates them again. However, if you publish locally and then use a smart FTP program, it'll be able to skip files that haven't been changed locally. This is particularly useful for larger content files like images and documents....

Imar
Hi Imar:

If I keep using this method ("Build" --> "Publish Website"), that pre-compiles the website and deletes existing files each time and then re-publishes, will it delete my database info that's on the host server? For example orders in the orders table?

When you say use a "smart FTP program" would it then allow the code in the pages to be viewed as though I had orginally published that way? I thought the pre-compiled method (from build--> publish website), was used to keep your files from being viewable so if you switch, for updating, does that change and if so, why do it with the pre-compiled way at all if you later switch to FTP and they are then all visible? ( I'm confused )

Is the method that comes with Visual STudio 2008, to publish using FTP connection a "smart FTP program" that you are referring to?

Thanks
Rachel
 
Old March 21st, 2009, 05:23 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
If I keep using this method ("Build" --> "Publish Website"), that pre-compiles the website and deletes existing files each time and then re-publishes, will it delete my database info that's on the host server? For example orders in the orders table?
Yes, that's what the tool does. That's also the reason why I publish *locally*. E.g. I let VWD create a deployable folder for me through the Publish tool on my local machine. Then I take the local copy, delete what I don't want to sync (databases maybe, temporary documents and so on) and then FTP the resulting files to a production server.
Quote:
When you say use a "smart FTP program" would it then allow the code in the pages to be viewed as though I had orginally published that way?
No. FTP stands for File Transfer Protocol and it's exactly what it does and not more. That is, it simply copies files from location A to B. So, if you publish locally to D:\Release\SomeSite, you can then use an FTP program to copy files from D:\Release\SomeSite to your remote host.
Quote:
I thought the pre-compiled method (from build--> publish website), was used to keep your files from being viewable so if you switch, for updating, does that change and if so, why do it with the pre-compiled way at all if you later switch to FTP and they are then all visible? ( I'm confused )
No no no, FTP doesn't touch your files. It just copies them. So, if you precompile, they remain precompiled. An FTP program wouldn't even understand the files, and the fact they were precompiled or not; it would simply copy the files. However, an FTP program is typically able to see if a file has changed or not. So, if you publish a large 1MB jpeg over and over again, an FTP program can see the file hasn't changed in your Publish folder and determine not to copy it over to the remote server. E.g. D:\Release\SomeSite\SomeImage.jpg may not have changed since the last time you deployed to the remote server so it can safely be skipped.
Quote:
Is the method that comes with Visual STudio 2008, to publish using FTP connection a "smart FTP program" that you are referring to?
Not really, It's a pretty bare bones FTP program. You may want to look at Smart FTP (http://www.smartftp.com/), WS_FTP (http://www.ipswitch.com/) or Filezilla (http://filezilla-project.org/) instead, although there are many more FTP programs available...

Hope this clarifies things a bit. If not, can you tell us what is still confusing you?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Deploying the Site SoloEng BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 8 September 9th, 2007 09:39 PM
Publish Web Site & Copy Web Site angshujit ASP.NET 2.0 Basics 1 June 15th, 2007 09:21 AM
Deploying the site MoeShall BOOK: ASP.NET Website Programming Problem-Design-Solution 3 April 20th, 2005 07:06 AM
how do i change the site icon on a geocitiies site uprocker2 HTML Code Clinic 2 March 4th, 2005 07:20 AM
Error in deploying a site (BC30002) j_arya Classic ASP Basics 1 October 2nd, 2004 07:04 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.