Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 26th, 2007, 05:24 PM
Registered User
Join Date: Mar 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL Role Provider not instantiating

Just published a web site to a host provider with SQL Server 2005. SqlRoleProvider.CreateRole procedure give me the following error:
"Object reference not set to an instance of an object."

Here's my code to support this procedure:
"Partial Class RoleAdd
    Inherits System.Web.UI.Page
    Dim strRoleName As String
    Dim RP As New SqlRoleProvider

    Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        strRoleName = TextBox1.Text
    End Sub
End Class"

Note my below is a snippet of my web.config file
"<roleManager enabled="true" defaultProvider="SqlRoleManager" >
        <add name="SqlRoleManager"
             applicationName="rumisg3" />

Supposedly the Aspnet_resql.exe was run (appears it was I I can see the tables in VS server explorer).

Any help here would be appreciated.


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET SQL Membership Provider bignermo ASP.NET 2.0 Professional 2 March 20th, 2007 05:41 AM
How can I retreive user role from sql server 2005? MAKO C# 0 July 7th, 2006 08:13 AM
MS OLE DB Provider For "Sql Server"/"ODBC Drivers" ZArrinPour SQL Server 2000 1 April 20th, 2006 09:30 AM
role of sql server in Biz talk lawrence Biztalk 0 April 15th, 2005 11:11 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.