Reply to topic
Problems getting CreateUser control with ASP.NET membership
gblover


Joined: 22 Aug 2006
Posts: 1
Reply with quote
Hi,

Today I contacted HMS and they set up Membership, Roles, Personalization for my SQL Server 2005 database. I use shared hosting.

I am trying to use ASP.NET built-in CreateUser and Login controls but when I enter the information in my CreateUser form and click Submit, it displays an error message.


Code:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:


[SqlException (0x80131904): EXECUTE permission denied on object 'aspnet_CheckSchemaVersion', database 'thereaso', schema 'dbo'.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857578
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735190
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +149
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +886
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
   System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +415
   System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135
   System.Web.Util.SecUtility.CheckSchemaVersion(ProviderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck) +367
   System.Web.Security.SqlMembershipProvider.CheckSchemaVersion(SqlConnection connection) +85
   System.Web.Security.SqlMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +3612
   System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() +305
   System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) +105
   System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +453
   System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) +149
   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



I have no idea what this means.

This is my web.config file. I am simply trying to test that CreateUser successfully inserts user into the database so I have not written any of my own code anywhere yet.

Code:

<?xml version="1.0"?>
<configuration>
    <appSettings/>
  <connectionStrings>
    <add name="MyConnection" connectionString="Data Source=blaster.aenier.com; Initial Catalog=thedb; User ID=theuserid; Password=thepassword" providerName="System.Data.SQLClient" />
  </connectionStrings>
    <system.web>
        <compilation debug="false" />
        <customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        <authentication mode="Forms" />
      <roleManager enabled="true" defaultProvider="CustomizedRoleProvider">
        <providers>
          <add name="CustomizedRoleProvider" type="System.Web.Security.SQLRoleProvider" connectionStringName="MyConnection" />
        </providers>
      </roleManager>
 
      <membership defaultProvider="CustomizedRoleProvider">
        <providers>
          <add name="CustomizedRoleProvider" type="System.Web.Security.SQLMembershipProvider" connectionStringName="MyConnection" />
        </providers>
      </membership>
 
    </system.web>
</configuration>


Do you see any errors?

Please help. This is a very simple task... yet I can't seem to get it to work.
jraybould


Joined: 29 Apr 2006
Posts: 46
Reply with quote
You need to contact HostMySite (support@hostmysite.com) and tell them you need full dbo rights on your database.
Problems getting CreateUser control with ASP.NET membership
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic