Last post May 02, 2017 07:22 PM by AppDev01
Apr 26, 2017 08:16 PM|AppDev01|LINK
***UPDATE### JUST FOUND THIS Should have searched before posting sorry but this is in webforms... will this work in mvc? Would this go in the layout page??
Sorry but I don;t know how to translate webform stuff to mvc stuff:
After some guidance I think have narrowed website issue as our site does not work when published to a real web server.
I used this
to send information about the user's that is accessing the website... but I guess all am getting is the server trying to find itself in the database. And it is not their causing the application not to run on he web server as this great on the local host.
This option is one of the main features of the application... as we don;t want users to have to login in and type in a password and all that jazz... we just want them to come to the site and the site get's their computer info and boom they are good to go
if they can be found in the database.
So is their a better way to do this where I can get the users computer login vs the webserver's login thanks!
Apr 26, 2017 08:31 PM|mgebhard|LINK
Windows authentication is a Microsoft technology used on Intranets site with Internet Explorer. If you've built a web site that is deployed on the Internet then you'll need to rethink the design. If this is an Intranet site, contact your system admin and
have them help you configure the site.
Apr 26, 2017 08:49 PM|KodiakMx|LINK
You may want to explore https://docs.microsoft.com/en-us/aspnet/visual-studio/overview/2013/creating-web-projects-in-visual-studio#orgauth option.
Apr 26, 2017 08:52 PM|AppDev01|LINK
Sadly I am the system admin and the programmer and the janator... But I am not a programmer in the traditional since... I do more MS Access development then anything... I did set the webconfig to support windows authentication as well as something call impersonation...
I read thru that but it is so over my head.. we may have to hire in some real developers to set this website up
You typed "Windows authentication is a Microsoft technology used on Intranets site with Internet Explorer" so is my problem that I am using chrome should I switch to IE and force the user to use IE? That can be mandated if that's what's needed..
Apr 26, 2017 08:58 PM|AppDev01|LINK
Yes I read that one too... that's how I got as far as I did... I was trying to avoid using active directory because I don't know what it is really...
I was hoping that I could pass the users information thru the server and to the database... kinda like a simple validator. But I guess this is not possible because the
webserver is in the mix?
That is a real letdown... wish I would have know that before I started...
Apr 26, 2017 09:16 PM|KodiakMx|LINK
I believe you are mixing up concepts. You have a user who is logged in into your web system/app, and other thing is the windows local user who is executing the IIS Application Pool that is in charge of your web app. With System.Security.Principal.WindowsIdentity.GetCurrent().GetUserName();
what you are getting is the windows local user who is executing your IIS App Pool (you may google for this concept).
I suggest you to go for the ASP.NET Identity approach (https://docs.microsoft.com/en-us/aspnet/identity/) and if you don't want to allow user creation under request, just comment the functionality on Controllers/AccountController.cs like the Register
method, and remove the respective references on your views.
By the way, you will need a back office to be able to manage your web app users..
Apr 27, 2017 03:11 AM|Jean Sun|LINK
This option is one of the main features of the application... as we don;t want users to have to login in and type in a password and all that jazz... we just want them to come to the site and the site get's their computer info and boom they are good to go if
they can be found in the database.
In web application we can get the client's information via the Http Request Headers, you can find the fields in the Http Request Headers in the following link.
In the request header, we can't find a safe way to identity the user who send this request. So we need authentication to help use identity user.
As far as I know, the Windows Authentication can let the user auto login, however, it should be configured to meet the requirements in the following link.
May 02, 2017 07:22 PM|AppDev01|LINK
Thanks so much Jean Sun,
I ended up using System.Web.HttpContext.Current.Request.LogonUserIdentity.Name;
my issue was that my link query was having trouble with the double backslashes that were being returned in the login in name.
I ended up having to use the .Replace to deal with it,
Thanks so much for the help!