I am new on ASP.net MVC, I have this controller that uses Windows authentication (xxxxDMZ\username, password):
[Authorize]
public class ExController : Controller
{
protected override void Initialize(System.Web.Routing.RequestContext requestContext)
{
base.Initialize(requestContext);
ViewBag.user = User.Identity.Name;
}
public ActionResult Index()
{
return View();
}
}
Now I need to use a different domain (xxxx\username, password) to access this controller.
web.config:
<system.web>
<httpRuntime maxRequestLength="1048576" executionTimeout="3600" />
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</assemblies>
</compilation>
<authentication mode="Windows" />
<pages>
<namespaces>
<add namespace="System.Web.Helpers" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Optimization" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.WebPages" />
<add namespace="GridMvc" />
</namespaces>
</pages>
<membership>
<providers>
<clear />
</providers>
</membership>
</system.web>
Current IIS 7.5 configuration: Windows Authentication Enabled(enabled providers: Negotiate, NTLM), Anonymous Authentication Enabled
Notes:
- the website is hosted in server that can be accessed via RDC by using
xxxDMZ\username. xxxDMZ\usernameandxxx\usernameis totally different accounts.- when the user login to windows, he uses this account
xxx\username. - I want users to browse the website without using credentials, I only need them to use credentials(xxxx\username, password) when trying to access the controller mentioned above.
- My problem is not all (xxxx\username, password) users have (xxxxDMZ\username, password) accounts.