Solved

ASP.Net application unable to access database

Posted on 2008-10-02
3
222 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

770 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