Confirming who asp.net is running as?

D

darrel

I'm trying to troubleshoot a permissions problem. My asp.net application is
creating a folder, but then doesn't have permission to save to it. I'd like
to confirm that Asp.net is running as the ASPNET user, but I'm not sure how
to do that.

-Darrel
 
D

darrel

That looks interesting. Alas, I can't get it to run in my application.

ack. Stupid vs.net decided to change the C# file into a vb file. Ugh.

OK, got that running. Cool (Thanks, Keith!). This is the results:

======================================================

Unmanaged Process Identity: mycomputerid\ASPNET
Unmanaged Thread Identity: mycomputerid\IUSR_mycomputerid
Client Identity (HttpContext.User): [anonymous]

======================================================

Does that look normal?

-Darrel
 
D

darrel

======================================================

Unmanaged Process Identity: mycomputerid\ASPNET
Unmanaged Thread Identity: mycomputerid\IUSR_mycomputerid
Client Identity (HttpContext.User): [anonymous]

======================================================

Does that look normal?

Actually, scratch that. I'm going to post a more detailed separate question.

Thanks, Brock!

-Darrel
 
J

Juan T. Llibre

Here's a short file you can use to determine
which account ASP.NET is running as :

-----------------
<%@ Page Language="VB" %>
<%@ Import NameSpace = System.Security.Principal %>
<script runat="server">
Sub Page_Load()
Dim tmp As String = WindowsIdentity.GetCurrent.Name()
Label1.Text = tmp
End Sub
</script>
<html>
<head>
<title>WindowsIdentity.GetCurrent.Name()</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" Runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top