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

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

Need to use httpmodule & FBA such that site has a default login when it is accessed.

Posted By:      Posted Date: October 22, 2010    Points: 0   Category :SharePoint

scenario :

I have a web-application with windows authentication AND as anonymous access to entire site. Due to the issue that anonymous users can not create records on a list (that has eventhandlers or workflows), I am looking at changing the site to Forms-based-authentication and then have automatically sign-in as some user (example: 'siteuser' etc).

Upon checking it looks like I have to use httpmodule and FBA to overcome to the error. I am looking some detailed steps to convert the site to FBA (currently site has just default zone and the site will be always anonymous) and using httpmodule to impersonate as some user.


View Complete Post

More Related Resource Links

Visual Web Developer 2010 Express "Copy Web Site" using different login


I created a site and am trying to grant another pesron access to upload changes to it without giving them my super-user login.

I made a login for her but I can't test whether it works or not because no matter how much I "disconnect" in the Copy Web Site page of VWD 2010, reconnecting to the same site always logs in as my superuser account without prompting me for a login again.

How do I test is the account it set up correctly before having her try to upload to it?    I want to force the login to remote site dialog to pop up again to test her account.

Any ideas?

Login page for whole site


Hi all,


I've been searching and trying to get this now for hours, so i though i'd come here.

For my website, there will be an admin site. I want to create users in my website database, i have a logins table with a hashed password column. The problem i have is making sure that every request if not already logged in send the user to the login page.


I have a page Login.aspx which i have created, but if i enter http://website/admin/news.aspx it bypasses the login screen and shows the page!!


Does anyone know how i can do this? i have created Login.aspx myself and verified that the username and password enetered are correct.




Redirect to Security Questions if Site accessed from unrecognized computer?


I'm fairly new to ASP.NET and i'm using the Membership Provider.  I have the need to do similar to some banking sites. Baically I need to track "authorized" computers/ip's for a user.  If the user accesses the site form a recognized Computer/IP then the user is allowed into the app after successful login.  If the computer/IP is not recognized I need to redirect them to a screen to answer the security question setup in fhte Membership Provider.

Has anyone done anything like this or can anyone point me to any examples?  I did a search, but can't seem to find anything.

My idea is to maintain a list of authorized computers/IP addresses and check them on initial login.  If the IP address isn't found I can redirect them to the questions.  My concern is that they are then actually authenticated and could enter any of the site URL's as an authenticated user.

Any suggestions greatly appreciated. 

send the login credentials from site to another server



  i have a site which uses windows credentials to login and in the site i have link to ssrs server.

when i select the report it asks for authentication which i want to skip and send the same user

crendentials to the ssrsserver to access the report.

can anyone suggest on this..

It's possible to using sharepoint services 3.0 hosted site without authentication login ?

It's that any way to able user read / write by without login authentication for sharepoint services 3.0. because i'm having problem when external user need to access to our sharepoint pages, but their can login to it.

Setting Managed MetaData default values on site creation

I am working on a project where the requirement is to have specific document content types.  I have therefore create a site columns feature which creates all my columns, I have a Site Contentypes feature which creates all my content type and I have list templates based on my content types.  I also have created a couple of Site definition features which create specific list instance based on my list template As part of my content types I have created a few Managed Metadata fields which I wanted to set defaults for on the creation of my sites.  I have therefore created a feature which is right at the end of the WebFeatures section in my ONET.xml.  This features enumerates through all lists, looking for specific column names(managed metadata columns) and looks to set these to specific values.  The code to set the default value on the field is: TaxonomyField documentCategoryField = (TaxonomyField)library.Fields["Document Category"]; if (documentCategoryTerm != null) { documentCategoryField.DefaultValue = documentLibraryDefault.ToString(); documentCategoryField.Update();                                                     }                         &n

Problem Saving Files to A Sharepoint 2010 Site from Office 2010: Saves locally by default rather tha

Hi we are starting to use sharepoint 2010 / word 2010 and have found an interesting bug/problem. Sometimes when a user tries to save a file (by clicking on the save button in the quick access toolbar for word 2010) the save dialog comes up with the users local "Documents" folder as the path (not the correct sharepoint path where the document should be saved).  (I should say that we are creating the file from sharepoint by using a toolbar on the document library, with the new button)  We are using a content type and a template attached to the document library when we create the file.  This is really annoying because the user might not notice that the document is saving locally and not to sharepoint.  I have found a strange workaround which involves clicking the [File] tab on the ribbon in word 2010, then clicking "Save and Send" and then clicking the save button again.  At this point word 2010 seems to "remember" that it is trying to save document to sharepoint and shows the sharepoint document library. This is a real nuisance which could lead to documents being lost/misfiled if people don't realize that this is happening.  Can anyone help me? Thanks Kevin krd

ASP.NET 5.0: Multiple logins and login types in default ASP.NET membership provider

What do you think about an ability of having multiple logins and login types to be attached to the same user? Let me explain this by showing how database schema can be re-factored to support this model:Remove [Password], [PasswordSalt] columns from [Users] database tableAdd [Logins] table with one-to-many relationship between [Users] and [Logins] tablesThis will allow one user to have multiple credentials attached to his or her account of different types such as Username&Password, Windows Live ID, Open ID from different providersYou will be able to restrict allowed login types and OpenID providers in web.config So.. do you think it is a good idea to add support of this model into ASP.NET 4.5/5.0 membership service?http://aspnet.codeplex.com/workitem/7149

SharePoint how does it know to use a feature default.aspx deployed instead of site definition defaul

I have created a feature which deploys a custom default.aspx page. The deployed file goes to the template\features{featureName} directory. How does SharePoint know to use this default.aspx page instead of the one that is located in SiteTemplates{Site Def name} directory?dave

Cookies used in login to SharePoint site

I am trying to logon to my remote site while using SharePoint Designer 2007 and my login fails each and every time.  I loaded Fiddler to see what is going on and can see that there is a cookie being passed which contains an invalid pwd.  I have deleted all the stored cookies in IE, but still see the invalid pwd being sent to the host.  If the cookies are not stored in the IE files, where might they be stored?

Can't inherit default page layout on a publishing site?

  Hi,   Implementing SharePoint for the first time.   We've got a page layout that we want to use as a default. We've got it set as the default in the top site in the site collection. However, when I create a Publishing Site with Workflow, it doesn't default to using the right layout, despite the fact the sub-site's Site Settings / Page Layouts show that it it set to inherit the default page layout from its parent.   Oddly, when I create another type of site, e.g. a Blank Site, it does inherit the default layout.   Any suggestions?   :|Ben      

Small site embedded login validating against Active Directory and redrecting to SharePoint site


I am only finding pieces of this information. 

Challenge: Have a standard page with a login box in the corner that is exposed on the web.  The login will validate an employee against AD and also redirect them to a site collection.

I have found information on claims based authentication and the AD Membership provider.  I have also found information on form based login pages.  Most of these examples though just modify the SharePoint form login.  I want to create just a small login box on a page that is already created.  The one thing that I can't seem to find any really solid information on is the redirect to a site collection.

Can anyone tie all of this together for me?  Am I using the correct terminology and heading down the right path.

Any help is greatly appreciated.

A Login Site for a Few Friends to Upload Pictures - Help Please


Good Day,

I am new to the ASP and MS Visual Web Developer.  So can we please keep this conversation in a ASP VB for Dummies Dialog!

I have
 1 - Created a Registration Page using The CreateUserWizard in it's most basic form
 2 - Created a Login Page using the Login Control in it's most basic form
 3 - I created a folder on my IIS7 / ASP Hosting Account's Server called photos which is technically "~/photos" (if I am correct)
  set that folder up for write permissions
 4 - I have a page (uploadphoto.aspx) with a FileUpload control and a Button when clicked uploads a file (*.jpg) to the photos folder (I mentioned above).

So I have this working, and it's basic.  What I want to change, sounds simple, but yet I have no Idea on how to do it. Which is:

 1a. When a Visitor creates a user name (at registration), i need a subfolder created under the photos folder that will be equal to the users login name
  (example - I register as samcook, so now a folder named samcook will be created which would technically be "~/photos/samcook"

 I will then build a web page that will include pictures from the samcook folder (this part I know how to do also)

 Please help, I have been reading the forums for 2 days and still have no

Using HttpModule to change master page dynamically on SharePoint 2010 site


I am trying to change master page dynamically on SharePoint 2010 site. I reviewed some documents (SharePoint: Dynamically Change Master Page: http://ranaictiu-technicalblog.blogspot.com/2009/10/sharepoint-dynamically-change-master.html) and I implemented IHttpModule, added it to GAC, modified web.config(safecontrol, httpmodule, module)
It works good! But I found some problems
1.Never catch the PreInit event for publishing pages
2."/_Layouts/RedirectPage.aspx" page occurred error
3.ContextMenu did not work

using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.UI;
using Microsoft.SharePoint;
using System.Configuration;
using Microsoft.SharePoint.ApplicationRuntime;

namespace MasterUtilModule
    public class MasterModule : IHttpModule
        public void Dispose() { }
        public void Init(HttpApplication context){

Site Login



I m using site login Control in my login.ascx file and disaplaying login control in Div so if there is login link in page and i click on that then Login Div will popup which is site login.


My i know how i can handle erros like username or password is incorrect on client side instead server side? 

Moss public facing site login



   is there a way to completely prevent login for a public facing Moss site? I have extended the web application so I have separate authentication providers and what I would like to do is prevent any login ability to the public facing side and all content authoring be completed through extended web app which is only available internally.

Calculated column Default Value not retained in site template.


On a new blank site, create a custom list and make these changes to the Title field:

  1. Change the name to Date
  2. Change Required to No
  3. Change Default Value: to Calculated Value
  4. Enter the formula "=TEXT(Today,"d-mmm-yyyy")" so that it defaults to today's date

Save thsi site as a template, then create another site based on this template. Items 1 and 2 above are carried over to the new site but items 3 and 4 revert to the default setting.

Does anyone know how to get around this ... er ... abnomaly?

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