Question

I'm reading a WCF Documentation about How to Develop a WCF Data Service Running on IIS, it creates an ASP NET Application and uses it to host a WCF Data Service.

I need to make sure that SQL Server Express will grant permission to the ASP Net app to access a database and expose a service to the net.

The documentation instructs to create a login in sql server to NT AUTHORITY\NETWORK SERVICE, and I get an error in sql saying that the user NT AUTH... was not found.

How can I create it in SQL Server 2012 Express (the one that comes with VS2012).

Isn't it a little different in Windows 7?, I read that the NT AUTHORITY is used in XP.

I'm using VS@012, SQL Server Express 2012, Windows 7 Ultimate x64.

Rafael

Was it helpful?

Solution

Your asp.net application is running with the credentials being used by the application pool that owns the process. If the application pool is running using the "Built-In Service Account", then the user will be local to that computer (when you add the account, select Location, select your computer, then enter IIS APPPOOL\<Application pool name> (where "" is the name of your application pool).

If you open Sql Server Management Studio [Express] you can find your database, drill into "Security", right click on "Users", select a User type of "Windows User" then select the user indicated above.

Note: The Network Service account exists in Windows 7 and 8. It is a local machine account.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top