Link to home
Start Free TrialLog in
Avatar of sbasha
sbasha

asked on

login failed for user NT authority\network service

Hi

I am using windows 2003 server to deploy asp.net pages , and iam using sql  database 2000 service pack 3a , and i can able to browse the page and when i tried to connect it shows the above error, i have use forms authentication in web.config file,  in my xp laptop it works fine,

even i cannot fine aspnet user in windows 2003 server to give permission

login failed for user NT authority\network service

how to handle this error
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Hi sbasha,

I wrote this small method 2 weeks ago:

    Public Shared Function IsFilePDF(ByVal pFile As String) As Boolean
        Try
            Dim objReader As New System.IO.StreamReader(pFile)
            With objReader
                Dim strX As String = .ReadLine()
                .Close()
                Return (strX.ToUpper.StartsWith("%PDF-"))
            End With
            objReader = Nothing
        Catch ex As Exception
            Return False
        End Try
    End Function

Cheers!
sbasha,

Wrong question, sorry
Avatar of sbasha
sbasha

ASKER

where to write this code ? please tell me in details
It is not related. I was on the incorrect question when I paste this code. Sorry again.
ASKER CERTIFIED SOLUTION
Avatar of Ralf Klatt
Ralf Klatt
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Your error comes from wrong authentication agasinst SQL database,
Try either:

Running ASP.NET application in context of specified user (it can be any user you can create a new one) and grant that user access to the database (database has to use NT Authenticaion mode or mixed authentication mode).
To set up application to run as specified user:
RightClick MY computer -> Manage
Go to Services and Application -> InternetInformationServices -> WebSites -> DefaultWebSite
Choose you application properties (right click->properties)(either default website if it is installed under root or application folder if it is under specified folder).
Go to DirectorySecutiry tab click Edit.
And fill in the box "Use the following windows user for anonymous access" with user name and correct password.
Make sure this user has access to database.
And done.

OR

you can use conncetion string not to use integrated authentication. You'll have to provide user and password in the connection string then. Here is a handy reference for connection strings: http://www.connectionstrings.com/



Hi,

As I was asked for any objections, I'd like to give my point of view -> I never mind about point splits ... :) ... but this question was about a missing ASPNET user account ... http:#16142488 suggested a way of handling the issue on basis of an already existing ASPNET account -> the only way to achive the in http:#16142488 suggested solution is to leverage http:#16141208 first ... using http:#16141208 is the only way to solve sbasha's question!

Therefore I'd recommend:
Accept: Raisor {http:#16141208}


Best regards,
Raisor