2015-06-23 15 views
0

我的電腦安裝了VS2008和VS2013。我有一個在VS2008上工作得很好的網站。最近我安裝了VS2013並更新這個網站爲框架4.5。我在VS2013中得到了User.Identity.Name的空字符串。我發現一些答案在HttpContext.Current.User.Identity.Name empty when debugging in visual studio在vs2013上從User.Identity.Name獲取空字符串

我在webconfig上。另外我確保我在IIS中安裝並激活了Windows身份驗證組件。但是我沒有在「屬性」頁面中看到使用Visual Studio Development Server。我只能選擇使用默認的Web服務器。 enter image description here 有誰告訴我如何解決它。提前致謝。

以下是我的調試代碼。

Dim Username As New User(User.Identity.Name) 

回答

0

我發現從[Authentication issue when debugging in VS2013 - iis express][1]

答案有回答

在VS2013 F4您的項目,查看屬性窗口並禁用匿名訪問並啓用「Windows身份驗證」