.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

FormsAuthentication RedirectFromLoginPage change default.aspx

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :ASP.Net

Hi all I know this post is the same than other around but I can't get it to work the way I want, the thing is that the Login.aspx page have it in a folder not in the root of the directory, also the page that I want to redirect the user to is in the same folder, so far I got this in my web.config file

<authentication mode="Forms">
			<forms name=".ASPXAUTH" loginUrl="~/Admin/LogIn.aspx" defaultUrl="~/Admin/Admin.aspx" protection="All" timeout="20" path="/">
			<deny users="?"/>


	<location path="~/Admin/Admin.aspx">
				<forms name=".ASPXAUTH" loginUrl="~/Admin/LogIn.aspx" defaultUrl="~/Admin/Admin.aspx" />
		  <deny users="?"/>

All pages contained in the Admin folder want it to be protected, the administrator needs to authenticate first, so my question is what I am doing wrong? need to take the Login.aspx and the admin.aspx out of the admin folder?

Any help wou

View Complete Post

More Related Resource Links

How to change the default page base class?


I've tried setting the <pages pageBaseType="DynamicWebPage" /> value in web.config, but when I response.write out the page type, I'm still getting Microsoft.WebPages.WebPage.

I'm simply trying to sub-class WebPage and add some additional functionality such as a dynamic PageData dictionary similar to Phil Haack's dynamic ViewData dictionary.



how to change default menu tab in master pages?



i have 5 tabs in my master page application. how can i make 2nd tab as default?

any ideas?


Content Editor Web Part in default.aspx not copied over.


I have a CEWP with some content in the default.aspx page on one site, and I downloaded and uploaded the default.aspx page to another site collection. But when I display the default.aspx page in the browser the CEWP is not there anymore.

Is the CEWP detached from the default.aspx page and must also be copied over to the new site collection? If so, then where is the CEWP stored?

Thanks for any help. 

Is it possible to change the title bar background and the font style on default template?



Is there any way to change the default top link /title bar picture and the fonts of the title without breaking anything in the layout/structure?

I have changed the theme to Obsedian and I would also like to change the picture of the title bar of this theme and also the font/style of the title, top link bar, menus..etc. Is there a way to do this?

Please note: I am using WSS 3.0 and I am not the Administrator of the sharepoint. I am only the site admin of some sites on this sharepoint. I can do some basic customization using SPD.

Basically, what I am trying to do is that I want to set up a sharepoint site, however I want to make it NOT look like a sharepoint site.Well I know this is possible, but for my case it might be just partially possible due to the limitation that I am not the Site collection admin and hence I do not have direct access to the server itself.

What I want is to hide most of the sharepoint links/menus/bars, etc and use my own buttons/hyperlinks etc .. for user to navigate on the sites.

Thanks in advance for your help/advices.



How do I change the default HTML code for a collection of lists and views


I have modified the html display code of some lists and content query web parts in SharePoint designer.  This works well when modifying a few lists, but I have many lists and different views with these many lists.

Is there a way to modify the template code for a site so that all my lists, views and CQWPs display identically with my modified code?  Managing these individually is not practical.

Sharepoint editform.aspx will not allow to change

I wanted to updated my editform.aspx but was warned to make a backup first which I did so I saved editform.aspx as editform_original.aspx.   I edited editform.aspx just the way I want it, went to my sharepoint list and clicked my edit button and it now loads editform_original.aspx. how do I point this back to editfor.aspx? Okay so just to be clear I opened editform.aspx saved as editform_original.aspx in same folder Edited editform.aspx with my changes have tried to set default edit screen to editform.aspx from editform_orignal.aspx and it will not take

Redirecting default.aspx to root virtual directory

I have a simple ASP.NET 3.5 application running under IIS7 under a virtual directory. So the URL of my app is like http://site.com/app. I want to 301-redirect the request to site.com/app/default.aspx to site.com/app for better SEO. I have to do this redirect through code only, not by any IIS settings. I am unable to do so via code mentioned in this article:http://www.4guysfromrolla.com/articles/072810-1.aspxThe code:if (request.RawUrl.Equals("/default.aspx")) { newUrl = string.Format("{0}://{1}{2}", request.Url.Scheme, request.Url.Authority, request.RawUrl.Remove(request.RawUrl.LastIndexOf("/default.aspx", StringComparison.OrdinalIgnoreCase))); context.Response.Status = "301 moved permanently"; context.Response.AddHeader("Location", newUrl); } seems to go into an infinite loop when the application is under a virtual directory. the request.RawUrl property always returns "/default.aspx" even after a 301 redirect causing the infinite loop. How can I fix this issuhttp://forums.asp.net/AddPost.aspx?ForumID=27e?

Change Default Column Value programatically

On a Document Library Settings Page, there is a new setting in SP2010: "Change Default Column Value". Changing the default value of the Field is different from this value. Does anyone know what this value is and where to set it programatically? Also, what libraries is this setting available on? This code updates the field's default value but not the property mentioned above: SPField field = list.Fields["Column"]; field.DefaultValue = "DefaultValue"; field.Update(); Thanks!

How do I change the order of column names in EditForm.aspx

I have an Announcements list to which I've added extra columns: Publish (date), De-Publish (date), and Category (choice).  When I go to EditForm.aspx, the columns display in this order: Title , Body, De-Publish , Category and Publish . I'd like to change the order of the columns on EditForm.aspx so that it is Title, Body, Category, Publish and De-Publish . Changing the All Items view doesn't do it. How might I change the order of columns that is shown to the user?

Custom DynamicData Default.aspx GridView

On the Default.aspx page the GridView control is populated programmatically by setting its Datasource to a list of table objects. Is there some way I could populate this GridView manually using my own set of NavigateUrls and DisplayNames?Simon

how can I change default errormessage for invalid price

I have:[Required(ErrorMessage = "Price is required.")]public decimal price { get; set; }How can I change default message for invalid price - I would like to change default error message "The value '45,8asasa' is not valid for Price.".

Calling a text Box from Default.aspx??

Hi there, I was wondering if I can create a method or textbox in an .aspx page (such as 'Default.aspx') and from a different class (e.g 'MyClass.vb') insert values into the textbox?Thanks in advance

change focus on controls in sharepoint list newform.aspx

hi all. i have newform.aspx where i hav required fields . when i say ok to enter the values the required field valiedates and shows error messages. but the problem is that the focus where it is suppose to get placed is promting in differnet place. can i change the focus of the controls inside newform.aspx or editform.aspx?jayaraja

modify/override properties of default sharepoint modal dialogs (ex. editview.aspx) using javascript

Hello all, I would like to know how can I modify (override) some properties of the default sharepoint modal dialogs using Javascript. Ex. the size and location of editview.aspx. I while ago I asked a question about overriding the DialogResult in the display view dialog. I got an answer from Zach which looked like this:             sb.Append("<script type=\"text/javascript\">");             sb.Append(@"window.setTimeout(function () {");             sb.Append(@"if (window.frameElement && typeof(window.frameElement.overrideDialogResult) == 'function')");             sb.Append(@"{");             sb.Append(@"SP.SOD.executeFunc('sp.ui.dialog.js', 'SP.UI.DialogResult.OK', function () {");             sb.Append(@"window.frameElement.overrideDialogResult(SP.UI.DialogResult.OK); ");             sb.Append(@"});");             sb.Append(@"}");  

Change the Default Date in the Date Picker Control

Hi, I have a WPF Datagrid in which one of the columns is a Date Column. So i have used a DataTemplateColumn as Follows     <my:DataGridTemplateColumn CellTemplate="{StaticResource EffDateDateTimePickerControl}"   CellEditingTemplate="{StaticResource addrEffDate}" Header="Effective Date"/> And in my Resource File i have written the following code: Style   TargetType="{x:Type my:Calendar}" x:Key="CalenderControlTemplate">     <Setter Property="Template">     <Setter.Value>     <ControlTemplate TargetType="my:Calendar" >     <my:CalendarItem Name="myCalendarItem"   Background="White"   BorderBrush="Black"   BorderThickness="1"   VerticalAlignment="Center" />     </ControlTemplate>       </Setter.Value>     </Setter>     </Style>       <DataTemplate x:Key="EffDateDateTimePickerControl">     <Label x:Name="lblEffDate" Content="{Binding effectiveDate,Mode=TwoWay}" ></Label>     </DataTemplate>     <DataTemplate x:Ke

How to change the split view when editing an aspx file

I've been using SPD 2010 more and more over the past few weeks.  However, when there's a navigation bar on the left, toolbox on the right, ribbon above and split view of code and design in the middle, there's just not enough room on the screen - (I have 2 LCDs at 1280x1024).  I can spread the window accross both monitors but that's not much use unless, I can change the split between code and design from horizontal to vertical. Is this possible?  Help apprieciated. Cheers, Bill

Please help Cant edit default.aspx

we had a problem with our sharepoint 2.0 site. .net 3.5 got installed which corrupted the webparts so following microsofts kb we rolled back to .net 2.0 which seemed to work. problem is that the default.aspx seems to be an old version. now when we connect to the site using frontpage and look at the default.aspx it is the correct version but when you browse to the site it loads the old version. IIS is set to pickup default.aspx so it should work. why is it that in frontpage the default.aspx is correct but when we browse to the site it is picking up and old version. im confused.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend