.net - Get The Username That Runs The Executing AppPool?

Jun 29, 2010

In ASP.NET or WCF is it safe to use erviceSecurityContext.Current.WindowsIdentity.Nameto get the current username that executes the current thread?I want to ensure that the correct user is impersonated in my WCF Service.

View 1 Replies


Similar Messages:

Security :: IIS Permissions For New AppPool ID?

Feb 11, 2010

I am doing some testing and want to find out best practice for creating a new user to assign to an appPool. I know that the default ASPNET account, on IIS 6.0, is very low permissions. For experienced folks, what are the bare permissions required to grant this new user? Yes, I am aware that various NTFS rights are required for different operations, such as reading outside of the application path, writing to the NTFS share, etc. I am just looking at a base install.

Dino Esposito wrote in Chapter 15 of Programming Microsoft ASP.NET 2.0 - Core Reference that the following directories would need the respective permissions:

.NET framework root - read/list Temporary ASP.NET folders - full GAC - read Windows System32 - access/read App root - access/read Web site root - scanWhat else would I need to set up beyond this base configuration as far as rights are concerned? If anyone does this regularly, do you have a script to do this automatically?

View 2 Replies

Login Failed For User 'IIS APPPOOLClassic .NET AppPool'

Jan 19, 2011

I just added my website to IIS. After much troubleshooting I was able to make it run with the Classic .NET App Pool.

But on the page which requires connecting with the database, I am getting the error "Login failed for the user 'IIS APPPOOLClass .NET AppPool'

Here's the screenshot of the error: [URL]

View 1 Replies

Iis7 - URL Routing In .Net Webforms Running Under The Classic .NET AppPool?

Dec 29, 2010

Does anybody knows if it is possible to make URL routing in a ASP.Net webforms website that is running under the Classic .NET AppPool.

I've tried a few things here, but it just works when I switch from Classic AppPool to Default AppPool.

** the web site MUST run under Classic AppPool.

View 2 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

HttpHandlers / Modules :: Trying To Write An HttpModule That Will Work In IIS7 With Integrated Pipeline Mode AppPool?

Jan 2, 2011

am trying to write an HttpModule that will work in IIS7 with integrated pipeline mode AppPool. Within this module I need to access Session variables and to be able to capture the Session Start and End events. I have found a couple of articles on this topic that indicate the need to modify the behavior of the HttpHandler in PostAcquireRequestState to force the Session for the context to be initialized. The article I am using as a template is posted here:[URL]In my case I am getting the following error:

[NullReferenceException: Object reference not set to an instance of an object.] System.Web.PipelineModuleStepContainer.GetEventCount(RequestNotification notification, Boolean isPostEvent) +30 System.Web.PipelineStepManager.ResumeSteps(Exception error) +1112
System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) +113 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +616

I believe that this error implies a problem with attempting to attach an event handler multiple times. I am aware that the modules Init function can be called more than once and have set a static initialization flag which ensures that I will only ever attach the event handler once.In the most condensed form my code is as follows:

public class HttpModule : IHttpModule, IRequiresSessionState

View 1 Replies

Security :: Update Username Of Current Logged Username?

Mar 12, 2010

How to update username of current logged username?

View 10 Replies

MVC :: Action Runs Twice In IE8 Only?

Jun 25, 2010

We hit the problem in our asp.net mvc application where our controller action method would be hit twice in
IE8.

This issue does not occur in both FF and Safari.

We have also disabled javascript during our test and it still hits it twice. The first time it passes model properly whereas the second time the model is null.

It does it across all pages.

Has anyone hit this problem before? Bear in mind it's only in IE8 and it's not javascript related.

View 3 Replies

How To Figure Out App Runs At 32-bit On A 64-bit Machine

Apr 15, 2010

I have a .NET app (webforms - .NET 3.5) that is running on a 64-bit server as 32-bit (I checked the IntPtr.Size result). The compilation is set to AnyCPU so I would expect that on a 64-bit machine, the app would be run at 64-bit. There are many Third-party programs incorporated into the app, could they be causing a problem? How do I figure out why 64-bit compilation is not being done?

View 1 Replies

Initialization Area In .NET That Only Runs Once?

Dec 6, 2010

I've got a piece of code that I want to run one time when my website is first loaded.It is basically a static initialization of another module.Is there some event I can hook into that runs when the site is first served to a client?It doesn't even need to be per session, just on first load to any client.

I'm using vs2010, .net 4.0, asp.net 4.0

View 2 Replies

C# Pdf Generator That Runs On Medium Trust

Jan 17, 2011

I need to generate PDF reports on a server where full trust apps cannot run.(i cannot use PdfSharp and MigraDoc because of security exceptions when i say

PdfDocumentRenderer renderer = new PdfDocumentRenderer(true, PdfSharp.Pdf.PdfFontEmbedding.Always);
renderer.Document = doc;
renderer.RenderDocument(); // <<< ex here
renderer.PdfDocument.Save(filePath);

Message: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.so i need to
have asp.net c# pdf generator that runs on Medium Trust or Low trust OR be able to pass values from asp.net c# to any php pdf generator.I am trying itextsharp-5.0.5,

View 2 Replies

Timer In C# Runs For 20 Minutes Then Stops?

Feb 25, 2010

I'm building a website in ASP.NET with C# code behind files, I'll be using the site on shared hosting due to price, and one of my aims was to have a stored procedure scheduled to run every 1 hour in MySQL and update my database.

Unforunately security arrangements on shared hosting means that users cannot schedule stored procedures, so I decided to tackle the problem another way.

I created a timer in my website inside its own class file in the App_Code folder, it basically starts a timer and then the time elapsed event connects to my database and calls the stored procedure. I then built an admin page that allows me to see the status of this thread (started/stopped) and allows me to start/stop and restart it.

It's installed on my test site that I run from my home PC using Win7 and IIS, and it works beautifully, I can stop start the service and watch the database tick up when it's running...

HOWEVER...it only seems to run for 20 minutes before it stops, I thought maybe it was the garbage collection killing it since that's mentioned in some timer examples but I've added a GC.KeepAlive(Timer) and that's not . I'm really stumped as to what is stopping the timer, it's functionality is dead on the money and how I want it, but it just stops, always after almost exactly 20 minutes.

[Code]....

View 8 Replies

Security :: How To Find A Function That Runs Once

Feb 17, 2010

I want to have a function that runs once when a user logs into my system. It should run once everytime a user logs in. I don't handle my logins with Membership, just with Authentication. How do I accomplish this?

View 1 Replies

AJAX :: PopupControlExtender Animation Only Runs Once?

Feb 20, 2010

I use the PopupControlExtender to show a Panel after clicking a ImageButton. The Panel can be closed by clicking the page outside the panel. This is working fine.

I added an Animation Fading Out the Panel when the Panel is clicked (I have no button on the panel). This is working fine to.

The problem comes when I click the Imagebutton (The Panel appears) followed by clicking the Panel itself (The Panel disappears). If I now click the Imagebutton again, nothing happens as if the animation was not considered finished. The Panel should have appeared again.

If I change the focus on the page, then the animation is in some way reactivated and the popup works again. I already tried the following :

- <EnableAction AnimationTarget="ImageButton1" Enabled="true" />

- Setting the focus to a random control on the page using <ScriptAction />

Is there a way to reset the animation using Javascript ? Using "setValue(value);" ?

<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/App_Themes/Images/Vraagteken.gif" OnClientClick="return false;" UseSubmitBehavior="false" ToolTip="Kies de bedrijfs sector waarvoor de tekst is bedoeld" />

View 1 Replies

C# - Application Runs When Debugging But Not When Published

May 10, 2010

When publishing my web application and then running it will return the error

"Could not load file or assembly 'BaseApplicationName' or one of its dependencies. An attempt was made to load a program with an incorrect format."

However if I run the application through debugging (f5) it runs correctly.

I guess what it comes down to is

what differences are there when running an application through debugging vs publishing it that would cause a problem like this?

When publising I have it set to delete all existing.

History of how it started... I added the 32 bit Oracle.DataAccess dll to my 64 bit system. It would not work and crash giving the same error as above but with the Oracle.DataAccess name instead of the baseApplicationName. I have since removed all references to it and removed the dll to try and get it to run without it once again.

View 3 Replies

Change The Identity An Assembly Runs Under?

Nov 26, 2010

I have an assembly which I call from within my asp.net web site.

I want the assembly to run under a different user than the -windows authenticated - main site runs under.

The reason is, the assembly needs admin permissions - but I don't want the whole website/IIS to be running as an administrator.

Is this possible?

View 2 Replies

C# - Unable To Find DLL When Website Runs In IIS

Feb 9, 2011

When I run the website locally using my VS, everything works.

I am calling a function inside a dll using P/Invoke. DLL is in C++ and it works.

When I deploy the website on IIS, I get the error message Unable to load DLL 'SolvingProbelm.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

The dll resides inside the bin folder. App pool is Classic and .net 2.0

View 1 Replies

Finding The Server Spec. On Which Website Runs?

Sep 27, 2010

i need to find out what are the details of the processor the server has. i need to know which kind of processor, type of OS, RAM etc. i've got a reply from one webhosting company: "This is a shared hosting server, it is a dual processor (quad core xeon 2.8) 16Gb ram, mirrored 300GB SAS15k drives"how can i get those details on other servers without the webhosting company telling me?

View 1 Replies

If There Is A Return If Catch Block Will Finally Runs

Feb 9, 2010

is final run if htere is a return in catch blobk ?

example

try{

}catch(){[code]....

View 3 Replies

Static Field Initializer Runs Before Application_start, Sometimes?

Oct 29, 2010

I've got an ASP.NET web app that is starting to show some very strange behavior. Here's some example code:

// in Bar.cs
public class Bar {
public static Baz baz = Something.Step2();
}
// in Global.asax
public void Application_Start(...) {
Something.Step1();
}

The short version of the story is this: On some machines, Something.Step2 is executed before Something.Step1 and is throwing an unhandleable exception. On other machines, Step1 correctly executes before Step2. Global.asax and all the objects it uses do not refer to Bar at all.

When are static fields supposed to execute in relation to other programming elements? Why would two machines (both Win7 64-bit, both with .NET 4.0, same IIS version, etc) execute things in different orders? The order is consistent on each machine too. On my machine, it always executes Step2 before Step1, but on my coworker's machine it always executes Step1 before Step2.Update I've found the root cause why my static field is being accessed. Class "Bar" from my example is actually a custom authentication module, and is referenced in web.config as the Authentication handler under System.webServer. If I remove that line from web.config, my system calls Step1 first and never calls Step2 at all. My question changes subtly to: "Why does web.config cause my static initializers to fire, and why does it cause them to fire before Application_Start executes?"

View 1 Replies

DataSource Controls :: DTS Runs Manually But Not Scheduled?

Nov 15, 2010

I have a DTS package that runs fine manually but gives the follow error when I create a job for it:

DTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart: DTSStep_DTSExecuteSQLTask_2
DTSRun OnError: DTSStep_DTSExecuteSQLTask_2, Error = -2147467259 (80004005)
Error string: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Error source: Microsoft OLE DB Provider for ODBC Drivers
Help file:
Help context: 0

The package logs into a Teradata source and fill a local SQL table. That's it!

View 4 Replies

Table Row Onclick Event That Runs Codebehind?

Mar 24, 2011

I've inherited an ASP.NET project that has poorly designed HTML; in one section, the tags are wrapped with an tag to allow for "click the row to view the information" functionality. The code is:

<asp:LinkButton ID="ViewArticle" runat="server" CommandName="Navigate" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "id") %>' >
<tr runat="server" class="list_item">
<td>some data</td>
<td>some data</td>
<td>some data</td>.........

How do I go about tying a JavaScript "onclick" event to the codebehind?

View 2 Replies

SQL Reporting :: IE Error When Report Runs On Server?

Apr 5, 2010

I have made one report when i m opening this report in BI studio and run in debugging mode in BI it its displaying the report corretly, but when i have deployed the reports and run it through url, after selection of parameter and when i it runs then after some time its give me the error of INternet explorer send error report with the option of debug, when i select its open Visual studion debugging error screen to slect debugging engine.

when i select parameter for shorter time period, then the report is opening in url.

But if i give 1 yr time period, then its give me error, but the same duration im not getting error in BI Studio?

View 2 Replies

VS 2010 / DataGrid Update Command Runs Twice?

Aug 21, 2013

I have a page that has a datagrid on it and using inline update functionality and when I click the edit link, update text and click update link it updates fine but I put an email function in and I see two emails being sent. why it runs twice?

HTML Code:

<%@ Page Title="Courses" Language="VB" MasterPageFile="~/themes/admin.master" AutoEventWireup="false" CodeFile="courses.aspx.vb" Inherits="admin_courses" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphHeader" Runat="Server">
</asp:Content>

[code]....

View 4 Replies

DataSource Controls :: Getting Error : The Login Failed. Login Failed For User 'IIS APPPOOL V4.0'?

May 16, 2010

I am using SQLEXPRESS 2008 R2 and developing ASP.net 4 application. I am getting this error:

Cannot open database "mydbfile" requested by the login. The login failed.

Login failed for user 'IIS APPPOOLASP.NET v4.0'.

View 6 Replies







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