Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics 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 January 15th, 2007, 10:51 AM
Authorized User
 
Join Date: Dec 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default MasterPage Help!!!????

Hi all,

I'm developing a fairly simple web application in ASP .NET 2.0,

I have a problem with the displaying of the master page, the following is what i'm trying to do:

I have the masterpage set and CSS and I created a folder which contains a page or "section" of the website that will require the user to login to access, I set permissions for "anonymous user" to deny and the login page is called successfully, but after logging in, the content of the page that is called but the masterpage "theme-ing" or "template" doesn't show, so i am left with a white background, the menu and content,Thats it. But if i move the aspx page to the website root, it displays correctly, but then i am unable to deny access to that specific page, the problem that occurs when I move it to the root, is, that I have to log in, in order to view the whole site.

I basically want to allow all users to view most of the site, but only "allowed" users with login details to view a particular page, which makes sense to store it in a separate directory and set permissions for it there. I double checked that the page is referencing the masterpage, but still no luck.

Any ideas of how to achieve this?

Much thanks

Kr33

A man's dreams are an index to his greatness!
__________________
A man\'s dreams are an index to his greatness!
 
Old January 16th, 2007, 02:03 PM
Friend of Wrox
 
Join Date: Apr 2004
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Not sure what the problem you're having is. Why don't you include some code so we can help you better.

Aaron

 
Old February 1st, 2007, 12:49 PM
Registered User
 
Join Date: Feb 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Any luck on this? I am having the exact same problem. Everything is good until I login, then all the pages that are called from my secure directory are missing the images and color formating of the master page, the controls seem to work with no issue.


Quote:
quote:Originally posted by kr33
 Hi all,

I'm developing a fairly simple web application in ASP .NET 2.0,

I have a problem with the displaying of the master page, the following is what i'm trying to do:

I have the masterpage set and CSS and I created a folder which contains a page or "section" of the website that will require the user to login to access, I set permissions for "anonymous user" to deny and the login page is called successfully, but after logging in, the content of the page that is called but the masterpage "theme-ing" or "template" doesn't show, so i am left with a white background, the menu and content,Thats it. But if i move the aspx page to the website root, it displays correctly, but then i am unable to deny access to that specific page, the problem that occurs when I move it to the root, is, that I have to log in, in order to view the whole site.

I basically want to allow all users to view most of the site, but only "allowed" users with login details to view a particular page, which makes sense to store it in a separate directory and set permissions for it there. I double checked that the page is referencing the masterpage, but still no luck.

Any ideas of how to achieve this?

Much thanks

Kr33

A man's dreams are an index to his greatness!
 
Old February 1st, 2007, 12:56 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,

Take a look here: http://weblogs.asp.net/scottgu/archi...31/437027.aspx

Maybe you're blocking access to the CSS and image files as well?

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old February 2nd, 2007, 01:49 AM
Authorized User
 
Join Date: Dec 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes I did get it to work...Here is how I did it,

1. First things first, make sure your CSS for the masterpage/site
    is in the site's root directory...

2. Now run the ASP .NET Configuration Wizard
   (Goto Website->ASP .NET Configuration)

3. Click the Security Tab and set the access rules to the site as
   follows->Allow all users and roles to access the root directory,
   Allow the users/roles to the "secure" directory and deny anonymous
   users.
To solve the images problem:

if you are setting the image in the CSS file, make sure that you specifically set the height and width to whatever the image size is
and that should solve the problem.

NB: The above worked for me, hope it does for you. :)

Another thing to remember is that with ASP .NET, it can be very fussy when it comes to placing certain files in the right places, I learnt that the hard way.

Hope I was of help.

Ciao

A man's dreams are an index to his greatness!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Masterpage teddyk ASP.NET 2.0 Basics 1 September 15th, 2008 08:37 AM
MasterPage grstad ASP.NET 2.0 Basics 0 June 7th, 2008 04:30 AM
My first MasterPage grstad ASP.NET 2.0 Basics 4 June 7th, 2006 11:54 AM





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