Solved

ASP.Net application unable to access database

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

628 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