0
「サーバーとの安全な接続を確立できません」:MVC2ログイン=私はこの奇妙なエラーメッセージが表示されました
サーバー
私がしようとの安全な接続を確立できません私のADアカウントでログインする。私は、ASP.NET webformsでLDAPに接続しようとしましたが、うまく動作しているように見えますが、問題の原因となっている接続文字列を考えていません。
しかし、MVCを使用しているときに、パーサーエラーが表示されます。私も周りを見回してGoogleにしようとしましたが、私は適切な解決策を見つけることができません。それは ソースエラーがあると言う設定エラーによると:
<add name="AspNetActiveDirectoryMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider"
connectionStringName="ADConnectionString"
connectionUsername="cn=actualUser"
connectionPassword="actualUsersPassword" />`
ここに私のweb.config
されています。ここでは
<connectionStrings>
<add name="ADConnectionString" connectionString="LDAP://IPadress/DC=example,DC=test"/>
</connectionStrings>
<system.web>
<authentication mode="Forms">
<forms name=".ADAuthCookie" loginUrl="~/Account/LogOn" timeout="15"
slidingExpiration="false" protection="All" />
</authentication>
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
<membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
<providers>
<clear/>
<add name="AspNetActiveDirectoryMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider"
connectionStringName="ADConnectionString"
connectionUsername="cn=actualUser" connectionPassword="actualUsersPassword" />
</providers>
</membership>
<trust level="Full" />
<pages>
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
</namespaces>
</pages>
</system.web>
が私のクラスですが、私は(Membership.ValidateUser(もし "からのエラーメッセージが表示されましたmodel.UserName、model.Password))それはweb.configファイルでメンバーシッププロバイダーを指す {」:
[HttpPost]
public ActionResult LogOn(LogOnModel model, string returnUrl)
{
if (ModelState.IsValid)
{
if (Membership.ValidateUser(model.UserName, model.Password))
{
FormsAuthentication.SetAuthCookie(model.UserName,Convert.ToBoolean(model.Password));
if ((!String.IsNullOrEmpty(returnUrl)))
{
return Redirect(returnUrl);
}
else
{
return RedirectToAction("Index", "Home");
}
}
else
{
ModelState.AddModelError("", "The user name or password provided is incorrect.");
}
}
// If we got this far, something failed, redisplay form
return View(model);
}
はい、同じエラーメッセージが表示されます。 – user1060359
まだ問題があります。誰もいませんか? – user1060359
イベントログのその他の情報これはあなたのマシンが接続しようとしているのと同じドメインですか?ネットワークエンジニアにアクセス許可の問題がないかチェックしましたか? –