Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 563379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:39:14+00:00 2026-05-13T12:39:14+00:00

I am using VS2010 Beta 2 to create an IIS hosted WCF service. I

  • 0

I am using VS2010 Beta 2 to create an IIS hosted WCF service. I added a SQL Server database file to use as a simple data store and then generated some Linq to SQL classes to interact with it.

The problem I have happens when Linq to SQL tries to connect to the database. I get the following error below:

CREATE DATABASE permission denied in database ‘master’.
An attempt to attach an auto-named database for file c:\Source\SampleApp\App_Data\GameData.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

To get around a previous problem I have already changed the web.config to not use an user instance:

<add name="GameDataConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\GameData.mdf;Integrated Security=True;User Instance=False"
  providerName="System.Data.SqlClient" />

My first reaction is that the application pool’s user account (NETWORK SERVICE) is unable to open the file so I have granted full control to the database file and log file but this did not help.

Interestingly if I change the application pool to run under local system everything works correctly. Is there something else I have to grant NETWORK SERVICE access to?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:39:15+00:00Added an answer on May 13, 2026 at 12:39 pm

    Yopu must use Sql Management Studio Express and add the Network Service Account as a login. Then assign it DBO permissions on the specified Database or simply give it the sysadmin role. Note when you install SQL Server 2005 any edition you have the initial option to set the login account for the services. If you specifiy Network Service. by default the network service account will be granted sysadmin role.

    Hope this helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using VS2010 and SQL express 2005, Ive created a database, created a simple table,
I'm using VS2010 and created a simple asp. web forms application, using Development Server
I have created a DeclarativeServiceLibrary using VS2010 beta 2, Please check this image of
I'm using VS2010 Beta 2, I have a Complex Type called Address with the
I have this code written in .NET 4.0 using VS2010 Ultimate Beta 2: smtpClient.Send(mailMsg);
I'm using VS2010. The projects that I'm working on use different source control providers,
I am using VS2010 C#.NET 3.5 and application settings (the Settings.settings file). What I
I'm using VS2010 Ultimate. Having code: //file IntSet.h #include stdafx.h #pragma once /*Class representing
I'm using VS2010 (C#) for a WinForm database program. I've created a dataset, myds,
When I create a new project of any kind (winforms app/classlib ..) using VS2010

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.