Membership Configuration Issues

J

Josh Collins

Here is my configuration:
ASP.Net 2 running on IIS6/Win2k3
Developing on WindowsXP-Pro iwth Visual Studio 2005.

I am trying to utilize the Membership functionality in an ASP.net
website.

I am having the following issues:
1) In VS.Net 2005 there is no ASP.Net Configuration option under the
Website menu.
2) If I choose 'Administer Website' from the context menu of the Login
control, I get the error: "Exception has been thrown by the target of
an invocation."

I have already created the necessary database tables on my SQL Server
2005 instance using the aspnet_regsql wizard. The web.config has been
updated to use forms auth and the membership aggregate has been created
to use the correct connectionString.

Does anyone have any suggestions to get WAT and the membership features
running?

Thanks in advance.
 
C

clintonG

Did you implement the roleManager?

I can also make note that the web.config settings are very delicate and some
not documented all that well. The membership provider
applicationName="YourAppName" setting for example can cause conflicts and as
I want to recall can do so without raising an observable exception. I think
it has to match what the roleManager provider declares also. In fact,
neither may even be required unless your application accesses another
application on a different server. Complexity such as that needs to be
looked at which may be causing your problems.

I think it would have been helpful if Microsoft put out a bare bones
Membership starter kit with a base implemenation of the web.config. You
might also consider installing the DotNetNuke starter kit which does support
Membership just to determine if the WAT will function for you.

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
 
J

Josh Collins

Clinton,

I have enabled the roleProvider. Below is my web.config:
<?xml version="1.0"?>
<configuration
xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings/>
<connectionStrings>
<remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString="Data
Source=catpoop;Initial Catalog=ej;Integrated Security=True;"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="true" defaultLanguage="c#" urlLinePragmas="true"
/>
<authentication mode="Forms">
<forms name="Ej" timeout="20" loginUrl="Login.aspx" />
</authentication>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
<membership defaultProvider="MySqlMembershipProvider">
<providers>
<clear />
<add connectionStringName="LocalSqlServer"
applicationName="CreativeEj"
name="MySqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</membership>
<roleManager enabled="true"
defaultProvider="CustomizedRoleProvider">
<providers>
<add name="CustomizedRoleProvider"
type="System.Web.Security.SqlRoleProvider"
connectionStringName="LocalSqlServer" />
</providers>
</roleManager>
</system.web>
</configuration>

I have set up the membership tables in a database named ej on a SQL
Server 2005 DB Instance.

Does anything look off here?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top