![]() |
|
|
#1 (permalink) |
|
Registered User
Join Date: Feb 2006
Posts: 29
|
default page
how do I set up my website so that when a user enters the url it opens my default page in another folder?
I'm using forms authentication so a user must be logged in to view anything in the root so i've set up a folder called AllowAll. At current when a user visits the site they will automatically be bounced to my login screen but i would like another page to be viewed before this at the address given above. Is this possible? Many thanks. Last edited by njwilli3; 06-05-2006 at 12:02 PM. Reason: remove url references |
|
|
|
|
|
#2 (permalink) |
|
Administrator
Join Date: May 2003
Posts: 1,299
|
Have you tried setting up a redirect from the main wwwroot to the AllowAll/Default.aspx file?
__________________
Jacob Colton jacob@catalyst2.com Open a ticket | Knowledgebase | Rate catalyst2 | Review catalyst2 |
|
|
|
|
|
#4 (permalink) |
|
Registered User
Join Date: Feb 2006
Posts: 29
|
wups
actually didn't work, If i put a redirect on the index page (the login & home page) then everytime i want to go to this page it will redirect to default.aspx. I only want default.aspx to be displayed when a user visits my website.
Last edited by njwilli3; 06-05-2006 at 12:00 PM. Reason: remove url references |
|
|
|
|
|
#5 (permalink) |
|
Administrator
Join Date: May 2003
Posts: 1,299
|
So then, I would suggest you get the script to check the address in the address bar and then redirect dependant on that.
__________________
Jacob Colton jacob@catalyst2.com Open a ticket | Knowledgebase | Rate catalyst2 | Review catalyst2 |
|
|
|
|
|
#7 (permalink) |
|
Registered User
Join Date: Feb 2006
Posts: 29
|
error
thanks for the help but I've gone for changing my folder structure so that my forms authentication occurs in my "/Secure" folder but I seem to get the following error. Is this something you sort out at your end Jacob?
Server Error in '/' Application. -------------------------------------------------------------------------------- Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. Source Error: Line 38: --> Line 39: Line 40: <authentication mode="Forms"> Line 41: <forms name=".ASPXAUTH" loginUrl="Index.aspx" /> Line 42: </authentication> -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300 Last edited by njwilli3; 06-05-2006 at 11:58 AM. Reason: to remove url references |
|
|
|
|
|
#8 (permalink) |
|
Administrator
Join Date: May 2003
Posts: 1,299
|
Can you open a ticket with the URL of that error and we will take a look.
Regards, Jacob
__________________
Jacob Colton jacob@catalyst2.com Open a ticket | Knowledgebase | Rate catalyst2 | Review catalyst2 |
|
|
|
|
|
#9 (permalink) |
|
Registered User
Join Date: Feb 2006
Posts: 29
|
something quite useful - page authorisation
after surfing many sites looking for an answer to allowing more than 1 un-authenticated page to be viewed before a user logs in i came accross this which allows for URL authorisation. I've found it extremely useful for my problem. See following post:
Emergency-Form level authentication 2004-06-10 16:38:26 altanic [Reply | View] look into the URLAuthorization stuff. I don't claim to have a solid handle on this but I've accomplished a working example on doing exactly what you guys ask for by setting each file/folder's authorization settings in the web.config file. You would want to add an element such as: <location path="PublicPage.aspx"> <system.web> <authorization> <allow users="*"/> </authorization> </system.web> </location> for each item/folder you want to be freely available to everybody. Conversely, you could open your whole site to allow users="*" and then change the above to: <location path="protected_directory"> <system.web> <authorization> <deny users="?"/> </authorization> </system.web> </location> so as to protect this one directory. (or page if you like) Thought it could be potentially usefull for others. More details of this post can be found at http://www.ondotnet.com/pub/a/dotnet...rmsauthp1.html |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|