Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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
  #1 (permalink)  
Old September 19th, 2007, 10:48 AM
Authorized User
 
Join Date: Mar 2007
Location: , , .
Posts: 39
Thanks: 0
Thanked 1 Time in 1 Post
Default Deployment Problem

I deployed TBH to my shared hosting site and it runs fine, until I try to access any of the Admin pages. I get errors that the default theme & masterpage do not exist at /TBH/Admin. The problem is that the "~/" path is mapping to the Admin folder instead of the root /TBH folder.

I suspect that it is because TBH is not running as a "Web Application" in IIS.

I've been running other ASP.NET 2.0 applications w/o any problems, but none of my other apps have a sub-folder like /Admin in TBH.

Is anyone else running TBH on a shared server (ie: WebHost4Life) alongside of other ASP apps, or are you limited to a single app per domain?

Note: I've become frustrated with the irrelevant responses I'm getting from my provider (XO) so I figured I would try here...

Thanks, Scott.

  #2 (permalink)  
Old September 19th, 2007, 03:39 PM
rav rav is offline
Authorized User
 
Join Date: Feb 2007
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had webhost4life web hosting before...and I had this problem with it when i was hosting my asp sites.. I think ~/ looks for the home directory, but if you give exact path of the template.master in your admin/default.aspx source like
MasterPageFile="..\TBH_Web\Template.master" .. then you should be fine..
if it doesn't work try making simple html pages in foler inside folder hirarchy and try a html link in pages to connect using deamweaver mx software(you can download a trial version if you don't have) and specify links in to various hierarchy of pages from various folders and remove ../ sign and give the exact name of folder instead of ...and then transfer this main folder on your webhosting and see if it works...
Then in the simmilar way you can give links in your TBH project..

I am also sometimes confused with this stuff and then I try this and it works.. I have not yet hosted TBH on web host, but if I was getting this error I would try this
i hope it helps..
rav

  #3 (permalink)  
Old September 19th, 2007, 04:06 PM
rav rav is offline
Authorized User
 
Join Date: Feb 2007
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think i posted the wrong slashes...
the hyperlink to template.master page should be like this in admin/Default.aspx

MasterPageFile="/TBH_Main/Template.master"
if your folder structure is like this
TheBeerHouse\TBH_Main\Admin\Default.aspx

rav

  #4 (permalink)  
Old September 21st, 2007, 09:01 AM
Authorized User
 
Join Date: Mar 2007
Location: , , .
Posts: 39
Thanks: 0
Thanked 1 Time in 1 Post
Default

rav thanks for your help. Unfortunately the "../" parent directory path is not allowed in aspx pages. There are other issues anyway such as the Admin pages don't share the same cache and global variables as the pages in the default directory, which seems to indicate that the site is not running as a web app in IIS.

So it brings me back to my original questions as to how others are running TBH sites on shared servers:

1. Can you run multiple apps in a single domain on a shared server, or is TBH the only site you can run?

2. How do you set TBH to run as a web application in IIS on shared servers?

Thanks.

  #5 (permalink)  
Old November 28th, 2007, 08:04 AM
Authorized User
 
Join Date: Oct 2007
Location: delhi, delhi, India.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

if i am uploading my web.config file and it is giving problem in openconnection.
  #6 (permalink)  
Old November 28th, 2007, 08:09 AM
Authorized User
 
Join Date: Oct 2007
Location: delhi, delhi, India.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default


hello i have a problem when i upload my web.configu file through ftp its;unable to open connection tell me this the right way of write connection string.or not .



 <connectionStrings>


  <add name="ConnetionString" connectionString="

Server=server name;
Database=amitsingh;
User ID=Oltronics;
Password=password;
Trusted_Connection=False" providerName="System.Data.SqlClient" />

  </connectionStrings>
  #7 (permalink)  
Old November 28th, 2007, 01:16 PM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

raghuvarsingh - you wnat to do it something like this:

  <connectionStrings>
    <remove name="ConnetionString"/>
    <add name="ConnetionString" connectionString="Server=servername;Database=amits ingh;uid=Oltronics;pwd=password;" providerName="System.Data.SqlClient"/>
  </connectionStrings>


jimi

http://www.originaltalent.com
  #8 (permalink)  
Old December 17th, 2007, 11:39 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please check the readme.txt in the code download. It covers some important deployment matters such as this.

Eric

  #9 (permalink)  
Old December 23rd, 2007, 02:55 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I missed this earlier question in this thread:

Quote:
quote:
1. Can you run multiple apps in a single domain on a shared server, or is TBH the only site you can run?
Answer: yes and no. The built-in forms authentication only works on a one-per application basis. The word "application" means "IIS Application", which can be either the root or a virtual directory marked as an application. This is also true of the cache, session state, etc. With a cheap shared hosting site you're normally not allowed to create new virtual directories, and your app runs in the virtual root. That is the way mine is running. You can create new regular folders, though.

The good news is that it is possible to run more that one logical web application in this environment
if you are willing to let them share one repository of users, and the same cache, session state, etc. Your first thought may be "that would be a bad idea - I want separation", and that separation is possible if you roll your own common authentication code (instead of the built-in code), and you could track users by the domain they request. The key here is that you almost certainly want to register separate domain names for each logical site, and map them all to different folders on the one real site. And since each domain that a user is requesting is available as part of the request, that lets you distinguish the users. Cache and session variable names should have a prefix that defines the logical site, such as TBH.

So it is possible to have several different domains pointing to different folders (not virtual directories) of one shared hosting account. But you'll have to roll up your sleeves to write the authentication code. Users would be none the wiser and they would be totally separate from users of other domains being served by the same hosting account.

Setting up the connection string is discussed in the readme, and the only thing you need to do is migrate the DB to the remote DB server. I always recommend the Database Publication Wizard for that, which is a free download from msdn. That also comes with VS 2008. This wizard did not exist when the book was written. It's basically a friendly front-end to the SSIS program. I have a sticky message in this forum that explains this tool.

Eric

  #10 (permalink)  
Old December 26th, 2007, 01:29 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It would be cool to integrate that multi-domain support I was talking about in my message with a new-and-improved CMS to make a real sweet solution for those of us who use shared-hosting sites. We could take the Beer House to the next level by having a custom authentication module that can support multiple logical sites in one physical site, and also include support for Windows Live Writer (see my post on Graffiti: http://p2p.wrox.com/topic.asp?TOPIC_ID=67847).

This Christmas has given me a lot of new ideas. That's worth more than presents! A politically incorrect "Merry Christmas" to all of you!

Eric





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with deployment snufse ASP.NET 2.0 Basics 9 January 21st, 2008 07:00 PM
Deployment Problem with Sub Reports amirmunir Crystal Reports 0 May 28th, 2006 10:57 PM
problem in deployment shupiR ASP.NET 1.0 and 1.1 Basics 0 December 22nd, 2005 01:45 AM
Deployment problem krishnabhargav ASP.NET 1.0 and 1.1 Professional 0 November 28th, 2005 01:07 AM
Deployment Problem LULU VB.NET 0 October 9th, 2003 01:07 AM





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