Showing posts with label workstation. Show all posts
Showing posts with label workstation. Show all posts

Wednesday, March 28, 2012

Login failed for user NT AUTHORITY\ANONYMOUS LOGON

Hello everyone,

I am receiving the above error when using a workstation to connect to my webfiles.

I am using windows authentication (whcih I have selected as my only option on the IIS).
Impersonate is set to true in the webconfig file, with authentication set to Windows.

My connection string is: SQLConnection1 = "initial catalog=SIMS;data source=spacesql;integrated security=SSPI"

It runs no problem when I use the localhost.
It allows me to use other aspx pages that do not connect to the SQL server.
It only gives me this error when I am using a page that tries to connect to the SQL server.

The SQL files reside on a separate server to the IIS and I would like it to remain this way.

Can anyone help me wit this please

Thank you,

RebeccaOk, stupid question.

How is an SQL Server on Computer B supposed to authorize users according to a user account on computer A? Without domain, without using a domain account et al.

Answer: it can not.

An this is your problem.|||Hi,
I suggest you look for information on 'Accessing SQL Server using a Mapped Windows Domain Server'. That may have the solution you are looking for. Try msdn.microsoft.com, and look for this and other authentication and authorization info for web based applications.
Good luck with your project.|||Both computers are on a domain using a domain account et al.
I am not that stupid.

Friday, February 24, 2012

Logging to Event Viewer "fails" but SQL Server logging works OK - why?

Greetings,

I am developing a package on my local workstation. I have defined two logging service providers. One is for SQL Server and the other is for the Windows Event Log. I am using the Dts.Log method in a script task to write log entries.

Logging is working properly with the SQL Server provider and rows are being inserted into the sysdtslog90 table. However, the only events that are being logged in the Windows Event Log are the package start and end events which I believe SSIS is doing automatically anyway.

Is there something I need to do to enable WIndows Event Log logging other than defining a log provider and making sure it is checked active? Won't SSIS write to two different logs with one Dts.Log call? Any ideas on what might be going wrong with my approach?

Thanks,

BCB

The answer is no - SSIS won't write to the Windows event log with one Dts.Log call. Writing to the event log takes a little more doing. The following code shows a method I used to do logging to the Windows event log. "rowsInserted" is a parameter that is specific to our business requirements. It can be omitted for most uses.

Public Sub WriteEventLogEntry(ByVal logMessage As String, ByVal entryType As EventLogEntryType, ByVal rowsInserted As Integer)

Try

Dim source As String

Dim log As String

Dim machine As String

' get system variables recorded in event log

Dim vars As Variables

Dts.VariableDispenser.LockOneForRead("System:Stick out tongueackageName", vars)

source = vars("PackageName").Value.ToString()

Dts.VariableDispenser.LockOneForRead("System::MachineName", vars)

machine = vars("MachineName").Value.ToString()

' log in Application group

log = "Application"

If Not EventLog.SourceExists(source, machine) Then

EventLog.CreateEventSource(source, log, machine)

End If

Dim eLog As New EventLog(log, machine, source)

If (rowsInserted >= 0) Then

eLog.WriteEntry(logMessage, entryType, rowsInserted)

Else

eLog.WriteEntry(logMessage, entryType) ' log does not allow negative numbers

End If

Catch ex As Exception

' do nothing - let processing continue

End Try

End Sub