- Posted by justin on February 26, 2008
When we went to deploy our notification services (NS )instance, we ran into an issue with the subscription management web page failing with the login failed message below.
Notification Services failed to get the metadata for the specified instance. Instance Name: [YourAppName] SqlServerError: Source: .Net SqlClient Data Provider Number: 18456 State: 1 Class: 14 Server: (local) Message: Login failed for user 'ASPNET'. Procedure: Line Number: 65536
The same code worked just fine previously in SQL Server 2000 NS and it worked with no problem in our dev environments since we all have sql admin rights and are running one a single machine whereas in production we do not have admin rights and the web/database servers are seperate machines.
So it turns out that with 2005 NS when you call say new NSInstance and pass the NS Database Name, it now automatically connects to the instance versus in SQL 2000 NS it waited until you set the reference to NSApplication and passed the NSInstance into is. So now our code looks like the following:
_instance = new NSInstance(AlertsDatabaseName, AlertsDatabaseUser, AlertsDatabasePassword);
_application = new NSApplication(_instance, _applicationName);