Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 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 April 27th, 2007, 09:58 AM
Authorized User
 
Join Date: Jul 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Personalization lost after publishing the project


Well, I am ready to release my project (intranet) so I decided to go ahead and "publish" my site to another server. I did it, but all personalization (web parts localization) gets lost. I am using the same database SQL SERVER 2000, so I had to go to my new web site and add again, through my web parts catalog, all web parts distribution.

After doing that, I noticed that a new row was added to the aspnet_PersonalizationAllUsers table. How can I publish my site without loosing Personalization?

Any help...

Ric

 
Old April 27th, 2007, 09:42 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Somebody commented about this a few months ago but I don't remember the details.

If you're using SQL2K, I guess you must have modified the paging code, and a few other areas to work on SQL2K, right? Several people here would like to know how that was done.

The keys to the aspnet tables all come back to the application. Marco confused a lot of people by having 2 applications in his table when he distributed the DB. The application entry has to tie to an application folder. If you deploy to a different application folder, then you will lose your personalization. That makes sense when you think about it. It is supposed to be specific to one application.

These are 2 separate applications:
http://www.mysite.com/
http://www.mysite.com/tbh/ (a virtual dir named tbh)

You should develop on the same IIS application as the one you are deploying to in order to avoid problems. This is made much easier by Service Pack 1 of Visual Studio 2005. This is a secret that hasn't gotten out very well, but under SP1 you can set the name of the virtual directory in the website properties. Then when you press F5 and run with the internal web server it will show the site with the virtual directory you specified. This can save you hours of hair-pulling! This one little feature is the best single feature in SP1 and almost nobody knows about it.

Once you've got this worked out, you simply have to ensure that all the aspnet records get scripted over. This would be easier if SSMS didn't have the identity bug, but I wrote a C# program to get around that by doing manual scripting programmatically. Look for CopyTableData.cs:
http://www.ericengler.com/downloads/...chitecture.zip

Eric


 
Old April 30th, 2007, 10:15 AM
Authorized User
 
Join Date: Jul 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Eric,

You got it!

The web site's url on my pc looked something like http://mymachine/myproject/default.aspx but my new server was just http://myproductionserver:92/default.aspx, this project was working fine in production so I didn't care about setting the virtual directory on the new server and so the issues with personalization.

I installed sp1 for Visual Studio 2005 but honestly I didn't need it. All I did was to go to my production server and setup a new virtual directory on the just published project so the production server now looks like: http://myproductionserver:92/myproject/default.aspx and I got all my Web Parts back on my page! Personalization is working fine now.

Now talking about SQL Server 2k, I setup SQL Server 2000 for this project few months ago and I don't remember doing something special to have paging working. I got the script the database from the one included with the project and removed new stuff not supported by 2000, after that I created the data schema to support user profiles and personalization. I got a couple of issues while doing this:

http://p2p.wrox.com/topic.asp?TOPIC_ID=48085
http://p2p.wrox.com/topic.asp?TOPIC_ID=46624

The gridviews that I have on this project are working pagination fine.
I'll go to the open topics related to see if I can help.

Thanks for your quick answer!







Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving personalization properties w/CreateUser k8277 ASP.NET 2.0 Basics 0 April 5th, 2007 01:47 PM
alternative to multi sessions - personalization? a3321889495 BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 July 27th, 2006 05:12 AM
Page.Unload Personalization Saving wewald BOOK: Professional Web Parts and Custom Controls ASP.NET ISBN: 0-7645-7860-X 3 January 17th, 2006 10:38 AM
Personalization Providers AGS BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 December 3rd, 2005 08:44 AM
why this sheet has lost VBA Project,ActiveX and ?? bq_wang Excel VBA 1 April 7th, 2005 10:21 AM





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