Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 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 February 11th, 2009, 10:51 AM
Registered User
 
Join Date: Jan 2009
Posts: 7
Thanks: 2
Thanked 0 Times in 0 Posts
Unhappy How can I deploy multiple copies of the CMS app. on the same web server

Hi,

I am a teacher and I would like to deploy multiple copies of the CMS app. for different group of students/fellow teachers. I have tried a quick solution by duplicating a working copy of the application but it doesn't work properly due (apparently) to conflicting access to the data file.

Any help will be greatly appreciated.

Paul Bourget
Montréal
CANADA
 
Old February 11th, 2009, 04:41 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

How do you set up the sites? If each site has the database in its own App_Data folder they should be able to run side by side....

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:
pbourget (February 11th, 2009)
 
Old February 11th, 2009, 10:30 PM
Registered User
 
Join Date: Jan 2009
Posts: 7
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Imar View Post
Hi there,

How do you set up the sites? If each site has the database in its own App_Data folder they should be able to run side by side....

Imar
Thanks Imar,

I reviewed carefully the set-up of the second instance (ASP.NET property tab and Security settings of the data folders) and it now runs nicely alongside the first instance.

Best regards.

Paul Bourget
 
Old February 12th, 2009, 04:57 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Excellent. Glad it's working.

Out of curiosity: did you use the supplied installer or did you manually set up the sites?

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 February 15th, 2009, 09:21 AM
Registered User
 
Join Date: Jan 2009
Posts: 7
Thanks: 2
Thanked 0 Times in 0 Posts
Default Mode of installation - Still having a glitch

Hi Imar,

I installed a first copy of the app. with the supplied installer. I produced a second copy by copying the fisrt copy and pasting it in the «inetpub» folder (with a different name).

Both apps are working : I am able to manage 2 different sets of content.

However when I try to use Web Administrator (from Visual Studio) to create members for the the second app (named «cms_gpi») I get the following error message :

«Problème avec le magasin de données sélectionné. Ce problème peut être dû à un nom de serveur ou à des informations d'identification non valides, ou encore à une autorisation insuffisante. La fonctionnalité de gestion de rôles peut également ne pas être activée. Cliquez sur le bouton ci-dessous pour être redirigé vers une page où vous pourrez sélectionner un nouveau magasin de données.

Le message suivant peut vous aider à diagnostiquer le problème : Impossible d'ouvrir le fichier physique "C:\Inetpub\wwwroot\sgc_gpi\App_Data\Cms.mdf". Erreur du système d'exploitation 32 : "32(error not found)". Échec d'une tentative d'attachement d'une base de données nommée automatiquement pour le fichier C:\Inetpub\wwwroot\sgc_gpi\App_Data\Cms.mdf. Il existe une base de données du même nom ou le fichier spécifié ne peut être ouvert ou il se trouve sur un partage UNC.»

There seems to be a conflict because there are 2 mdf files with the same name (cms.mdf).

I cannot understand why the 2 apps can manage different content sets but not different lists of members.

Thanks for your support and any forthcoming help.

Paul Bourget
 
Old February 15th, 2009, 09:33 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Paul,

Difficult to say without knowing more of your setup. How do you connect to the databases (that is, how does your connection string look in the web.config? )? Are you attaching databases on the fly?

And which project do you open in VWD? The WSAT is really only meant for working with data on the development machine, and isn't really designed for "production sites"...

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 February 15th, 2009, 07:58 PM
Registered User
 
Join Date: Jan 2009
Posts: 7
Thanks: 2
Thanked 0 Times in 0 Posts
Post Information on my setup - My problem is solved !

Hi Imar,

I made a new attempt to manage members with WSAT on the second instance of the CMS application and it worked. The only difference I can think of is that I have had to relaunch Visual Studio because I had exited the program since my previous attempt. When I got the error message contained in my previous post, I most certainly had only closed one instance of the cms application immediately before opening the second instance of the the app.

As requested, here are some informations on my setup.

As mentionned in my first post, I am a teacher that wishes to deploy CMS apps for my felow teachers and groups of students. As ASP.NET is not supported by my school IT department, I deploy these apps out of my home from a Windows 2003 server that runs IIS 6. I do not have a separate development server. The applications are deployed through my home connection (from an ISP) and are accessed via a Port 80 redirect service (no-ip.com). Performance is acceptable, given the small number of users and the random dispersion of visitors accessing the sites.

I would say that the database is attached on the fly (I have checked your book on the subject) but I am not exactly sure of what is meant by that. As I understand it, it means that the the pages (like AddEditContent.aspx) connect to the database when required by specific lines of code (ie line 34). The connection string of both instances of the app. are identical (since I did not modify the web.config file). Here's the code :

<connectionStrings>
<addname="Cms"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\Cms.mdf;Integrated Security=True;User Instance=True"providerName="System.Data.SqlClient"/>
</connectionStrings>

I have notice that there is also a connection string in the AppConfiguration.vb file (in case the web.config file does not contain a connectionStrings item).

You mentionned in your post that WSAT should not be used in a production environment. Do you mean that the membership table should be managed by adding additional code (and interface) to the cms app. ?

I greatly appreciate the support you are providing me. Coming from a classic ASP background, there are still many aspects of ASP.NET that I have to learn. Experimenting with your «Instant results» app. is a great way to learn; knowing that that you are available to provide help makes it more valuable.

Best regards.

Paul
 
Old February 16th, 2009, 03:42 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:
You mentionned in your post that WSAT should not be used in a production environment. Do you mean that the membership table should be managed by adding additional code (and interface) to the cms app. ?
Yes.You'll most likely have trouble connecting to a remote SQL Server from your local development machine. For example, many ISPs don't offer access to their SQL Servers from remote networks, but make you use on-line SQL editors. This decreases their attack surface, minimizing the chances to get hacked. If your ISP does allow you to connect remote, you can configure a (brand new) web site, override the LocalSqlServer connection string to point to your remote database and then use the WSAT to manage users. Not the easiest thing to do,

With IIS 7, things are a bit easier as IIS 7 allows you manage users directly from the IIS Manager tools.

The chapter Wrox BugBase of my ASP.NET 2.0 Instant Results book shows you how to manage users on-line through the Management section of the site using the Membership and Roles APIs. Additionally, you may want to take a look here: http://msdn.microsoft.com/en-us/library/aa478958.aspx

There are also (commercial) third party components available for this purpose, but I have never found one I really liked. Looks like an oversight from Microsoft's side.....

Quote:
I greatly appreciate the support you are providing me. Coming from a classic ASP background, there are still many aspects of ASP.NET that I have to learn. Experimenting with your «Instant results» app. is a great way to learn; knowing that that you are available to provide help makes it more valuable.


You're welcome. Glad you like the book so much.


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.

Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
While typing this post, I was listening to: Sour Times by Portishead (Track 2 from the album: Dummy) What's This?

Last edited by Imar; February 16th, 2009 at 03:53 PM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
configure web.config (db details) when deploy app? benilpj ASP.NET 2.0 Basics 3 June 7th, 2006 09:27 PM
SQl Server license for a web server app carlos890 SQL Server 2000 1 December 8th, 2005 12:42 PM
Permissions for Web app. files on Web server Jan_Ma Classic ASP Basics 0 June 28th, 2003 02:06 PM
Permissions for Web app. files on server Jan_Ma All Other Wrox Books 0 June 28th, 2003 02:02 PM





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