HttpContext.Current.User.Identity.Name is Empty

前端 未结 10 1491
礼貌的吻别
礼貌的吻别 2020-11-29 04:13

I have a Silverlight application (using MVC) and when i\'m building in visual studio, using Visual Studio Development center, there\'s no problem, the HttpContext.Curr

10条回答
  •  伪装坚强ぢ
    2020-11-29 04:48

    In addition to "answered Mar 28 '11 at 12:27Bryan Bedard"

    In case that the solution doesn't work, you have to enable Windows Authentication in iss manager. How to do that:

    1.To start IIS Manager from the Run dialog box: On the Start menu, click All Programs, click Accessories, and then click Run. In the Open box, type inetmgr and then click OK.

    2.In the Connections pane, expand the server name, expand Sites, and go to the level in the hierarchy pane that you want to configure, and then click the Web site or Web application. 3. Scroll to the IIS section in the Home pane, and then double-click Authentication.

    4.In the Authentication pane, select Anonymous Authentication, and then click Disable.

    1. In the Authentication pane, select Windows Authentication, and then click Enable.

    Reference

提交回复
热议问题