English 中文(简体)
iis 7. 5 dns 窗口验证页面用户身份无效
原标题:iis 7.5 dns windows authentication page user identity not working
In IIS 7.5 server I have a website apps.mydomain.com. Site binding for this website is: IP: All Unassigned Port: 80 Host name: apps.mydomain.com In DNS there is an ip address pointing to apps.mydomain.com. Site comes up fine when browsing to this hostname. I want to get current windows logged in username from asp.net web apps. I enabled windows authentication and disabled anonymous. Using this ASP.Net code to test: Response.Write(Page.User.Identity.Name); However, browsing to http://apps.mydomain.com/site/ the application pool identity shows as the Page.User.Identity.Name value and not the current windows logged in username. If I browse to http://servername/site/ then Page.User.Identity.Name will return current windows logged in username. Is there something else I need to configure to get the current windows logged in username when using host header? web.config: App pool config (left out "handlers" for brevity, there s a 30000 char limit):
问题回答
Most likely, because the http://servername/site/ is working, it is because you are resolving to internal DNS servers, so Windows Auth kicks in for you. Have you tried explicitly setting the authentication method to Windows in the web.config file?
Change the app pool for the test application from "test" to ".NET 2.0 Apps" as the root of your site has different config from the test application. The windows athentication is setup correctly for ".NET 2.0 Apps" app pool but i think that dosn t effect the "test" app pool. good luck




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签