Mesmashu
  • Posts: 16
  • Joined: 20/11/2007
I'm trying to install 1.9.3 on my employee portal. (.net 2.0) I use the ActiveDirectoryMembershipProvider.

I can get to the install/default.aspx page just fine and I get to the Create Forum screen but when I tell it to use an existing user and put in my account for the admin I get the error.

"Existing user name is invalid and does not represent a current user in the membership store."

For the username I put in my domainname/username

If I try to create a new user I get this error.

"Schema mapping for password question has not been specified."
Stack Trace: 


[NotSupportedException: Schema mapping for password question has not been specified.]
   System.Web.Security.ActiveDirectoryMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +2371924
   System.Web.Security.Membership.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +224
   System.Web.Security.Membership.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, MembershipCreateStatus& status) +28
   YAF.Install._default.CreateForum() +552
   YAF.Install._default.Wizard_NextButtonClick(Object sender, WizardNavigationEventArgs e) +552
   System.Web.UI.WebControls.Wizard.OnNextButtonClick(WizardNavigationEventArgs e) +105
   System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +453
   System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +17
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
   System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102



Any ideas?

Thanks.




Sponsor
test2005
  • Posts: 761
  • Joined: 12/02/2005
I don't know much about the ActiveDirectoryMembershipProvider Class, but have you tried setting the "require question and answer" flag to false?


.....the man in black fled across the desert..........and the gunslinger followed.....
Mesmashu
  • Posts: 16
  • Joined: 20/11/2007
trying to figure out why the Membership.GetUser is returning null.

// try to get data for the existing user...
				user = Membership.GetUser( ExistingUserName.Text.Trim() );

				if ( user == null )
				{
					AddLoadMessage( "Existing user name is invalid and does not represent a current user in the membership store." );
					return false;
				}
Mesmashu
  • Posts: 16
  • Joined: 20/11/2007
here's my ultimate goal.

My users login to the employee portal which is validated through Active Directory. I want to have a forum link that takes them right into the yaf forums without having to log in again. Is this going to be possible? Will yaf "know" who the users are?
test2005
  • Posts: 761
  • Joined: 12/02/2005
Mesmashu wrote:

where do i change that?



In your web.config file. Here's an example of the ASPNETSQLMembershipProvider



<membership>
    <providers>
        <remove name="AspNetSqlMembershipProvider"/>
	<add name="AspNetSqlMembershipProvider"
             type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
             connectionStringName="LocalSqlServer"
             enablePasswordRetrieval="false"
             enablePasswordReset="true"
             requiresQuestionAndAnswer="true"
             applicationName="/"
             requiresUniqueEmail="false"
             minRequiredPasswordLength="5"
             minRequiredNonalphanumericCharacters="0"
             passwordFormat="Hashed"
             maxInvalidPasswordAttempts="5"
             passwordAttemptWindow="10"
             passwordStrengthRegularExpression=""/>
     </providers>
</membership>



HTH

:)
.....the man in black fled across the desert..........and the gunslinger followed.....
Mesmashu
  • Posts: 16
  • Joined: 20/11/2007
<membership defaultProvider="ActiveDirectoryMembershipProvider" >
	<providers>
	<clear/>
		<add name="ActiveDirectoryMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=***************"
                   connectionStringName="conActiveDirectory"
                   connectionUsername="*************"
                   connectionPassword="*************"
                   attributeMapUsername="SAMAccountName"
                   enableSearchMethods="true"
                   requiresQuestionAndAnswer="false"/>
	</providers>
</membership>


added this but still got the same error when i tried to create a new user.
test2005
  • Posts: 761
  • Joined: 12/02/2005
Well this is outside my expertise. Out of curiosity, can you add/edit/delete posts?

.....the man in black fled across the desert..........and the gunslinger followed.....
Mesmashu
  • Posts: 16
  • Joined: 20/11/2007
can't even get that far... this is during initial setup.

if i try to go to yaf/default.aspx i get

System.Exception: No data for board with id: 1

so it hasn't even created the forum yet because of the errors above.
test2005
  • Posts: 761
  • Joined: 12/02/2005
well this does sound like a configuration problem. Does your YAF test machine have rights to access AD?
.....the man in black fled across the desert..........and the gunslinger followed.....
Mesmashu
  • Posts: 16
  • Joined: 20/11/2007
It does have access because I have to login to the portal before I even get to the yaf/install page. So it's running off the same web.config file.
test2005
  • Posts: 761
  • Joined: 12/02/2005
Your portal might have access...but YAF obviously doen't. Re-check your web.config file....got to be in there somewhere.
.....the man in black fled across the desert..........and the gunslinger followed.....
Mesmashu
  • Posts: 16
  • Joined: 20/11/2007
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

	<configSections>
		<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
			<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
				<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
				<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
					<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
					<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
					<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
				</sectionGroup>
			</sectionGroup>
		</sectionGroup>
		<section name="rewriter" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" requirePermission="false"/>
	</configSections>
	
	
	<appSettings configSource="appSettings.config"/>
	<connectionStrings configSource="connectionStrings.config"/>



	<system.net>
		<mailSettings>
			<smtp configSource="mail.config"/>
		</mailSettings>
	</system.net>
	
	<system.web>
		<pages maintainScrollPositionOnPostBack="false" enableEventValidation="false" autoEventWireup="false" validateRequest="false" smartNavigation="false">
			<controls>
				<add tagPrefix="HenselPhelps" namespace="HenselPhelps.EmployeePortal" assembly="HenselPhelps.EmployeePortal"/>
				<add tagPrefix="ComponentArt" namespace="ComponentArt.Web.UI" assembly="ComponentArt.Web.UI"/>
				<add tagPrefix="atlas" namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Atlas"/>
				<add tagPrefix="atlas" namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Atlas"/>
				<add tagPrefix="CrystalReports" namespace="CrystalDecisions.Web" assembly="CrystalDecisions.Web, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>

				<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
				<add tagPrefix="ajaxToolkit" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit"/>

				<!-- Default: use non-dynamic (compiled classes) in YAF -->
				<add tagPrefix="YAF" namespace="YAF.Classes.UI" assembly="YAF.Classes.UI" />
				<add tagPrefix="YAF" namespace="YAF.Classes.Utils" assembly="YAF.Classes.Utils" />
				<add tagPrefix="YAF" namespace="YAF.Classes.Data" assembly="YAF.Classes.Data" />
				<add tagPrefix="YAF" namespace="YAF.Controls" assembly="YAF.Controls" />
				<add tagPrefix="YAF" namespace="YAF.Controls.Statistics" assembly="YAF.Controls" />

				<!-- Optional: use dynamic classes in YAF by moving all the YAF.x directories (YAF.Classes.*, YAF.Providers)
						into the App_Code\YAF directory. Delete the associated .dll files from the \bin directory. Comment out the above 
						"non-dynamic" namespaces above and enable these: 
				-->

				<!--add tagPrefix="YAF" namespace="YAF.Classes.UI" />
				<add tagPrefix="YAF" namespace="YAF.Classes.Utils" />
				<add tagPrefix="YAF" namespace="YAF.Classes.Data" />
				<add tagPrefix="YAF" namespace="YAF.Controls" />
				<add tagPrefix="YAF" namespace="YAF.Controls.Statistics" /-->

				<add tagPrefix="YAF" namespace="YAF.Classes" />
				<add tagPrefix="YAF" namespace="YAF"/>
				<add tagPrefix="editor" namespace="YAF.Editor"/>
			</controls>
			<namespaces>
				<add namespace="YAF" />
				<add namespace="YAF.Classes.UI" />
				<add namespace="YAF.Classes.Utils" />
				<add namespace="YAF.Controls" />
				<add namespace="YAF.Classes.Data" />
			</namespaces>
		</pages>
		<sessionState mode="SQLServer" sqlConnectionString="Data Source=localhost;Integrated Security=True" cookieless="false" timeout="30"/>
		<authentication mode="Forms">
			<forms name=".HenselPhelpsAuth" loginUrl="Login.aspx" defaultUrl="Default.aspx" protection="All" timeout="60" slidingExpiration="true" path="/"/>
		</authentication>
		<membership defaultProvider="ActiveDirectoryMembershipProvider" >
			<providers>
				<clear/>
				<add name="ActiveDirectoryMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="conActiveDirectory" connectionUsername="********" connectionPassword="*********" attributeMapUsername="SAMAccountName" enableSearchMethods="true"/>
			</providers>
		</membership>
		<roleManager enabled="true" defaultProvider="ActiveDirectoryRoleProvider" cacheRolesInCookie="true" cookieName=".HenselPhelpsRoles" cookiePath="/" cookieProtection="All" cookieSlidingExpiration="true" cookieTimeout="60" maxCachedResults="50">
			<providers>
				<clear/>
				<add name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="conAspNetDb" applicationName="HenselPhelps.EmployeePortal"/>
				<add name="ActiveDirectoryRoleProvider" type="HenselPhelps.EmployeePortal.ActiveDirectoryRoleProvider" connectionStringName="conActiveDirectory" connectionUsername="**********" connectionPassword="***********" applicationName="HenselPhelps.EmployeePortal"/>
			</providers>
		</roleManager>
		<authorization>
			<deny users="?"/>
		</authorization>
		<profile defaultProvider="SqlProfileProvider">
			<providers>
				<clear/>
				<add name="SqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="conAspNetDb" applicationName="HenselPhelps.EmployeePortal"/>
			</providers>
			<properties>
				<group name="Name">
					<add name="Title" type="System.String"/>
					<add name="First" type="System.String"/>
					<add name="Middle" type="System.String"/>
					<add name="Initial" type="System.String"/>
					<add name="Last" type="System.String"/>
					<add name="Suffix" type="System.String"/>
				</group>
				<group name="Preferences">
					<add name="DbPageSize" defaultValue="15" type="System.Int32"/>
				</group>
			</properties>
		</profile>
		<compilation debug="false">
			<assemblies>
				<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
				<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

				<add assembly="CrystalDecisions.CrystalReports.Engine, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
				<add assembly="CrystalDecisions.Enterprise.Framework, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
				<add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
				<add assembly="CrystalDecisions.Shared, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
				<add assembly="CrystalDecisions.Enterprise.InfoStore, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
				<add assembly="CrystalDecisions.Web, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
				<add assembly="CrystalDecisions.Enterprise.Desktop.Report, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
				<add assembly="CrystalDecisions.ReportSource, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
				<add assembly="CrystalDecisions.Enterprise.Viewing.ReportSource, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
				<add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
				<add assembly="System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="CrystalDecisions.ReportAppServer.CommLayer, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
				<add assembly="CrystalDecisions.Enterprise.PluginManager, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
				<add assembly="System.Runtime.Serialization.Formatters.Soap, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="BusinessObjects.Licensing.KeycodeDecoder, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
				<add assembly="CrystalDecisions.ReportAppServer.CubeDefModel, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
				<add assembly="CrystalDecisions.ReportAppServer.XmlSerialize, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
				<add assembly="CrystalDecisions.ReportAppServer.ObjectFactory, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
				<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="CrystalDecisions.ReportAppServer.Prompting, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
				<add assembly="CrystalDecisions.ReportAppServer.ReportDefModel, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
				<add assembly="CrystalDecisions.ReportAppServer.DataDefModel, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
				<add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="System.DirectoryServices.Protocols, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="System.Web.RegularExpressions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
			</assemblies>
		</compilation>
		<httpHandlers>
			<add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
			<remove verb="*" path="*.asmx"/>
			<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
			<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
			<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>

		</httpHandlers>
		<httpModules>
			<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
			<add name="YafInitModule" type="YAF.Classes.Base.YafInitModule, YAF.Classes.Base"/>
			<!-- add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" / -->
		</httpModules>

	</system.web>
	<location path="Images">
		<system.web>
			<authorization>
				<allow users="*"/>
			</authorization>
		</system.web>
	</location>
	<location path="StyleSheets">
		<system.web>
			<authorization>
				<allow users="*"/>
			</authorization>
		</system.web>
	</location>
	<system.webServer>
		<validation validateIntegratedModeConfiguration="false"/>
		<modules>
			<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
			<add name="YafInitModule" type="YAF.Classes.Base.YafInitModule, YAF.Classes.Base"/>
			<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" preCondition="managedHandler" />
		</modules>
		<handlers>
			<remove name="WebServiceHandlerFactory-Integrated"/>
			<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
			<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
			<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
		</handlers>
	</system.webServer>
</configuration>


I love config files. :)

That's what I got... see anything I should change?
Mesmashu
  • Posts: 16
  • Joined: 20/11/2007
bumpity bump.
Forum Jump  
  • You cannot post new topics in this forum.
  • You cannot reply to topics in this forum.
  • You cannot delete your posts in this forum.
  • You cannot edit your posts in this forum.
  • You cannot create polls in this forum.
  • You cannot vote in polls in this forum.

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved