windows-authentication

MVC3 Windows Authentication override User.Identity

只谈情不闲聊 提交于 2019-11-29 00:50:35
问题 I am building a intranet application using MVC3 with a MSSQL backend. I have authentication and roles (through a custom roles provider) working properly. What I am trying to do now is overriding User.Identity to allow for items like User.Identity.FirstName. But I cannot find any code that will show me how do this in WindowsIdentity I have tried writing a custom provider: public class CPrincipal : WindowsPrincipal { UserDAL userDAL = new UserDAL(); public CPrincipal(WindowsIdentity identity) :

Windows authentication for Intranet/Internet

北慕城南 提交于 2019-11-28 23:14:24
问题 I am developing an ASP.net web application for my company. Some users use this site in the internal network (Intranet) and some use the Internet site. I am using Windows Authentication mode. I need to find a way to not prompt Windows Authentication mode for an Intranet user and prompt Windows Authentication mode for an Internet user. How can I do this? 回答1: Based on what your are describing, Windows Authentication in IIS will do the trick. First some links: Technet as an article about the

Database + Windows Authentication + Username/Password?

安稳与你 提交于 2019-11-28 23:09:20
I have always thought that in order to connect to SQL server using windows authentication with explicitly specified credentials, you must LogonUser, Impersonate, then connect. It seems to me that this link suggests that it's possible to connect to SQL server without all this hassle, simply by specifying "uid=...;pwd=..." in connection string. I tested this method just to be sure it doesn't work, and - lo and behold - it didn't. If that blog post wasn't on msdn.com, I would have just dismissed it as noob talk, but it is. Does anyone have an idea what am I missing? EDIT1: Many respondents

In IIS, why doesn't Window Authentication show up as one of the options for my web application?

浪子不回头ぞ 提交于 2019-11-28 22:18:19
I'm reading about how to set up windows authentication for my web application on IIS 7 . In the description they have Window Authentication as an option in IIS. I have windows authenication turned on for my machine(I'm on Windows 7 Professional 64bit) and I still don't see it as one of the authentication options for my web application. Why? I got hit by this and it was something as simple as having not started IIS Manager with 'run as administrator'. Very frustrating, but I got there in the end! I stumbled upon this, but couldn’t find Security feature under “Turn Windows feature on or off”. In

System.DirectoryServices - The server is not operational

假如想象 提交于 2019-11-28 22:14:36
问题 I get an error by a website, on which I use Windows Authentication. Strange things: Only occurs if user is not yet saved into database (new unknown user) Appears only on live system, everything fine on local development environment This is what I get in a logging mail: Source : System.DirectoryServices Message: The server is not operational. Trace: at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices

Authentication failed because the remote party has closed the transport stream exception when getting a response from webservice

我怕爱的太早我们不能终老 提交于 2019-11-28 22:01:53
问题 I am calling a third party service and when I ask for a response it throws out an exception that says "Authentication failed because the remote party has closed the transport stream exception". I think that there is a problem in sending credentials. I have even tried supplying new credentials. Here is the full code string get_url = "https://**.*******.com/com/******/webservices/public_webservice.cfc?wsdl&Method=CreateUser&SiteID=**&WSPassword=******&UserName=******"; HttpWebRequest request =

HTTP Error 404.15 - Not Found …because the query string is too long

谁说我不能喝 提交于 2019-11-28 21:22:38
I've checked lots of posts about this error but not been able to fix the problem yet. I have simple MVC5 website built in VS2013 running on Windows 8 pro. When the site was created the option for individual accounts was selected. I now need to enable windows authentication so that only AD account users can use the website and also authorisation so that I can limit access to certain views / controllers to particular AD groups. Having selected the web project within VS I have updated the properties window (F4) so that Anonymous Authentication is set to disabled and Windows Authentication is set

How to get user name using Windows authentication in asp.net?

ぐ巨炮叔叔 提交于 2019-11-28 20:01:07
问题 I want to get user name using Windows authentication Actually I implemented "Sign in as different user",when click this button Windows security will appear there we can give credentials. In that time if I give some other credential it is taking current user name only. How to get that given credential user name from windows security? Host application in IIS then anonymous authentication has disabled and windows authentication was enabled. web.config: <system.web> <compilation debug="true"

How to use Windows login for single-sign-on and for Active Directory entries for Desktop Java application?

南笙酒味 提交于 2019-11-28 19:45:44
问题 I'd like to have my desktop Java application to have single sign on related to Active Directory users. In two steps, I'd like to: Be sure that the particular user has logged in to Windows with some user entry. Check out some setup information for that user from the Active Directory With Java: Programatic Way to Determine Current Windows User I can get the name of the current Windows user but can I rely to that? I think the System.getProperty("user.name") won't be secure enough? ("user.name"

Windows authentication doesn't works when I run project from Visual Studio

女生的网名这么多〃 提交于 2019-11-28 18:50:32
Windows authentication works good when I host my ASP.NET MVC project on IIS. But if I run it from Visual Studio - it doesn't. Here is my Web.config: <authentication mode="Windows" /> <authorization> <deny users="?" /> </authorization> Am I missing something? If you are hosting in IIS Express (which you probably should), make sure you have enabled Windows Authentication in the properties of your Web Application. By the way if you create a new ASP.NET MVC 4 application in Visual Studio using the Intranet Application template you will be greeted with the following Readme on the screen. So go