Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Security (http://www.velocityreviews.com/forums/f62-asp-net-security.html)
-   -   Setting up ASP.NET Configuration in Visual Studio 2005 (http://www.velocityreviews.com/forums/t769556-setting-up-asp-net-configuration-in-visual-studio-2005-a.html)

Jibey Jacob 07-09-2007 01:34 AM

Setting up ASP.NET Configuration in Visual Studio 2005
 
Hi:

I'm having trouble setting this up. I placed the following information in
web.config:

<membership userIsOnlineTimeWindow="20">
<providers>
<add connectionStringName="SqlServices"
enablePasswordRetrieval="false"
enablePasswordReset="true" requiresQuestionAndAnswer="true"
passwordFormat="Hashed" applicationName="jibey.jacob"
name="SqlProvider"
type="System.Web.Security.SqlMembershipProvider" />
</providers>
</membership>

When I launch the ASP.NET Configuration wizard from Visual Studio, and flip
to the Security tab, I can see one provider listed (I selected single
provider for all site management), which is AspNetSqlProvider. The
connnection string "SqlServices" exists in web.config. The problem is the
wizard always comes back with an error that says "unable to establish a
connection to the database".

Before I placed all this information in web.config, I had started with a
bare-bones web.config that VS2005 had created. And I created the membership
database in SQL Server using aspnet_regsql.

What am I doing wrong?

Thanks.


Jibey Jacob 07-09-2007 03:08 AM

RE: Setting up ASP.NET Configuration in Visual Studio 2005
 
There's just this one other thing that bothers me about this: how does the
ASP.NET Configuration Wizard know which host and sql server instance name to
look for?

Thanks.

"Jibey Jacob" wrote:

> Hi:
>
> I'm having trouble setting this up. I placed the following information in
> web.config:
>
> <membership userIsOnlineTimeWindow="20">
> <providers>
> <add connectionStringName="SqlServices"
> enablePasswordRetrieval="false"
> enablePasswordReset="true" requiresQuestionAndAnswer="true"
> passwordFormat="Hashed" applicationName="jibey.jacob"
> name="SqlProvider"
> type="System.Web.Security.SqlMembershipProvider" />
> </providers>
> </membership>
>
> When I launch the ASP.NET Configuration wizard from Visual Studio, and flip
> to the Security tab, I can see one provider listed (I selected single
> provider for all site management), which is AspNetSqlProvider. The
> connnection string "SqlServices" exists in web.config. The problem is the
> wizard always comes back with an error that says "unable to establish a
> connection to the database".
>
> Before I placed all this information in web.config, I had started with a
> bare-bones web.config that VS2005 had created. And I created the membership
> database in SQL Server using aspnet_regsql.
>
> What am I doing wrong?
>
> Thanks.
>


Alexey Smirnov 07-09-2007 08:07 PM

Re: Setting up ASP.NET Configuration in Visual Studio 2005
 
On Jul 9, 5:08 am, Jibey Jacob <JibeyJa...@discussions.microsoft.com>
wrote:
> There's just this one other thing that bothers me about this: how does the
> ASP.NET Configuration Wizard know which host and sql server instance name to
> look for?
>
> Thanks.
>
>
>
> "Jibey Jacob" wrote:
> > Hi:

>
> > I'm having trouble setting this up. I placed the following information in
> > web.config:

>
> > <membership userIsOnlineTimeWindow="20">
> > <providers>
> > <add connectionStringName="SqlServices"
> > enablePasswordRetrieval="false"
> > enablePasswordReset="true" requiresQuestionAndAnswer="true"
> > passwordFormat="Hashed" applicationName="jibey.jacob"
> > name="SqlProvider"
> > type="System.Web.Security.SqlMembershipProvider" />
> > </providers>
> > </membership>

>
> > When I launch the ASP.NET Configuration wizard from Visual Studio, and flip
> > to the Security tab, I can see one provider listed (I selected single
> > provider for all site management), which is AspNetSqlProvider. The
> > connnection string "SqlServices" exists in web.config. The problem is the
> > wizard always comes back with an error that says "unable to establish a
> > connection to the database".

>
> > Before I placed all this information in web.config, I had started with a
> > bare-bones web.config that VS2005 had created. And I created the membership
> > database in SQL Server using aspnet_regsql.

>
> > What am I doing wrong?

>
> > Thanks.- Hide quoted text -

>
> - Show quoted text -


Jubey,

I think your problem is in the defaultProvider property which is not
specified.

Quote: When specifying the membership Element (ASP.NET Settings
Schema) section, you must specify the defaultProvider attribute. If
you do not specify a membership Element (ASP.NET Settings Schema)
section in your Web.config, the values from the machine configuration
are used and the SqlMembershipProvider instance named
AspNetSqlProvider is established as the defaultProvider.

http://msdn2.microsoft.com/en-us/lib...providers.aspx

Hope this helps


Jibey Jacob 07-09-2007 09:12 PM

Re: Setting up ASP.NET Configuration in Visual Studio 2005
 
Yes, it helped. I also had to create separate providers for roles and
memberships and I had to remove the default AspNetSqlProvider as a membership
provider.

Thanks,

Jibey

"Alexey Smirnov" wrote:

> On Jul 9, 5:08 am, Jibey Jacob <JibeyJa...@discussions.microsoft.com>
> wrote:
> > There's just this one other thing that bothers me about this: how does the
> > ASP.NET Configuration Wizard know which host and sql server instance name to
> > look for?
> >
> > Thanks.
> >
> >
> >
> > "Jibey Jacob" wrote:
> > > Hi:

> >
> > > I'm having trouble setting this up. I placed the following information in
> > > web.config:

> >
> > > <membership userIsOnlineTimeWindow="20">
> > > <providers>
> > > <add connectionStringName="SqlServices"
> > > enablePasswordRetrieval="false"
> > > enablePasswordReset="true" requiresQuestionAndAnswer="true"
> > > passwordFormat="Hashed" applicationName="jibey.jacob"
> > > name="SqlProvider"
> > > type="System.Web.Security.SqlMembershipProvider" />
> > > </providers>
> > > </membership>

> >
> > > When I launch the ASP.NET Configuration wizard from Visual Studio, and flip
> > > to the Security tab, I can see one provider listed (I selected single
> > > provider for all site management), which is AspNetSqlProvider. The
> > > connnection string "SqlServices" exists in web.config. The problem is the
> > > wizard always comes back with an error that says "unable to establish a
> > > connection to the database".

> >
> > > Before I placed all this information in web.config, I had started with a
> > > bare-bones web.config that VS2005 had created. And I created the membership
> > > database in SQL Server using aspnet_regsql.

> >
> > > What am I doing wrong?

> >
> > > Thanks.- Hide quoted text -

> >
> > - Show quoted text -

>
> Jubey,
>
> I think your problem is in the defaultProvider property which is not
> specified.
>
> Quote: When specifying the membership Element (ASP.NET Settings
> Schema) section, you must specify the defaultProvider attribute. If
> you do not specify a membership Element (ASP.NET Settings Schema)
> section in your Web.config, the values from the machine configuration
> are used and the SqlMembershipProvider instance named
> AspNetSqlProvider is established as the defaultProvider.
>
> http://msdn2.microsoft.com/en-us/lib...providers.aspx
>
> Hope this helps
>
>



All times are GMT. The time now is 11:06 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.