Solved

assistance rquired

Posted on 2008-10-21
8
467 Views
Last Modified: 2013-11-26
I have visual Studio 2008, I installed sql 2005 and sqlexpress2008.

the asp. net Configuration / Security thows this error:

Cannot open database "aspnetdb" requested by the login. The login failed. Login failed for user 'machinename\Username'.
need to configure it to work.
0
Comment
Question by:RahnLev
[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
  • 4
  • 2
  • 2
8 Comments
 
LVL 78

Expert Comment

by:arnold
ID: 22773150
Check the application event log.  Check to which SQL instance you are actually connecting.  i.e. you might be connecting to sql2005 while expecting that the connection would go to the sql2008 instance.  Double check the configuration and the port on which each listens.


0
 
LVL 16

Expert Comment

by:Gyanendra Singh
ID: 22773259
check your connection string ...
refer this link for details
http://www.connectionstrings.com/
0
 

Author Comment

by:RahnLev
ID: 22775005
When I build my website an error registers, this is the description:

The description for Event ID ( 0 ) in Source ( devenv ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: The data source '{130bada6-e128-423c-9d07-02e4734d45d4}' specifies no supporting providers or a set that are not registered..
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

Author Comment

by:RahnLev
ID: 22775019
I configured the connection string in my machine.config to:

<connectionStrings>
            <add name="LocalSqlServer"
         connectionString="      data source=[machinename]\SQLEXPRESS2008;
                                          Integrated Security=SSPI;
                                          Database=aspnetdb;
                                          User Instance=true"      
        
                                          providerName="System.Data.SqlClient"/>
      </connectionStrings>
0
 
LVL 16

Expert Comment

by:Gyanendra Singh
ID: 22775463
hmm so you are using window auth. right .... you need to add your user name and also grant access for that ...

else use sql auth...
0
 
LVL 78

Expert Comment

by:arnold
ID: 22776657
It is highly ill advised to add IUSR_[machinename], IWAM_[machinename]  to the aspnetdb DB since (IUSR and IWAM)_[machinename] are the credential used by IIS to run.

You should use SQL auth as others have suggested.
0
 

Author Comment

by:RahnLev
ID: 22782005
The problem is I cant get in to the asp. net Configuration from visual studio itself.
0
 

Accepted Solution

by:
RahnLev earned 0 total points
ID: 22790606
OK, People...I solved this one very easily on my own, and by reading the forum topics, this is going to help quite a few of you.

 1.  Open Sql Server Configuration Manager and ensure that TCP/IP and Naming Pipe protocols are "enabled"

2.  run the aspnet_regsql.exe utility and it will create the database. !!WARNING!! If this doesn't work it is because you haven't started your SQL Server service or you are using the wrong login type.

3.  Edit the maching.config file (located C:\Windows\Microsoft.Net\Framework\V2.050727) like this:

<connectionStrings>
<add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DIRECTORY|\App_Data\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>

</connectionStrings>

PUT IN A LEGIT PATH WHERE IT SAYS |DIRECTORY| Example C:\Documents and Settings\Owner\My Documents\Visual Studio 2008\WebSites\LN9

NOTE:App_Data\aspnetdb.mdf is where the utility created your database.

 

0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

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

Suggested Solutions

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

726 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