Solved

Login failed for user 'SKYNET\IUSR_SKYNET'.

Posted on 2006-11-17
10
210 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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

Independent Software Vendors: 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

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
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…

630 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