Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 02, 2006 12:21 PM by mubashir_
Member
5 Points
1 Post
Nov 02, 2006 12:21 PM|LINK
Hii,
I have downloaded the Member Management Component, but i am stuck into some problem. I am using ASP.NET 1.1.
Whenever I try to initialize user it says the connectionstring property has not been initialized.
CODE:
Dim p As Microsoft.ScalableHosting.Security.SqlMembershipProvider
p = New Microsoft.ScalableHosting.Security.SqlMembershipProvider
Dim b As Boolean = p.ValidateUser("admin", "dnnadmin") ' error Connectionstring propert has not been initialized
Actually I need to use DNN users with this application. So i just need to validate the users with DNN DB.
Please see my web.config file below for some idea.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="memberrolesprototype">
<section name="membership" type="Microsoft.ScalableHosting.Configuration.MembershipConfigHandler, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"/>
<section name="roleManager" type="Microsoft.ScalableHosting.Configuration.RolesConfigHandler, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"/>
<section name="profile" type="Microsoft.ScalableHosting.Configuration.ProfileConfigHandler, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"/>
<section name="anonymousIdentification" type="Microsoft.ScalableHosting.Configuration.AnonymousIdConfigHandler, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"/>
</sectionGroup>
</configSections>
<appSettings>
<add key="Anthem.BaseUri" value="http://localhost/MerlinRA/Anthem/" />
<add key="Anthem.ResponseEncoding" value="UTF-8" />
<add key="Anthem.ResponseType" value="application/x-anthem" />
<add key="SiteSqlServer" value="server=mubashir;uid=sa;pwd=sa;Network Library=DBMSSOCN;Initial Catalog=DotNetNuke" />
<add key="SiteSqlServer1" value="server=(local);Integrated Security=true;Network Library=DBMSSOCN;Initial Catalog=DotNetNuke" />
<add key="MachineValidationKey" value="58C0ADB88E50DD55154C89C58C9F3C387FAAEF5A" />
<add key="MachineDecryptionKey" value="7EF112428D632738B9D72E04C245FEFF55B6599260275926" />
<add key="MachineValidationMode" value="SHA1" />
</appSettings>
<system.web>
<httpHandlers>
<add verb="POST,GET" path="ajax/*.ashx"
type="Ajax.PageHandlerFactory, Ajax" />
</httpHandlers>
<!-- DYNAMIC DEBUG COMPILATION
Set compilation debug="true" to insert debugging symbols (.pdb information)
into the compiled page. Because this creates a larger file that executes
more slowly, you should set this value to true only when debugging and to
false at all other times. For more information, refer to the documentation about
debugging ASP.NET files.
-->
<!--<compilation defaultLanguage="vb" debug="true" />-->
<compilation>
<assemblies>
<add assembly="MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"/>
</assemblies>
</compilation>
<httpModules>
<add name="ProfilePrototype" type="Microsoft.ScalableHosting.Profile.ProfileModule, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"/>
<add name="AnonymousIdentificationPrototype" type="Microsoft.ScalableHosting.Security.AnonymousIdentificationModule, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"/>
<add name="RoleManagerPrototype" type="Microsoft.ScalableHosting.Security.RoleManagerModule, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562" />
</httpModules>
<!-- CUSTOM ERROR MESSAGES
Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable.
Add <error> tags for each of the errors you want to handle.
"On" Always display custom (friendly) messages.
"Off" Always display detailed ASP.NET error information.
"RemoteOnly" Display custom (friendly) messages only to users not running
on the local Web server. This setting is recommen ed for security purposes, so
that you do not display application detail information to remote clients.
<customErrors mode="RemoteOnly" />
<!-- AUTHENTICATION
This section sets the authentication policies of the application. Possible modes are "Windows",
"Forms", "Passport" and "None"
"None" No authentication is performed.
"Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to
its settings for the application. Anonymous access must be disabled in IIS.
"Forms" You provide a custom form (Web page) for users to enter their credentials, and then
you authenticate them in your application. A user credential token is stored in a cookie.
"Passport" Authentication is performed via a centralized authentication service provided
by Microsoft that offers a single logon and core profile services for member sites.
<authentication mode="Windows" />
<!-- AUTHORIZATION
This section sets the authorization policies of the application. You can allow or deny access
to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous
(unauthenticated) users.
<authorization>
<allow users="*" /> <!-- Allow all users -->
<!-- <allow users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
<deny users="[comma separated list of users]"
</authorization>
<!--
<authentication mode="Forms">
<forms name=".ASPXAUTH"
loginUrl="Contents/frmLogin.aspx"
protection="All"
timeout="30"
path="/"
requireSSL="false"
slidingExpiration="true" >
</forms>
</authentication>
<deny users="?" />
</authorization>-->
<!-- APPLICATION-LEVEL TRACE LOGGING
Application-level tracing enables trace log output for every page within an application.
Set trace enabled="true" to enable application trace logging. If pageOutput="true", the
trace information will be displayed at the bottom of each page. Otherwise, you can view the
application trace log by browsing the "trace.axd" page from your web application
root.
<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
<!-- SESSION STATE SETTINGS
By default ASP.NET uses cookies to identify which requests belong to a particular session.
If cookies are not available, a session can be tracked by adding a session identifier to the URL.
To disable cookies, set sessionState cookieless="true".
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
<!-- GLOBALIZATION
This section sets the globalization settings of the application.
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
<memberrolesprototype>
<membership userIsOnlineWindow="15" >
<providers>
<add
name="AspNetSqlProvider"
type="Microsoft.ScalableHosting.Security.SqlMembershipProvider, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"
maxInvalidPasswordAttempts="5"
passwordAttemptWindow="10"
connectionStringName="SiteSqlServer1"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
requiresUniqueEmail="false"
passwordFormat="Hashed"
applicationName="/"
description="Stores and retrieves membership data from the local microsoft SQL Server database"
</providers>
</membership>
<roleManager
cacheRolesInCookie="false" cookieName=".ASPXROLES" cookieTimeout="30"
cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true"
createPersistentCookie="false" cookieProtection="All" >
type="Microsoft.ScalableHosting.Security.SqlRoleProvider, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"
description="Stores and retrieves roles data from the local Microsoft SQL Server database"
</roleManager>
<profile enabled="true" defaultProvider="AspNetSqlProfileProvider">
name="AspNetSqlProfileProvider"
type="Microsoft.ScalableHosting.Profile.SqlProfileProvider, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"
description="Stores and retrieves profile data from the local Microsoft SQL Server database"
<properties>
<add name="FriendlyName" type="string" />
<add name="Height" type="int" />
<add name="Weight" type="int" />
</properties>
</profile>
<anonymousIdentification enabled="true" cookieName=".ASPXANONYMOUS" cookieTimeout="100000" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="None" domain="" />
</memberrolesprototype>
</configuration>
Please help me out!
thanks,
Mubashir
mubashir_
Member
5 Points
1 Post
Newbie [Need Help]
Nov 02, 2006 12:21 PM|LINK
Hii,
I have downloaded the Member Management Component, but i am stuck into some problem. I am using ASP.NET 1.1.
Whenever I try to initialize user it says the connectionstring property has not been initialized.
CODE:
Dim p As Microsoft.ScalableHosting.Security.SqlMembershipProvider
p = New Microsoft.ScalableHosting.Security.SqlMembershipProvider
Dim b As Boolean = p.ValidateUser("admin", "dnnadmin") ' error Connectionstring propert has not been initialized
Actually I need to use DNN users with this application. So i just need to validate the users with DNN DB.
Please see my web.config file below for some idea.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="memberrolesprototype">
<section name="membership" type="Microsoft.ScalableHosting.Configuration.MembershipConfigHandler, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"/>
<section name="roleManager" type="Microsoft.ScalableHosting.Configuration.RolesConfigHandler, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"/>
<section name="profile" type="Microsoft.ScalableHosting.Configuration.ProfileConfigHandler, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"/>
<section name="anonymousIdentification" type="Microsoft.ScalableHosting.Configuration.AnonymousIdConfigHandler, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"/>
</sectionGroup>
</configSections>
<appSettings>
<add key="Anthem.BaseUri" value="http://localhost/MerlinRA/Anthem/" />
<add key="Anthem.ResponseEncoding" value="UTF-8" />
<add key="Anthem.ResponseType" value="application/x-anthem" />
<add key="SiteSqlServer" value="server=mubashir;uid=sa;pwd=sa;Network Library=DBMSSOCN;Initial Catalog=DotNetNuke" />
<add key="SiteSqlServer1" value="server=(local);Integrated Security=true;Network Library=DBMSSOCN;Initial Catalog=DotNetNuke" />
<add key="MachineValidationKey" value="58C0ADB88E50DD55154C89C58C9F3C387FAAEF5A" />
<add key="MachineDecryptionKey" value="7EF112428D632738B9D72E04C245FEFF55B6599260275926" />
<add key="MachineValidationMode" value="SHA1" />
</appSettings>
<system.web>
<httpHandlers>
<add verb="POST,GET" path="ajax/*.ashx"
type="Ajax.PageHandlerFactory, Ajax" />
</httpHandlers>
<!-- DYNAMIC DEBUG COMPILATION
Set compilation debug="true" to insert debugging symbols (.pdb information)
into the compiled page. Because this creates a larger file that executes
more slowly, you should set this value to true only when debugging and to
false at all other times. For more information, refer to the documentation about
debugging ASP.NET files.
-->
<!--<compilation defaultLanguage="vb" debug="true" />-->
<compilation>
<assemblies>
<add assembly="MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"/>
</assemblies>
</compilation>
<httpModules>
<add name="ProfilePrototype" type="Microsoft.ScalableHosting.Profile.ProfileModule, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"/>
<add name="AnonymousIdentificationPrototype" type="Microsoft.ScalableHosting.Security.AnonymousIdentificationModule, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"/>
<add name="RoleManagerPrototype" type="Microsoft.ScalableHosting.Security.RoleManagerModule, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562" />
</httpModules>
<!-- CUSTOM ERROR MESSAGES
Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable.
Add <error> tags for each of the errors you want to handle.
"On" Always display custom (friendly) messages.
"Off" Always display detailed ASP.NET error information.
"RemoteOnly" Display custom (friendly) messages only to users not running
on the local Web server. This setting is recommen ed for security purposes, so
that you do not display application detail information to remote clients.
-->
<customErrors mode="RemoteOnly" />
<!-- AUTHENTICATION
This section sets the authentication policies of the application. Possible modes are "Windows",
"Forms", "Passport" and "None"
"None" No authentication is performed.
"Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to
its settings for the application. Anonymous access must be disabled in IIS.
"Forms" You provide a custom form (Web page) for users to enter their credentials, and then
you authenticate them in your application. A user credential token is stored in a cookie.
"Passport" Authentication is performed via a centralized authentication service provided
by Microsoft that offers a single logon and core profile services for member sites.
-->
<authentication mode="Windows" />
<!-- AUTHORIZATION
This section sets the authorization policies of the application. You can allow or deny access
to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous
(unauthenticated) users.
-->
<authorization>
<allow users="*" /> <!-- Allow all users -->
<!-- <allow users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
<deny users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
-->
</authorization>
<!--
<authentication mode="Forms">
<forms name=".ASPXAUTH"
loginUrl="Contents/frmLogin.aspx"
protection="All"
timeout="30"
path="/"
requireSSL="false"
slidingExpiration="true" >
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>-->
<!-- APPLICATION-LEVEL TRACE LOGGING
Application-level tracing enables trace log output for every page within an application.
Set trace enabled="true" to enable application trace logging. If pageOutput="true", the
trace information will be displayed at the bottom of each page. Otherwise, you can view the
application trace log by browsing the "trace.axd" page from your web application
root.
-->
<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
<!-- SESSION STATE SETTINGS
By default ASP.NET uses cookies to identify which requests belong to a particular session.
If cookies are not available, a session can be tracked by adding a session identifier to the URL.
To disable cookies, set sessionState cookieless="true".
-->
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
<!-- GLOBALIZATION
This section sets the globalization settings of the application.
-->
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
<memberrolesprototype>
<membership userIsOnlineWindow="15" >
<providers>
<add
name="AspNetSqlProvider"
type="Microsoft.ScalableHosting.Security.SqlMembershipProvider, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"
maxInvalidPasswordAttempts="5"
passwordAttemptWindow="10"
connectionStringName="SiteSqlServer1"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
requiresUniqueEmail="false"
passwordFormat="Hashed"
applicationName="/"
description="Stores and retrieves membership data from the local microsoft SQL Server database"
/>
</providers>
</membership>
<roleManager
cacheRolesInCookie="false" cookieName=".ASPXROLES" cookieTimeout="30"
cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true"
createPersistentCookie="false" cookieProtection="All" >
<providers>
<add
name="AspNetSqlProvider"
type="Microsoft.ScalableHosting.Security.SqlRoleProvider, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"
connectionStringName="SiteSqlServer1"
applicationName="/"
description="Stores and retrieves roles data from the local Microsoft SQL Server database"
/>
</providers>
</roleManager>
<profile enabled="true" defaultProvider="AspNetSqlProfileProvider">
<providers>
<add
name="AspNetSqlProfileProvider"
type="Microsoft.ScalableHosting.Profile.SqlProfileProvider, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"
connectionStringName="SiteSqlServer1"
applicationName="/"
description="Stores and retrieves profile data from the local Microsoft SQL Server database"
/>
</providers>
<properties>
<add name="FriendlyName" type="string" />
<add name="Height" type="int" />
<add name="Weight" type="int" />
</properties>
</profile>
<anonymousIdentification enabled="true" cookieName=".ASPXANONYMOUS" cookieTimeout="100000" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="None" domain="" />
</memberrolesprototype>
</configuration>
Please help me out!
thanks,
Mubashir