Wie,
Thanks for your reply.
Yes. I think I checked the correct web.config file. I checked both the
ReportServer\web.config and the ReportManager\web.config. Incidentially, I
get the same issue wether I hit the Report Manager or the Report Service
directly.
As for code deployment, I think it is correct. I can debug into my
custom code. So I'm pretty sure it's in the right place. Also, I had it
running fine under 2000.
I did have to add a bunch of permissions to a permission set and assert
them. That was new. (I didn't have them under 2000 and was running.) I
stepped through the code and deteremined what wasn't working and added
permissions to the set until I was running. I don't know if this could be a
manifestation of a missing permission. But I don't know how to run down which
one. The permissions I am asserting are as follows:
- UnmanagedCode (attribute on the method)
- ControlPrincipal (attribute on the method)
- SqlClientPermission (I am checking for region-specific rights in the
database)
- FileIOPermission (I am reading from the web.config file)
- PrincipalPermission (I think this is the one that should allow me to
impersonate?)
- DirectoryServicesPermission (I need to lookup the logged-in user
against the AD to check for regions, etc)
I do the actual AD lookup and database access in another assembly called
by this one. I don't think I need to also assert in that assembly, right? It
should pass down the call stack. Also, when I do the
WindowsIdentity.GetCurrent in this (parent) assembly, it still gives me
ASPNET, even before I call the other assembly. So I just don't think it is
working correctly at all.
Sorry for the long-winded response. I appreciate any help you can give
and want to acurately describe what I've done so far.
I also ran down the "is this a delegation issue" road, even though that
should be impossible (it's all running on the same machine). No luck there.
I'm almost sure it's either a permission issue or a configuration issue.
But I am beating myself up and can't find evidence of either.
Thanks again,
Jason
[quoted text, click to view] "Wei Lu [MSFT]" wrote:
> Hello Bob,
>
> Have you changed the correct web.config file?
>
> Also, did you follow this article to deploy the custom assembly correctly?
>
>
http://msdn2.microsoft.com/en-us/library/ms155034.aspx >
> Sincerely,
>
> Wei Lu
> Microsoft Online Community Support
>
> ==================================================
>
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
>
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
Wei,
HttpContext.Current.User.Identity gives the correct user. So the user is
logged in, but for whatever reason, the impersonation doesn't seem to be
happening at this point. The virtual directory is set to Windows
Authentication. And the web config file is set to Windows Authentication and
impersonation=true.
The good news is that by using the HttpContext object, I am able to get
what I need done. (I have to impersonate a known user to query the AD, but we
already have a user created and secured for only that right for use with the
DirectorySearcher class, anyway.)
I appreciate your help greatly. This was a real stumper. I would still
be curious why the impersonation seems to be failing at this level.
Again, thank you very much.
Jason
[quoted text, click to view] "Wei Lu [MSFT]" wrote:
> Hello Jason,
>
> I would like to check the Httpcontext.Current.User.Identity.
>
> If you use this in the custom code, what did you get? Also, did you set the
> Report Virtual Directory to integrated windows authentication?
>
> Sincerely,
>
> Wei Lu
> Microsoft Online Community Support
>
> ==================================================
>
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
>
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
Hello Jason,
My pleasure. I guess this issue is because that when your custom assebly
runs to the Line where Windows Indetity is, it did not impersonated yet.
If you have any question, please feel free to let me know.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Don't see what you're looking for? Try a search.