Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5 > ASP.NET 4.5 General Discussion
|
ASP.NET 4.5 General Discussion For ASP.NET 4.5 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4.5 General Discussion 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 February 22nd, 2013, 03:58 PM
Registered User
 
Join Date: Feb 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP website denied pwermission to SQL database

Hi,
I have just installed Visual studio ultimate 2012. I am now trying to create a website with members login for it.
I chose ASP.NET web forms website and it created no problems. I then set up a SQL server database and changed the connection string in Web.config

My connection string now looks like

<connectionStrings>
<add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=gamesupload.db.7560507.hostedresource.com; Initial Catalog=gamesupload; User ID=gamesupload; Password='MyPasswordHere';" />
</connectionStrings>

The problem I am having is people click on Register, enter there details, Then an error page comes up like this.
"CREATE DATABASE permission denied in database 'master'."

I know I have entered the database password correctly.

I have not changed any other files what so ever I have left them as they were when the site was created by visual studio.
Can anyone shed any light on this for me I have tried deleting the database and recreating it several times.
The stack trace is

Stack Trace:


[SqlException (0x80131904): CREATE DATABASE permission denied in database 'master'.]
System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception, Boolean breakConnection) +2072894
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) +5061932
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning() +234
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275
System.Data.SqlClient.SqlCommand.RunExecuteNonQuer yTds(String methodName, Boolean async) +228
System.Data.SqlClient.SqlCommand.InternalExecuteNo nQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +326
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137
System.Data.SqlClient.<>c__DisplayClassa.<DbCreate Database>b__7(SqlConnection conn) +38
System.Data.SqlClient.SqlProviderServices.UsingCon nection(SqlConnection sqlConnection, Action`1 act) +98
System.Data.SqlClient.SqlProviderServices.UsingMas terConnection(SqlConnection sqlConnection, Action`1 act) +349
System.Data.SqlClient.SqlProviderServices.DbCreate Database(DbConnection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection) +315
System.Data.Objects.ObjectContext.CreateDatabase() +84
System.Web.Providers.Entities.DatabaseCreationHelp er.CreateDatabase(ObjectContext context) +70
System.Web.Providers.ModelHelper.CreateMembershipE ntities(ConnectionStringSettings setting) +176
System.Web.Providers.DefaultMembershipProvider.Mem bership_CreateUser(String applicationName, String userName, String password, String salt, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, DateTime& createDate, Boolean uniqueEmail, Int32 passwordFormat, Object& providerUserKey) +56
System.Web.Providers.DefaultMembershipProvider.Cre ateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +833
System.Web.UI.WebControls.CreateUserWizard.Attempt CreateUser() +302
System.Web.UI.WebControls.CreateUserWizard.OnNextB uttonClick(WizardNavigationEventArgs e) +111
System.Web.UI.WebControls.Wizard.OnBubbleEvent(Obj ect source, EventArgs e) +413
System.Web.UI.WebControls.CreateUserWizard.OnBubbl eEvent(Object source, EventArgs e) +121
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.Button.OnCommand(Command EventArgs e) +125
System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +167
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

Regards Nige.
 
Old February 25th, 2013, 06:02 AM
Registered User
 
Join Date: Feb 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default solved

Just thought I would say I fixed this issue. When I created my database I failed to allow direct access. All I needed to do was delete my old database and recreate it. This time making sure I created it with .direct access. This solved the problem.
Thanks





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP to create SQL Database EricJ Classic ASP Databases 2 September 2nd, 2005 01:15 AM
Connecting to sql database w/ asp Calibus SQL Server ASP 7 July 8th, 2004 08:37 AM
ASP 3.0 - Problems Inserting into Database w/ SQL Sunday Ironfoot ASP.NET 1.0 and 1.1 Basics 1 May 5th, 2004 02:41 PM
How to import xml into SQL database thru ASP porsrari Classic ASP XML 4 October 14th, 2003 11:46 AM
ASP & SQL Database ccolv Classic ASP Basics 2 July 22nd, 2003 03:27 AM





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