Solved

assistance rquired

Posted on 2008-10-21
8
466 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
  • 4
  • 2
  • 2
8 Comments
 
LVL 77

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
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.

 

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 77

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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

789 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