login fail

  • 2 March 2007
  • 7 replies
  • 10 views

Badge +3
This is my workspace web.config.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation defaultLanguage="vb" debug="false" />
<customErrors defaultRedirect="Error_Page.htm" mode="Off" />
<authentication mode="Windows" />
<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user id=sa;password="
cookieless="false"
timeout="99999" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
<identity impersonate="true" />
</system.web>
<appSettings>
<add key="ServerName" value="BWSTESTE" />
<add key="WebServer" value="http://BWSTESTE/K2V3" />
<add key="ViewXML" value="False" />
<add key="UserManager" value="ADUM" />
</appSettings>
</configuration>

I can't see any mistake here...

Even so I still get that message error...

I've seen the KB kerberos help file... Still it didn't help me...

Ricardo

7 replies

Badge +3
Hi.
I'm getting this error...

I've tried to change the app pool Id, but it didn't help...

What can I do?

Thanks

Server Error in '/K2V3/Workspace' Application.
--------------------------------------------------------------------------------

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITYANONYMOUS LOGON'.
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at WorkSpaceService.FilterService.NewUserTemplate(String UserName)
--- End of inner exception stack trace ---
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITYANONYMOUS LOGON'.
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at WorkSpaceService.FilterService.NewUserTemplate(String UserName)
--- End of inner exception stack trace ---

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITYANONYMOUS LOGON'.
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at WorkSpaceService.FilterService.NewUserTemplate(String UserName)
--- End of inner exception stack trace ---]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +533462
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204
Workspace.Net.ReportService.FilterService.NewUserTemplate(String UserName) +49
Workspace.Net.WorkSpace1.CreateSession() +1192
Workspace.Net.WorkSpace1.Page_Load(Object sender, EventArgs e) +427
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
Badge +10
Hi,

It seems that you need to configure Kerberos in your environment.

Have a look at KB article 123 to guide you on configuring Kerberos:
http://kb.k2workflow.com/Articles/KB000123.aspx

Regards,

JohanL
Badge +8
Make sure that you have <authentication mode="Windows" /> and <identity impersonate="true" /> in the web.config file for the workspace service. And also ensure that the account that is running the application pool for the workspace service has permission to access the K2Log database in SQL.

HTH

-Eric
Badge +4
That is your "workspace" webconfig - which has the <authentication mode="Windows" /> key BUT the <identity impersonate="false" /> that
Eric mentions is in the "workspaceSERVICE" webconfig

which will look like so...
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<compilation defaultLanguage="vb" debug="false" />
<customErrors mode="RemoteOnly" />

>>>>>>>>>>>>>>>>>>>>>
HERE IS THE IMPERSONATE KEY: this is set to false ONLY if you are using SQL auth instead of Integrated Security=SSPI (see below)
>>>>>>>>>>>>>>>>>>>>>>
<identity impersonate="false" />

<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="99999" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
<appSettings>

>>>>>>>>>>>>
Here is the key (using sql auth) - impersonate = false
>>>>>>>>>>>
<add key="DSN" value="Data Source=(local); initial catalog=K2Log; User ID=sa;Password=k2pass" />

>>>>>>>>>>>>
Here is the key (using integrated) - impersonate = true
>>>>>>>>>>>
<add key="DSN" value="Data Source=(local); initial catalog=K2Log; Integrated Security=SSPI" />

</appSettings>
</configuration>
Badge +4
when do you get this error? - is it from viewing the workspace?
Badge +3
Now it works.

But, why was the impersonate=false if the key was config to use impersonate=true?

Because this was a new installation in a new server...

Thanks

Ricardo Carvalho
Badge +4
Hi,

Pardon my earlier entry - I got it backwards. If you are using sql auth - it doesn't matter if you impersonate or not
SQL AUTH:
<add key="DSN" value="Data Source=(local); initial catalog=K2Log; User ID=sa;Password=k2pass" />

BUT if you are using integrated security you will want to set impersonate to false
INTEGRATED SECURITY:
<add key="DSN" value="Data Source=(local); initial catalog=K2Log; Integrated Security=SSPI" />

The workspace is an aspx page with frames - the frames in the workspace.aspx page are populated by calling the workspaceSERVICE webservice. This reporting webservice makes calls directly to the K2log database (by design so that it won't use resources that the k2service needs to do workflow). Therefore the connection string needs to be configured properly so that you will not need to pass the logged in creds - but instead pass the apppool identity (impersonate = false) Without this key set to false you would need to give each user (that you wanted to expose reports to) rights in the database - BUT by setting this to false it will connect to the db using the apppool identity

(Note - that only applies if using integrated security - if you are using sql auth - then it will use the uname and password provided)

Reply