Hi,
I have an ASP .NET page which invoke a SQL Agent Job. It works fine in debugging but when I run the web application in deplyment environnment it does not work. The Web Application is configured in Basic Authentication. The error message is not very detailed: "Invoke failed to job XXX".
I tried to add credentials information in my code using:
myServer.ConnectionContext.LoginSecure = false;
myServer.ConnectionContext.Login = "DOMAIN\Login";
myServer.ConnectionContext.Password = "pwd";
or
myServer.ConnectionContext.LoginSecure = false;
myServer.ConnectionContext.ConnectAsUserName = "DOMAIN\Login";
myServer.ConnectionContext.ConnectAsUserPassword = "pwd";
but it does not change anything.
Any help will be appreciated.
When you specify LoginSecure=false you're telling the server to use a SQL login, then you're supplying a domain login. You need to establish a SQL Login with the necessary credentials on the server in this circumstance.|||Hi,if you want to impersonate the curretn thread with another security token than the actual it is running on (as you told the basic authentication) you will have to create an impersonation context, if you want to use the current security context your can just set the LoginSecure = true.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
 
No comments:
Post a Comment