Solved

ASP.Net application unable to access database

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

896 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