Solved

ASP.Net application unable to access database

Posted on 2008-10-02
3
220 Views
Last Modified: 2013-12-17
Greetings all

I recently moved (copied) a database to a new machine. The application, developed in VWD 2005 Express, as a file-based system, using the internal web server, was recreated as a website application in VS2005. Coe was copied in from the old.

When i run my app, I get the following Cannot open database "Scribbles" requested by the login. The login failed. Login failed for user 'ICBLUENOTEBOOK\ASPNET'.

My original application was called Scribbles and the new one is SCribbles02, stored in C:\Inetpub\wwwroot\Scribbles02.

What do I need to do?


In advance, thanks!!!

   allanmark

Web. Config:
 

  <connectionStrings>

    <clear/>
 

    <!--<add name="BranchDB" connectionString="Data Source=localhost;    <add name="Scribble" connectionString="Data Source=localhost;Initial Catalog=Scribbles;Trusted_Connection=Yes;" providerName="System.Data.SqlClient"/>
 

    <add name="LocalSqlServer" connectionString="Data Source=localhost;Initial Catalog=Scribbles;Trusted_Connection=Yes;" providerName="System.Data.SqlClient"/>
 
 

  </connectionStrings>

Open in new window

0
Comment
Question by:allanmark
3 Comments
 
LVL 7

Accepted Solution

by:
orcic earned 150 total points
ID: 22622988
check permissions for 'ICBLUENOTEBOOK\ASPNET' on Scribbles database
0
 
LVL 8

Assisted Solution

by:jtdebeer
jtdebeer earned 150 total points
ID: 22623020
I would move away from the trusted security for the database except when the dbase server is sitting on the same machine or same domain as the application server.

In your case looking at the user 'ICBLUENOTEBOOK\ASPNET' it does not seem like you are working on a domain.

Create a user in your database then change the web.config to submit the credentials using
Driver={SQL Server}; Server=server_name_or_address; Database=database_name; UID=username; PWD=password;

Also ensure via IIS that the user ASP.Net is granted access.
0
 

Author Closing Comment

by:allanmark
ID: 31512996
Manuy thanks!! My deepest apologies - I completely forgot about closign this one!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now