开发者

WSAT on IIS doesn't respect ASP.NET impersonation?

开发者 https://www.devze.com 2023-02-22 20:56 出处:网络
To manage an ASP.NET web application that uses Forms Authentication, I\'m trying to setup the \"Web Site Administration Tool\" that comes with ASP.NET for our production environment, using steps simil

To manage an ASP.NET web application that uses Forms Authentication, I'm trying to setup the "Web Site Administration Tool" that comes with ASP.NET for our production environment, using steps similar to the ones listed here. I'm aware that this isn't recommended or supported, but it doesn't require development of any admin tools and is good enough for our purposes.

Now everything works fine when I use the WSAT from Visual Studio. But when I set it up as an application on IIS, it isn't respecting the impersonation settings I've set up. When it connects to the database backing the target application(Integ开发者_JS百科rated Security, SQL Server 2008), it just uses the standard ASP.NET user account instead.

On the browser, the WSAT website itself loads, but when I navigate to the "Security" page, I get the error:

Login failed for user '[ASP.NET user account]'

This user isn't permissioned on the DB, so it's clear why the DB login fails. What isn't clear to me is why it's using the ASP.NET user account in the first place.

ASP.NET impersonation has been setup for both the WSAT and for the target application (both are "Applications" on the same website on IIS), but clearly this isn't being respected when WSAT connects to the DB.

How do I fix this issue?

I can post relevant sections of the web.config files if necessary.

EDIT: Clearly, I can work around this problem by permissioning the ASP.NET user on the DB, or by building a custom WSAT tool or by using one built by others (such as this one), but I would prefer to solve this by fixing the impersonation issue.

0

精彩评论

暂无评论...
验证码 换一张
取 消