J
Jeroen van Onzen
Hi guys,
I posted this question first in the wrong newsgroup (.net.security), but
this is an asp.net question (i guess). Sorry ...
I am developing a web application. When I try to connect to an Analysis
Services 2005 server everything works fine. When I try to connect to an
Analysis Services by an assembly which i load an exception occurs.
There should be a blog or a newsgroup entry somewehere of this problem, but
i didn't find it. Sorry, but after discovering this bug (took a while) I
probably narrowed my focus too small.
When loading the assembly in a strandard .Net application everything works
fine.
How can I solve this problem?????
With regards,
Jeroen van Onzen
In Web.Config this line:
<authentication mode="Windows"/>
<identity impersonate="false"/>
protected void Page_Load(object sender, EventArgs e)
{
string currentUserNameDebug = WindowsIdentity.GetCurrent().Name; //returns
my ASP.Net account
WindowsImpersonationContext context =
((WindowsIdentity)HttpContext.Current.User.Identity).Impersonate();
//impersonating
currentUserNameDebug = WindowsIdentity.GetCurrent().Name; //returns
my Windows account
// trying to setup a normal Adomdconnection
AdomdConnection connection = new AdomdConnection();
connection.ConnectionString = "Data Source=" + "wally" + ";"; //this is
another machine
connection.Open(); //connection opens, when tracing(using the Profiler) I
see a new connection
connection.Close();
//trying to setup a normal Adomdconnection by a third-party assembly
ThirdParty.Control.AnalysisServices.Report report = new
ThirdParty.Control.AnalysisServices.Report();
report.ConnectionString = "Data Source=" + "wally" + ";";
report.Connect(); //connection fails, profiler shows the NT Authority
Network Account
report.Disconnect();
context.Undo(); //undo impersonate
currentUserNameDebug = WindowsIdentity.GetCurrent().Name; //returns
correct name
}
I posted this question first in the wrong newsgroup (.net.security), but
this is an asp.net question (i guess). Sorry ...
I am developing a web application. When I try to connect to an Analysis
Services 2005 server everything works fine. When I try to connect to an
Analysis Services by an assembly which i load an exception occurs.
There should be a blog or a newsgroup entry somewehere of this problem, but
i didn't find it. Sorry, but after discovering this bug (took a while) I
probably narrowed my focus too small.
When loading the assembly in a strandard .Net application everything works
fine.
How can I solve this problem?????
With regards,
Jeroen van Onzen
In Web.Config this line:
<authentication mode="Windows"/>
<identity impersonate="false"/>
protected void Page_Load(object sender, EventArgs e)
{
string currentUserNameDebug = WindowsIdentity.GetCurrent().Name; //returns
my ASP.Net account
WindowsImpersonationContext context =
((WindowsIdentity)HttpContext.Current.User.Identity).Impersonate();
//impersonating
currentUserNameDebug = WindowsIdentity.GetCurrent().Name; //returns
my Windows account
// trying to setup a normal Adomdconnection
AdomdConnection connection = new AdomdConnection();
connection.ConnectionString = "Data Source=" + "wally" + ";"; //this is
another machine
connection.Open(); //connection opens, when tracing(using the Profiler) I
see a new connection
connection.Close();
//trying to setup a normal Adomdconnection by a third-party assembly
ThirdParty.Control.AnalysisServices.Report report = new
ThirdParty.Control.AnalysisServices.Report();
report.ConnectionString = "Data Source=" + "wally" + ";";
report.Connect(); //connection fails, profiler shows the NT Authority
Network Account
report.Disconnect();
context.Undo(); //undo impersonate
currentUserNameDebug = WindowsIdentity.GetCurrent().Name; //returns
correct name
}