Security :: WindowsIdentity - Command Prompt?

Mar 14, 2011

In order to find out what identity is running an app, this line is used:

System.Security.Principal.WindowsIdentity.GetCurrent().Name;

But is there another way to find out this name such as through the command prompt?

View 2 Replies


Similar Messages:

Databases :: How To Restore On Sql Command Prompt

Apr 21, 2010

how to restore My sql databse on my sql command prompt

View 2 Replies

Security :: Get WindowsIdentity Failing With Incorrect Function

Mar 25, 2010

i have this line of code

WindowsIdentity wi2 = new WindowsIdentity("test1");

test1 is in the ActiveDirectory on the DomainController

when running the code I get an IncorrectFunction error

at System.Security.Principal.WindowsIdentity.KerbS4ULogon(String upn)
at System.Security.Principal.WindowsIdentity..ctor(String sUserPrincipalName, String type)
at System.Security.Principal.WindowsIdentity..ctor(String sUserPrincipalName)
at Hisco.Intranet.LoginForm.OnInit(EventArgs e) in F:HiscoDCSWebEventsManagerHiscoDCSDCSLoginForm.aspx.cs:line 17
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

I have windows auth for the website and outside users will logon that are not in the network and I need to impersonate them to login on without offering a login form( quietly behind the scenes) with the test account. I guess what I actually need is the UserTaken pointer. Is there a way to get one without ising the LogOnUser unmanaged call? I have a UserPrincipal object also so is there way to get the token from ActiveDirectory somehow?

View 2 Replies

Security :: Error In IIS7 With WindowsIdentity In Session

Feb 10, 2010

In our web application we provide a way for users to switch which account/credentials (Windows identity) that should be used when making requests to external services.

This "Switch user" service works like this:

The user provides the new credentials that should be used. The application performs a "login", fetch the toke and creates a new WindowsIdentity based on the token.The created identity is placed in the session. When a page is requested and an Identity is available in session, the HttpContext.Current.User is replaced with this one. Everything works as excepted when the application is hosted in IIS6. We have verified that all request to external services is made using the new identity. When we host the application in IIS7 we run into problems however. Everything works fine until we tries to access the new identity (for example by fetching the name) and we get the following exception:

[Code]....

We have no idea why this suddenly starts to happen in IIS7.

View 7 Replies

Write File From Command Prompt Output?

Mar 9, 2011

i got directory information from console application now i want write that file from the command prompt output how can i do that

View 3 Replies

Catch Command Prompt Errors In Code?

Sep 6, 2010

I am running ffmpeg.exe from command prompt through asp.net code. Is there any method to know success and errors of the ffmpeg.exe execution in asp.net code ?

My code is as follows:

string OutputFile, FilArgs;
//output file format in swf
//outputfile = SavePath + "SWF\" + withoutext + ".swf";
OutputFile = SavePath + "SWF\" + WithOutExt + ".flv";
//file orguments for FFMEPG
//filargs = "-i "" + inputfile + "" -ar 22050 "" + outputfile;
FilArgs = "-i "" + InputFile + "" -ar 22050 "" + OutputFile;
//string spath;
//spath = Server.MapPath(".");
Process proc;
proc = new Process();
proc.StartInfo.FileName = spath + "\ffmpeg\ffmpeg.exe";
proc.StartInfo.Arguments = FilArgs;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.CreateNoWindow = false;
proc.StartInfo.RedirectStandardOutput = false;
try
{
proc.Start();
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
proc.WaitForExit();
proc.Close();

View 2 Replies

Architecture :: Open A Command Prompt Of Remote Computer?

Sep 3, 2010

I need to open a Command prompt (cmd.exe) of a Remote server computer and Run a Command from my asp.net web application (C# laungauge). I have progressed till opening a command prompt of the webserver where the website is hosted. My code is:

[Code]....

I have achived this using the VB script. The code is:

[Code]....

In the above code psexec.exe is software used to access remote computers.nawinapp627 = Remote serverPlease help me to achieve above using C#.

View 13 Replies

Architecture :: Accessing The Command Prompt Of The Server Computer In C#?

Sep 8, 2010

I'm developing a web application in asp.net using C# and need to access the command prompt of the server computer.

After accessing it I need to run a "ABC.bat" file in the server computer which is in folder "E:Test".

The absolute path of the server is "\MyServer"

PS: I need to run the ABC.bat file on the server machine as the bat file runs couple of more applications which are licensed to that server machine.

View 7 Replies

Web Forms :: How To Compile Application Using Command Line Prompt

Nov 12, 2013

how can i compile command line through web application? my application is built on asp.net(C#)....

View 1 Replies

Web Forms ::specific Directory By Command Prompt By C# , Run A Java Application From There?

Mar 5, 2010

I'm new in working with Shell commands by C#.I want to go to specific directory(c:Program Files) by command prompt by c# and run a java application from there.I have a code but its only can open a application from C: directory,I appreciate if anyone can help me regarding it

[code]...

View 3 Replies

Web Forms :: How To Install Websetup In Visual Studio 2010 Using Command Prompt

Apr 22, 2012

I have created webset using the below link,   now i need to install using command prompt so that the virtual directory gets stored in c:/inet pub/ wwwroot/ finish where finish is the name of virtual directory. how can i do it. need command line. 

View 1 Replies

Security :: Login Prompt When Using Mozilla Firefox But Not When Using IE

Jul 9, 2010

I have a problem with a simple site that is not requiring login. When run in internet explorer

it works as it should. But when I try to access the page with Mozilla Firefox or Apples Safari

i get a login prompt and no valid useraccount can be entered. I have tried setting authentication mode to either Windows or Forms but it makes no difference.

I can cancel to get the page to load but then I see my logo is not showing

(Logo in Images/file.jpg) When I try to use a link to another page it does not allow me access denied.

As said before with IE everything works OK!! Frustrating, probably something simple...

Even more frustrating On another server it works OK,

Application in Swedish server works

Application in US Server does not work with other browsers but IE.

Same setup for server, IIS 6 Windows server 2003 .Net 2 & 3.5

View 1 Replies

Security :: How To Make An IIS Page Prompt For AD Credentials

Apr 1, 2010

We have an IIS/ASP web page from a vendor that we have just dropped onto a webserver within our company. The ASP pages do not come with any sort of authentication built in, so I am trying to configure the site to prompt for credentials before being accessible. I would like the site to prompt for the credentials in all cases (ie. I don't want Internet Explorer to pass through the credentials of the logged in user). I want authorization to this site to be allowed only to members of a certain security group with Active Directory.

Is there a way to do this? I'm not really an IIS guy, nor an ASP developer, so I'm kind of feeling my way through the dark here.

Based on some searching, I have tried adding the following to the web.config file:

[Code]....

I have also installed the IIS URL authorization role service, and have tried playing around with the authentication settings within IIS, to no avail.

I am using IIS7 on Server 2008.

View 4 Replies

Security :: Get Domain Username Without Authentication Prompt?

Jul 29, 2010

I have an asp.net c# site that I have setup in IIS 7 and am loading into a sharepoint frame. Sharepoint doesn't prompt for domain credentials but my site does?In IIS I have enabled basic and windows authentication so I can get the domain users username, so if there is a way to get this without prompting that'd be a perfect solution for me.I am using the follwing statement to get username:

System.Web.
HttpContext.Current.User.Identity.Name

View 12 Replies

Security :: Get The System To Actually Prompt The User To Login With Credentials?

Feb 5, 2010

I am the web developer at a medical clinic. I have 2 scenarios going on:

First, I have a physicians only component of our employee portal to allow access to only physician shareholders or physician non-shareholders. My structure is built like:

Physicians Only
Administration
Affiliations
Calendars
Compensation
Minutes

The Affiliations folder is only going to be accessible by the physician shareholders. Therefore, I have security roles set for Physicians Only and Affiliations. When I test, the security is set correctly on the folders. However, when I try to login as different people, all with different roles, I have to login with user name and password, twice, before the system allows me in.

Secondly, I have secured areas within the employee portal also. However, when I navigate to them, the system doens't usually prompts me to login. If it does prompt me to login, it too, is on the second try. So how does it know who I am? And more importantly, how do I get the system to actually prompt the user to login with their credentials?

View 15 Replies

Security :: Keep Getting Popup Login Prompt - Using Forms Authentication

Nov 10, 2010

I am using forms authentication. It's works fine locally. Once I upload my web application to a remote iis server and run it I get a Windows authentication prompt. The server [URL] at [URL] requires a username and password.

View 1 Replies

Security :: Windows Auth - Still Showing Login Prompt In IE?

Sep 17, 2010

I'm trying to setup my IIS 7.0 MVC2 site but having problems.I want to use Integrated Security so that the app can obtain the user's credentials. We can then do a look-up of some AD groups to determine what they can do from that point onwards.The problem is - Every time we browse to the application, instead of navigating to our main page immediately, we get a login prompt provided by IE. I've read that we need to make sure that in the browser's Tools->Options->Advanced-> (Securiy-> ENable Windows Intagrated Security) must be checked - which it is on ALL 3 machines where I try this.

The machines AND the server are all in the same domain.My config file states <authentication mode="Windows" /> and I've tried every combination for <identity...> and <authorization...> but to no avail. I can only get the "login" prompt to go away if I enable Anonymous Authentication - but then I can't detect the windows user or their group membership.

View 1 Replies

Security :: Credentials Prompt When Using Domain Account In AppPool Identity In IIS 6.0?

Mar 4, 2011

I have an asp.net application which was working fine with the AppPool Identity set to Netwrok Service or Local System or Local Service. But If I change the app pool identity to a domain account (I am using my account itself) I am unable to access the application from any other machine except the web server.I am using Windows Integrated Authentication.I tried resetting IIS, Restart W3SVC, aspnet_regiis -ga . But no luck.

View 5 Replies

Security :: How To Restrict Windows Credentials Prompt Window For The Application

Oct 24, 2010

We have created an Intranet Web Application with Windows Authentication.

That asking a prompt to get Username and Password each time when we access the application.

How can we restrict that prompt other than IE --> Security --> Custom Level --> User Authentication.

(Because, with this option we need to set these settings in each and every user's system)

View 3 Replies

Security :: Password Prompt For ASP Website Hosted On Intranet Using Windows Authentication

Jul 8, 2010

We have developed a website in asp.net using windows authentication and deployed it on the intranet (IIS v6.0). Most of the times, when users try to access this website they are taken straight to the website, but occasionally some users get a prompt to enter their windows username and password. I understand that this could be caused because of several reasons like:

Cached active directory password. Recently active directory password changed. Active directory account locked out. I want to fix this issue for good because it is annoying the users.

View 1 Replies

Security :: Prompt User To Reset Password When It Is Expired Using Windows Authentication?

Mar 1, 2010

I have an Intranet web site that uses Windows Authentication and when a users password expires the do not get a prompt letting them reset it. We also have OWA and if they go there to check mail, it sends them to a page which allows them to reset it there. How can I trap for expired passwords and allow them to change it like they can with OWA?

View 1 Replies

How To Change The Value Returned By WindowsIdentity.GetCurrent

Jan 7, 2010

I'm writing an ASP.net application and I'm working with the WindowsIdentity.GetCurrent() function. I want to know how (or if it's possible) to change what identity the ASP.net application runs as.

I eventually want to run it as an account associated with the end-user. I understand I can do this with Windows Authentication in IIS, but Windows Authentication will not work with my particular application. If I can programmatically log the user in with a AD username and password, that will be fine.

How can I set the WindowsIdentity the ASP.net application runs as without using Windows Authentication in IIS?

Update: This question has been sitting idle for a long time. I think that perhaps the framework does not allow me to do what I'm describing here.

View 1 Replies

Using WindowsIdentity.GetCurrent() Failed In Windows Server 2008 R2?

Dec 7, 2010

I have an asp.net 2.0 application that is suppose to pick the Identity of the currently logged in user on a client machine and use it to setup working environment for the user. On win xp and windows server 2003 this works fine. but on moving the application to Windows Server 2008 R2 .

View 1 Replies

Security :: Prompt Network People But Not Outside People?

Sep 23, 2010

I have a question.aspx page that allows "guests" and "admin" to use. If guest access the page, it says Submit, if admin access it, it says "Approve" on the button control.

My question is, when guest accesses that page, I don't care about their credentials, but when admin accesses that page, I want them to log in first. And the Admin users are the ones that work in our company with the same domain and such. Anyone that access outside would be "guest".. how can I prompt people in the same network when they try to access that page? I need that AD credentials to do some programming in code behind.

View 1 Replies

Security - Spin Off A Command Line Process From A Page?

Mar 15, 2011

I have a web page hosted on the server and a zip file on the server's file system. The page is spinning off the 7zip process with some arguments (location of the zip file and destination folder for unzipping) but it seems to raise permission issues, of course. For each file in the archive I get "Can not open file [filename]". I tried windows authentication and running the process with a username and password but nothing worked properly. What would be the best way for unzipping the file on the server from security point of view? Ideally, I would also like to have this event driven so the file is unzipped as soon as it arrives on the server (this is when I request the page).

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved