windows-authentication

Windows authentication in asp.net 5

不想你离开。 提交于 2019-11-26 09:45:44
问题 I am building an intranet application in ASP .NET 5, MVC 6. I want to know how to enable Windows Authentication.? The default project template supports only Individual User Accounts. 回答1: Mark's answer is still valid in ASP.Net RC1. There are some additional steps to tie it all together (I don't have enough reputation to comment on his solution): Install WebListener from NuGet Add the following usings to Startcup.cs: using Microsoft.AspNet.Http.Features; using Microsoft.Net.Http.Server; Add

Authentication issue when debugging in VS2013 - iis express

最后都变了- 提交于 2019-11-26 06:14:49
问题 I\'m trying to pick up the windows username when debugging in Visual Studio 2013. I am simply using: httpcontext.current.user.identity.name If I run this on my Dev Server it works fine, if I run it in debug mode on any previous version of Visual Studio it also works fine. My problems is - If i run this on visual studio 2013 I get an empty string. My web config is as follows. <system.web> <authentication mode=\"Windows\"/> <identity impersonate=\"false\"/> <authorization> <allow users=\"*\"/>

Unable to authenticate to ASP.NET Web Api service with HttpClient

[亡魂溺海] 提交于 2019-11-26 05:57:48
问题 I have an ASP.NET Web API service that runs on a web server with Windows Authentication enabled. I have a client site built on MVC4 that runs in a different site on the same web server that uses the HttpClient to pull data from the service. This client site runs with identity impersonation enabled and also uses windows authentication. The web server is Windows Server 2008 R2 with IIS 7.5. The challenge I am having is getting the HttpClient to pass the current windows user as part of its

Mixing Forms authentication with Windows authentication

纵然是瞬间 提交于 2019-11-26 05:55:28
问题 I have an (ASP.NET 3.5) intranet application which has been designed to use forms authentication (along with the default aspnet membership system). I also store additional information about users in another table which shares its primary key with the aspnet_users table. For users who are part of our domain I store their domain account name in the secondary users table, and I want to automatically log in users whose domain account name matches a name stored in the table. I have read the guides

How can I pass windows authentication to webservice using jQuery?

安稳与你 提交于 2019-11-26 05:00:31
问题 I\'m using jQuery to call a .Net web service like this: var service_url = \"https://example.com/myservice.asmx\" $.ajax({ type: \"GET\", url: service_url, dataType: \"xml\", data: \"ParamId=\" + FormId.value, processData: false, error: function(XMLHttpRequest, textStatus, errorThrown) { ajaxError(XMLHttpRequest, textStatus, errorThrown); }, success: function(xml) { DoSomething(xml); } }); Now I want to wrap \"https://example.com/myservice.asmx\" in Windows Authentication. How can I pass

Run Code as a different user

半世苍凉 提交于 2019-11-26 03:57:02
问题 Is there a way to tell my code to run as a different user? I am calling NetUserSetInfo via a PInvoke and I need to call it as a different user. Is there a way to do that? 回答1: Impersonation requires calling some native APIs (namely, LogonUser) so it's probably not worth posting 3 pages of wrapper code. This page has a complete working sample: http://platinumdogs.wordpress.com/2008/10/30/net-c-impersonation-with-network-credentials/ Note that impersonation has important security considerations

IIS7 folder permissions for web application

佐手、 提交于 2019-11-26 03:50:01
问题 I am using windows authentication without impersonation on my company\'s intranet website with IIS7. Under IIS7, what account is used to access the folder which contains my web app using these settings? Would it be IIS_IUSRS? Or NETWORK SERVICE? Or another I don\'t know about? 回答1: In IIS 7 (not IIS 7.5), sites access files and folders based on the account set on the application pool for the site. By default, in IIS7, this account is NETWORK SERVICE . Specify an Identity for an Application

Receiving login prompt using integrated windows authentication

两盒软妹~` 提交于 2019-11-26 03:36:52
问题 I have a .NET 3.5 application running under IIS 7 on Windows 2003 server and cannot get integrated windows authentication working properly as I continue to get prompted for a login. I have set Windows Authentication to enabled in IIS with all other security types disabled and my application web.config file authentication/authorization is set up as: <system.web> <compilation debug=\"true\" strict=\"false\" explicit=\"true\" targetFramework=\"3.5\" /> <authenticationmode=\"Windows\"/>

401 response for CORS request in IIS with Windows Auth enabled

自作多情 提交于 2019-11-26 02:34:00
问题 I\'m trying to enable CORS support in my WebAPI project, and if I enable Anonymous Authentication then everything works fine, but with Windows Auth + disabled anonymous authentication, the OPTIONS request sent always returns a 401 unauthorized response. The site requesting it is on the DOMAIN so should be able to make the call, is there any way to get around the issue without disabling Windows Authentication? 回答1: You can allow only OPTIONS verb for anonymous users. <system.web>

IIS Express Windows Authentication

那年仲夏 提交于 2019-11-26 00:35:09
问题 I\'m trying to use IIS Express with VS2010 to host a silverlight application. I modified my applicationhost.config file to allow for modification of the proper configuration settings. I have the following in my web.config: <location path=\"\"> <system.webServer> <security> <authentication> <anonymousAuthentication enabled=\"false\" /> <windowsAuthentication enabled=\"true\" /> </authentication> </security> </system.webServer> </location> I am not being authenticated and my domain service call