|
-
Mar 27th, 2011, 04:21 PM
#1
Thread Starter
Lively Member
[RESOLVED] How do you update precompiled websites
I have always been uploading my websites with all source code and everything. Maintaining the website this way has been easy, when updating a single webpage I just need to reupload the .aspx and .vb files for that page and I'm done, easy.
Now I am trying to learn how to use precompiled websites using the "Build" > "Publish Web Site" features from the visual studio menu.
Here's a few this that I need some advise on:
When using this feature visual studio wants to delete everything from the destination and then publish. The problem is the website allows users to upload files to the website and this will delete their data. Is there and easier way to do this?
This may be the answer to the above question, lets say I publish to a folder on my desktop instead and only upload the files needed. I noticed that If I change one webpage I have to reupload all webpages and files from the bin folder. Is this how it is meant to work?
-
Mar 27th, 2011, 07:03 PM
#2
Re: How do you update precompiled websites
That's a good question since i would have to publish in a dll form soon.I'll be keeping a track on this thread.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Mar 28th, 2011, 01:52 AM
#3
Re: How do you update precompiled websites
Hello,
In this situation, I typically "publish" to a local folder on my own machine, and then I only upload (FTP) the files which have changed to my web server, rather than uploading everything.
Gary
-
Mar 28th, 2011, 07:33 PM
#4
Thread Starter
Lively Member
Re: How do you update precompiled websites
What I found was that each time you republish, the dll files in the bin directory get a different name.
For example App_Web_123.dll could change to App_Web_abc.dll.
I can imagine this wouldn't be a problem for small 5 to 10 page websites, but large websites will be a dll nightmare to manage.
So basically right now you update a webpage and publish, then you upload the webpage updated to the ftp server. Then you go to the bin directory and also upload the new dll ralated to that page and delete the old one. Is this how it is works?
-
Mar 29th, 2011, 01:43 AM
#5
Re: How do you update precompiled websites
Hello,
Can you confirm exactly what project type you are using, and what mechanism you are using to publish the website? I am surprised to hear that the DLL is changing name.
Gary
-
Mar 29th, 2011, 01:55 AM
#6
Hyperactive Member
Re: How do you update precompiled websites
very nice thread......even i am facing this prb from last 2 years bt nt taking this as prb....
I dnt think it changes the dll name bt it changes the referance....everytime for minor change i publish my project and replaces my bin folder....
is there any other way???
Sagar
VB6, VB.net,C#,ASP, ASP.net MSSQL, MYSQL
-
Mar 29th, 2011, 04:14 AM
#7
Re: How do you update precompiled websites
There are several "publish" options. From asp.net 2 onwards (I think, I know VS 2010 has it) there are options to "use fixed naming and single page assemblies" and "allow site to be updateable". Selecting these publish options builds individual code files and places them in the bin folder and leaves the design (aspx) page markup intact.
So if you make a change to a aspx page or code/behind page you still need to publish the site but you only need to ftp/upload the changed aspx and-or vb/cs files. Changes to code files in the app_code folder need the app_code........ name prefixed files in the bin folder uploaded.
Lastly if any code behind or app_code file is published and uploaded to the server (bin folder) the site will be recomplied on the server and the site restarted (within asp not IIS or windows) meaning sessions will be lost.
I find a published site whatever the publish options perform better and don't suffer from ambibious namespace errors after changes, especially larger sites.
The problem with computers is their nature is pure logic. Just once I'd like my computer to do something deluded. 
-
Mar 29th, 2011, 03:10 PM
#8
Thread Starter
Lively Member
Re: How do you update precompiled websites
So Glad I joined this forum.......
Can you confirm exactly what project type you are using
It's a standard ASP.NET Website Project
There are several "publish" options. From asp.net 2 onwards (I think, I know VS 2010 has it) there are options to "use fixed naming and single page assemblies" and "allow site to be updateable". Selecting these publish options builds individual code files and places them in the bin folder and leaves the design (aspx) page markup intact.
Ok, I tried the "use fixed naming and single page assemblies" and now the dll doesn't change names, awesome, thanks for that.
OK just one more question. For large sites e.g website with 500 pages, it will easier to have one dll, is it possible to compile the website to one dll instead of one for each and every page?
Last edited by Developer2007; Mar 29th, 2011 at 03:14 PM.
-
Mar 30th, 2011, 06:30 AM
#9
Re: How do you update precompiled websites
A web application project will be built to a single dll if you include no other assemblies in the project. A web site project is not as you have discovered.
To see the difference in VS click file>new project and select asp.net web application. once created open solution explorer and click the My Project folder, you will see all the project build, deploy etc options.
The problem with computers is their nature is pure logic. Just once I'd like my computer to do something deluded. 
-
Mar 30th, 2011, 09:57 AM
#10
Fanatic Member
Re: How do you update precompiled websites
 Originally Posted by Developer2007
What I found was that each time you republish, the dll files in the bin directory get a different name.
For example App_Web_123.dll could change to App_Web_abc.dll.
I can imagine this wouldn't be a problem for small 5 to 10 page websites, but large websites will be a dll nightmare to manage.
So basically right now you update a webpage and publish, then you upload the webpage updated to the ftp server. Then you go to the bin directory and also upload the new dll ralated to that page and delete the old one. Is this how it is works?
When I first started using ASP.Net a few years ago - having used 'traditional' ASP for years - I was horrified at the idea of publishing the whole site every time you made a minor change to anything. And, having done a bit of VB, I was afraid of dll hell.
But, everything I read said that publishing the whole site - into one or a few dlls depending on whether it's an application or not - would have significant performance benefits. And, that in .net dll hell was a thing of the past as it effectively took care of registering dlls etc.
So, I took a deep breath on my first site and started publishing web site projects with just 'Allow this precompiled site to be updatable' ticked and, several hundred publishes later (of up to 8 web sites - to UAT and Live servers), so far, so good.
My sites are on an intranet so I just publish them in the evening and don't have to worry about session issues. The idea of having an assembly for every page would make me nervous.
-
Mar 30th, 2011, 03:31 PM
#11
Thread Starter
Lively Member
Re: How do you update precompiled websites
 Originally Posted by brin351
A web application project will be built to a single dll if you include no other assemblies in the project. A web site project is not as you have discovered.
To see the difference in VS click file>new project and select asp.net web application. once created open solution explorer and click the My Project folder, you will see all the project build, deploy etc options.
Interesting, I will need to look into the other pros and cons of using one over the other. Thanks.
-
Mar 31st, 2011, 01:34 AM
#12
Re: [RESOLVED] How do you update precompiled websites
One of the big difference between the two is the lack of a csproj or vbproj file. If you are looking to auto build the web site then you would need to use the AspNetCompiler Task, rather than a straight up project file, which seems a little unnatural to me.
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|