p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
I forgot my password
Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other programmers’ questions, win occasional prizes given to our best members, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 15th, 2007, 09:51 AM
Authorized User
 
Join Date: Dec 2006
Location: Durban, KZN, South Africa.
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old January 16th, 2007, 01:03 PM
Friend of Wrox
Points: 716, Level: 10
Points: 716, Level: 10 Points: 716, Level: 10 Points: 716, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: San Francisco, CA, USA.
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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old February 1st, 2007, 11:49 AM
Registered User
 
Join Date: Feb 2007
Location: Murfreesboro, TN, USA.
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old February 1st, 2007, 11:56 AM
Imar's Avatar
Wrox Author
Points: 36,403, Level: 83
Points: 36,403, Level: 83 Points: 36,403, Level: 83 Points: 36,403, Level: 83
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,707
Thanks: 13
Thanked 305 Times in 301 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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #5 (permalink)  
Old February 2nd, 2007, 12:49 AM
Authorized User
 
Join Date: Dec 2006
Location: Durban, KZN, South Africa.
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

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 Visual Web Developer 2005 3 June 10th, 2008 07:48 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
MasterPage for 1.1 rupen ASP.NET 1.1 1 September 28th, 2005 03:38 PM



All times are GMT -4. The time now is 01:57 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© 2010 Wiley Publishing, Inc