Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Login failed for user 'SKYNET\IUSR_SKYNET'.

Posted on 2006-11-17
10
Medium Priority
?
211 Views
Last Modified: 2010-04-23
Hi experts,

I got the above error while running this code--
 Private Shared Function Connection() As SqlConnection
        Dim conHalloween As New SqlConnection
        Dim sConnectionString As String _
         = "Data Source= SKYNET;" _
        & "Initial Catalog=Halloween;" _
            & "Integrated Security=SSPI"
        conHalloween.ConnectionString = sConnectionString
        Return conHalloween
    End Function


I have changed the security setting in my sql server to read both windows and sql authentications


how do i solve the above error pls.

thanks guys
0
Comment
Question by:SirReadAlot
[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
  • 3
  • 2
  • +1
10 Comments
 
LVL 10

Expert Comment

by:Kinger247
ID: 17967635
Try :


    Private Shared Function Connection() As SqlConnection
        Dim conHalloween As New SqlConnection
        Dim sConnectionString As String = & _
            "Data Source= SKYNET;" & _
            "Initial Catalog=Halloween;" & _
            "Integrated Security=SSPI"
        conHalloween.ConnectionString = sConnectionString
        Return conHalloween
    End Function
0
 
LVL 10

Expert Comment

by:Kinger247
ID: 17967645
is that your problem ???
your question seems to be different yet the code won't work anyway ..
0
 

Author Comment

by:SirReadAlot
ID: 17967692
i will try it
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 29

Expert Comment

by:Nightman
ID: 17967699
Have you granted the IUSR_SKYNET local user access to the database? You are using integrated security, so it will connect in the context of the user. Either grant access to the local user account, connect with a SQL login account or use windows authentication and impersonation to connect to the SQL Server.
0
 

Author Comment

by:SirReadAlot
ID: 17967705
conHalloween.ConnectionString = sConnectionString

saying sConnectionString is not declared
0
 
LVL 35

Expert Comment

by:YZlat
ID: 17967711
0
 

Author Comment

by:SirReadAlot
ID: 17967734
how do i grant the access
0
 

Author Comment

by:SirReadAlot
ID: 17967752
okay, it works i granted the user


thanks
0
 
LVL 29

Accepted Solution

by:
Nightman earned 2000 total points
ID: 17967755
Open Enterprise Manager on the SQL Server, go to security-->logins right click - new login.
Type in the name SKYNET\IUSR_SKYNET, select Windows Authentication and select the server name from the domain dropdown list. Under the database access tab, select the database to which this user has access.
0
 
LVL 29

Expert Comment

by:Nightman
ID: 17967773
OK, you're ahead of me ;)

Note that best practice for security is to use windows authentication with impersonation, either connecting as the user that is connecting to the site or impersonating a specific domain account (you would set this up in the web.config) .

Next best would be to use a specific SQL login and use that in your connection string.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

730 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