Solved

assistance rquired

Posted on 2008-10-21
8
468 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
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!

 

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

690 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