Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds


  Asked By: Rico    Date: Jan 07    Category: Sharepoint    Views: 1978

I am trying to write a basic c# windows application in visual studio.
I am basing this code on the Sharepoint Products & Technologies

When I execute this code:

Uri url = new Uri("http://spsservername");
TopologyManager topology = new TopologyManager();
PortalSite portal = topology.PortalSites[url];

I get this error (clipped from QuickWatch when I inspect

- topology.PortalSites[url]
+ System.SystemException {@"Login failed for user
'DOMAIN\username'."} System.SystemException
+ _errors {System.Data.SqlClient.SqlErrorCollection}
Class 14 byte
+ Errors {System.Data.SqlClient.SqlErrorCollection}
LineNumber 0 int
Message @"Login failed for user 'DOMAIN\username'." string
Number 18456 int
Procedure "" string
Server "sqlservername" string
Source ".Net SqlClient Data Provider" string
State 1 byte

Any suggestions for where to look for an explanation?

Here are some other factors:
I am an administrator on the SPS server, but I don't have access
to the SQL server with my account. The DOMAIN\username above is my
personal login name, not the domain account used on the portal's
application pool?

Why isn't portal using the correct domain account? I can write web
parts without any problems and access the portal without problems.



1 Answer Found

Answer #1    Answered By: Daron Oneill     Answered On: Jan 07

Since the TopologyManager can alter the IIS metabase, I believe that the
account you use with it must be a local box administrator.

Didn't find what you were looking for? Find more on System.Data.SqlClient.SqlException Or get search suggestion and latest updates.