Solved

SQL Server rookie...  How does .NET and SQL Server interact

Posted on 2010-08-19
2
444 Views
Last Modified: 2012-05-10
I've got a .NET app and have just attempted to set up the .NET Membership tables on my SQL Server.  I ran aspnet_regsql.exe on my server and it went fine.  But when I try to access it via my web app I keep getting SQL Server permissions issues, like:

The EXECUTE permission was denied on the object 'aspnet_CheckSchemaVersion', database 'SmashHaus', schema 'dbo'.

Everything online says to run this:
sp_addrolemember 'aspnet_Membership_FullAccess', 'Network Service'
or
sp_addrolemember 'aspnet_Membership_FullAccess', 'dbo'

I can't!  There is no Network Service user for my DB.  And when I try it with dbo, it won't allow it. So I ran the sp with the my Default app pool.  That worked for some of the errors I was getting.  Now I'm stuck.

My big question is, what user is .NET hitting these stored procs with?  dbo?  Network Service? My app pool name?  Sys?  

Oh and I'm running Windows Server 2008 R2


0
Comment
Question by:JT_SIRO
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:JT_SIRO
ID: 33477989
Here's some more info on the problem I'm having.  It's getting worse as I try to remedy the issues.

When I try to grant permissions with this:
sp_addrolemember 'aspnet_Membership_FullAccess', 'Network Service'

I get this error message:
Msg 15014, Level 16, State 1, Procedure sp_addrolemember, Line 36
The role 'aspnet_Membership_FullAccess' does not exist in the current database.

OK, so I decided that I'll remove and re-install aspnet_sqlreg.exe to get it back.  When I run the installer, I get this error, saying that it can't install because aspnet_Membership_FullAccess already exists.   WTH?!?!?!?!


sshot.JPG
0
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 33478835
Which account you need will depend on which account is accessing the site. It should be the ASPNET account (if you are allowing anonymous users and using Forms authentication and you have Integrated Security in your connection string), otherwise it will be the Windows user account who is accessing the site.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question