I have two servers,
WEB01_Server
APP01_Server
So my ASP.NET MVC application has two Projects
Sample_Web
Sample_Service
So my application architecture like following
so both these projects I hosted in APP01_Server So I enable the windows authentication(using IIS) for Sample_Web project and once I browse this web project in App server URL windows login prompt coming and successfully able to log in.
Once I browse with WEB01_Server URL, it also windows AD login prompt coming and but cannot log in.
Additionally, I enabled Windows authentication in WEB01_Server this application IIS web site instance and result is same.
Configuration wise What else I need to configure ?
Related
I am developing an ASP.NET MVC 4.5.1 application using VS 2013.
Following are the settings at the IIS 7.5
Windows Authentication Enabled (also in Web.config authentication mode is set to "Windows").
Anonymous Authentication Disabled.
Application pool is running with service account "contoso\john".
The mode is Integrated.
On my landing page (e.g. HomeController.cs) I am storing logon user information as below:
Session["LogonUserName"] = HttpContext.Request.LogonUserIdentity.Name and that's working fine, I can use the Session["LogonUserName"] from other views.
However, when redirecting from home page to a different view e.g. Customer View something weird is happening and somehow I am losing the authentication and I am not able to step into a function.
So I Disabled the Windows Authentication and Enabled the Anonymous Authentication but then on the customer view page I am getting HttpContext.Request.LogonUserIdentity.Name = "NT AUTHORITY\IUSR"
and Session["LogonUserName"] = contoso\john, which is my app pool account.
Any idea why? Could someone please help me?
Ok. The issue certainly due to be authentication (XSS problem) and the JavaScript code wasn't being trusted when running on localhost or on IP address. When given a DNS entry (site binding) the issue resolved.
I have a rails application running on nginx + unicorn and I want that users can login in with their Active Directory crendentials. I've already implemented connecting to AD server and authenticating users, but they need to enter passwords.
Is it possible to somehow get this information on this setup? I've found some topics about this problems, but they don't quite explain how to solve this problem and most of the answers are for IIS sever.
I know that it propably can work only in Internet Explorer.
Signing in automatically is handled by the web server, not your application. Since you are using nginx, there are a couple of third party modules you can use, such as spnego-http-auth-nginx-module or nginx-mod-auth-kerb. IIS has support built-in, of course.
Once you've set up the web server, your application can retrieve the user's username from the REMOTE_USER environment variable. Internet Explorer will automatically log in; Firefox and Chrome will do so if they have been configured for the domain by the system administrator, but this is off by default.
I am running IIS 8 on a Windows 8.1 home premium machine. I'm trying to publish for my home network an MVC application that logs in to SQL Server (2012 Developer Edition) on the same machine.The SQL Server is set up to use Windows Authentication.
The published (to the local file system) MVC application works fine when used from Visual Studio 2013. When ran via IIS, it connects to the home page, but crashes the moment data is accessed with the message "Login failed for user 'WORKGROUP[my home machine]"
Can I get there from here? After research, I see that I cannot set the Authentication for IIS to Windows Authentication for a Home Premium machine (option is not there, only Anonymous, ASP.NET Impersonation and Forms Authentication are there and I could make none work). So what should I do? Change authentication on SQL Server? It should be so easy--both Web and Sql Servers are on the same machine! Any/all ideas very welcome!
Well, first off, there's no such thing as Windows 8 or Windows 8.1 Home Premium. There is only Windows 8.1 and Windows 8.1 Pro. The Home and Home Premium version names were dropped after Windows 7. Additionally, the IIS in Windows 8 does not have the same limitations that were present in earlier versions of IIS, although you still can't connect to a domain. You need 8.x Pro for that.
So, your problem here is that, by default, IIS uses the computer name (including Workgroup or Domain) to login to Sql Server when using Windows Authentication and Integrated security. All you have to do is add your computer to the authorized users for the database.
Simply go into SQL Server Management Studio, open up the server, go to Security->Logins and add the machine, then go to the database and add the newly created machine account to the database.
Ok , you need just add Authencitcated user ( if both IIS and sql server are on same Computer ) , ( NetworkService if they aren't on same Computer ) to database login .
I have a mvc3 applicaiton using windows authentication. it works fine on my local pc.
<authentication mode="Windows" />
after I deploy it to the dev server. every time, i go to the site, a login popup shows up, I need to enter ID and password to access the site. on my local computer, I never see this popup login form. always automatically logged in. What do I need to change on the server side to fix this issue.
in the IIS, I disabled anonymous authentication, only enabled windows authentication. My computer and the serve are on the same domain.
You need to add the server to the local zone in internet explorer. The server needs to be added to the local intranet as it is not being automatically detected. Add the server to this list, restart IE and it will authenticate automatically.
I have an ASP.NET MVC application using windows authentication that I published by visual studio on a windows 2008 server.
But when I try to reach the application from a browser I have to authenticate I get the default authentication form to do this.
If I type my user name and password I can not reach my application but if I use the administration account the application will be displayed in the browser.
And other strange things... in the IIS server I select the application site and click basic settings.
I click on the test connection button I get the following error message:
"Invalid application path".
But if I click the connect as button and use the administration account the test is passed successfully.
Anybody can help me?
l.