Solved

assistance rquired

Posted on 2008-10-21
8
465 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

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 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.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 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

18 Experts available now in Live!

Get 1:1 Help Now