Security :: Code Returns Application Pool Custom Account
Oct 29, 2010
2 server web farm windows 2008 r2 nlb. In IIS I enable windows authentication all other authentication is disabled. Code behind
[Code]....
web.config
[Code]....
The code returns the application pool custom account e.g. DOMAINWebApp_user. What I want is the logged in user's username. How do I get this?
View 2 Replies
Similar Messages:
Mar 16, 2011
If I enable Anonymous in IIS under windows 2003, the ASP.NET will execute code under IUSR_XXX or account of application pool?
View 3 Replies
Mar 3, 2010
We have a website that calls a utility from the command line to create thumbnails places them in a directory and then the page will display the contents of this folder to the user.The utility seems to only work when we run the application pool under an administrative account, we have tried the network service, local system, and local service all to no avail.Just wondered if anyone had an opinion on how secure/unsecure it would be if we ran the website under the administrative machine account? Does this open up a massive secuurity hole etc is it that likely that we are comprimising the network.
View 3 Replies
Jun 15, 2010
I have a web service in which i am making connection to the database to get data..now i want that the app pool account should be used to make the connection and not the current user's credentials..can somebody tell me step by step what changes do i need to make like setting impersonation=true etc.
View 1 Replies
Nov 1, 2010
"My application (ASP.NET) writes certain files in folders on my servers. In IIS 6.0 I used to give write access to IUSR account so that IIS can write to the folder. Now what I see is my application pool runs under App Pool Identity account. That is good but users are able to create files in the folders without App Pool Identity user being given specific permission to do so.
View 2 Replies
Mar 4, 2010
Our application uses the Enterprise Library's PropertyProxyValidator class to validate user input (v4.1 - Oct 2008). On occassion, the code will raise an exception saying the source type cannot be found. This error persists until the application pools recycle at night, at which point everything works again. It tends to only affect one of the web front ends at a time (there are two). I tracked down where the exception was being raised, and this is the section of code:
[Code]....
(As you can see, the value for this.SourceTypeName is shown in the exception and I've checked that it matches exactly.)
We have never been able to reproduce this exception and at this point don't have any ideas left as far as causes. For a while, my suspicion was that it was related to the Temporary ASP.NET Files folder. The last time the error occurred, I copied that folder from both web front ends. Then the next day when things were back to normal, I copied the folders. When I did a directory and file comparision of the affected web front end, I found no differences.
Our application is essentially user controls hosted in web parts on SharePoint (they don't do anything with SharePoint - in fact, for a while, we were developing the controls on ASPX pages). There are two servers in the farm, both with Windows Server 2003 R2 Standard x64, IIS 6, and .NET v3.5. This issue doesn't strike me as a problem with Enterprise Library or SharePoint, hence why I've posted here, but more so with assembly loading.
Any ideas for causes would be greatly appreciated. I could also use suggestions on tools I could use to try and debug this when happens again (it happens 2-3 times a month) in production.
View 11 Replies
Aug 31, 2010
I have a requirement I should connect to MS SQL server under IIS Application pool account from ASP.NET application where Windows Authentication is enabled. I cannot use user name and password in connection string.
ASP.NET application should use Entity Framework 4.0 to work with data.
View 1 Replies
Aug 9, 2010
My website security is configured with "Windows Integrated Security" only (anonymous is disabled).
I also want to set a specific account to run the w3wp.exe process using the
Application Pool Identity to a domain account.
Running directly from the server works without any problem but from remote computers I always get the authenticaion window then the 401.1 error (after 3 attempts).
It seems that its the combination of "Windows Integrated Security" along with the "Application Pool Identity" that causes the problem. When I disable one of the two it works properly.
My server is Windows Server 2003 R2, running IIS 6.0.
View 1 Replies
Nov 3, 2010
How can i capture Application pool recycle event in asp.net c# code so that when recycle event occurs i can make a post back or refresh the page in the code ?. Our Application sessionstate mode is StateServer which helps me in not loosing the session data but still i need to refresh the page at server side only on this particluar event.The reason is at the client side javascript webform_DoCallBack doesnot fire when there is application pool recycle and thus website stops getting updates.we have a timer set to 15 minutes when webform_DoCallBack fires and fecthes updates for the page and displays it.
View 8 Replies
Oct 20, 2010
We migrated our web server to window server 2008, IIS 7.
We have single sign on application - that we login through one application called "users" and then no need to login to other applications, they all use the same machine key and cookie.
it works fine when all then applications under the same application pool.
but we have one application that is asp.net 2005. (the rest are asp.net 2003) the user application is in asp.net 2003 and that other application is in asp.net 2005.
so each application is in a different application pool. -
one pool to asp.net 1.1 and other pool to asp.net 2.
when I run the asp.net 2005 application
I get the login page and after I login I get the following errer:
HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested Url: /users/Unauthorised.aspx
Important: If I switch the "user" application (the login) to work under the same pool as my asp.net 2005 application, then it works fine with the asp.net 2005 application,but I get the above error for the asp.net 2003 applications
All this happened after we switched to IIS 7 Windows 2008, with IIS 6 it works great!
View 2 Replies
Mar 9, 2011
I am logged in as the administrator when I installed an application named pdflatex.exe on my server. This application works as a converter from LaTeX input file to Pdf file. I host an Asp.net MVC 3 application running under an Application Pool Identity with Load User Profile = True. The Asp.net MVC 3 code contains a code that executes pdflatex.exe using System.Diagnostic.Process instance as follows:
Process p = new Process();
p.EnableRaisingEvents = true;
p.Exited += new EventHandler(p_Exited);
p.StartInfo.Arguments = "-interaction=nonstopmode " + inputpath;
p.StartInfo.WorkingDirectory = @"c:mydomain.comworking";
p.StartInfo.UseShellExecute = false;
p.StartInfo.FileName = "pdflatex.exe";
p.Start();
p.WaitForExit();
From the scenario above, the web application runs under a restricted acount but it executes an external application under a default account that I don't know. Can an application running under a less privileged account start a process executing another application under an administrative account?
View 2 Replies
Jan 18, 2010
when ever i check User.Identity.AuthenticationType the returned string is 'Custom' always, doesn't matter my authentication type is 'Windows' or '''Forms'.
I want to do some different coding in aspx.cs for windows and forms authentication, but i am unable to differentiate between them because 'User.Identity.AuthenticationType' always returns 'Custom'.
View 3 Replies
Jan 14, 2011
I have a web application. This application needs to perform a search on folders located on 2 different machines. I can use impersonation for this. But -
a. I don't want to use network service account
b. I want to impersonate just the search part of the code.
c. Specifying encrypted user name / password in web.config is one option. But this would be the last option.
Can I use a custom service account for the application pool for this? If yes, then how to impersonate a specific part of code using this?
View 3 Replies
Sep 12, 2010
I have an application which is installed on local pc and is using SQL db. It is a client management system where I want to add capability to register new clients and give them access to my web site which is sharing the same SQL database with local application.
At the moment clients can register on the web site and I have ASP.NET authorisation system set up with aspnetdb_user, aspnetdb_membership and etc tables. But sometimes it happens that I need to register clients on my local application on PC and ideally would like that registration to create online account for the client as well. Then I want to be able to send him user id and password by email and let him know that he has been registered in my database and online account is ready for him as well.
Basically I want to have full synchronization between asp.net membership service and local application through SQL db. As I said both online and local apps are shareing the same SQL database. what would be the best practice to implement it.
View 1 Replies
Jan 5, 2010
Currently, on our production IIS web farm, we host about 15 applications in a single App Pool (Default App Pool). There are two websites and about 13 virtual directories.A colleague has recommended that we change our IIS configuration so each application is a separate App Pool (with identical settings).
Is there any drawback or potential issues to doing this?Is it possible that ASP.NET applications could have been built with the requirements that they are all within the same App Pool?
View 2 Replies
Aug 18, 2010
I'm trying to deploy an ASP.NET application using InnoSetup. I need to perform the following tasks:
Create an IIS application.
Create a new IIS application pool and set it's .NET version to 4.
Set the application pool of the new application to the new application pool.
I have found a script to create a virtual directory, but I need an application and application pool:
procedure CreateIISVirtualDir();
var
IIS, WebSite, WebServer, WebRoot, VDir: Variant;
ErrorCode: Integer;
begin
{ Create the main IIS COM Automation object }[code]......
View 2 Replies
Dec 16, 2010
I have created thread pool which have 5 threads. Both of them will start when my application start up. The problem is I created so many objects in thread loop call back function on each threads, and the memory is increase by second when app running, this is thread loop call back function:
void ThreadLoop(){
while(true){
var checkItems = _workItems.Where(w=>w.ActivedTime > 3).ToList();
foreach(var i in checkItems){
_workItems[i.Id].ActivedTime = 0;
_workItems[i.Id].ExecutePostBack();
}
//Recreate new _workItems dictionary
_workItems = _workItems.Where(w=>w.ActivedTime > 0).ToDictionary();
// Sleep thread to free up momory
Thread.Sleep(1000);
// Call Grab collector free memory
GC.Collect();
}
}
I'm confusing that, is calling GC.Collect() on each threads like that good or bad ? Dose it cause bad performence ?
View 3 Replies
Feb 24, 2010
I am obviously missing something here and it is driving me batty. I am trying to implement a custom role provider so that I can add some of my own custom code to it. I have created my CustomRoleProvider class, I have inherited the RoleProvider base class and implemented its members. I have made the required changes to my web.config so that my CustomRoleProvider is used. This is all working great.
All of this is wrapped up in a wrapper class as provided by the MVC Membership Starter Kit that I am using and wish to extend.
Now I want to add my own custom functionality.
When I add a function to my CustomRoleProvider I cannot see it or access it.
How do I add functionality to my CustomRoleProvider so that I can use it?
View 1 Replies
Mar 12, 2011
what is this error?how to handle it?Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
View 2 Replies
Feb 25, 2010
.NET application pool often overflowing. What Should I do for solving this problem? I am using singletton class for db connection. Also; My all db connection lines in using code block. So, it be dispose by .NET engine.
View 5 Replies
Sep 21, 2010
I have trawled the internet - to no avail. Woe is me.I have a .Net website running under a .Net framework 4.0 App Pool.The website references various assemblies that have been compiled for .Net 3.5.I have ensured that identical versions of the dll's and pdb's are in the bin folder of the the 3.5 code that I am trying to debug, and the reference path of the 4.0 web site. I.e. the code that I am trying to debug matched the assemblies that are loaded into the app pool's process.
When I attach the debugger using VS2008 with the solution for the .Net 3.5 code open, the breakpoints that I have set are marked as invalid (i.e. marked with an exclamation mark). When I hit refresh on a browser page that invokes the code that I am trying to debug, VS2008 raises an unmanaged code exception.I have researched In-Process Side-by-Side code execution, which is what is occurring in this instance, and is working very well; but for the life of me I cannot find any information on debugging in this scenario.It is not an option to convert the .Net 3.5 projects to use .Net 4.0, nor is it possible to convert them to use VS2010 and leave them targeting .Net framework 3.5
View 1 Replies
Feb 19, 2011
I am trying to build my own custom Membership Provider in an MVC 3 Web Application using C#.
Here is my code:
[Code]....
As you can see, I am just starting with it, and yet I've encountered problems. According to
this tutorial when I right click on MembershipProvider, I should get the option to [ Implement Abstract Class ], but I don't get that ! I am using Visual Studio 2010.
View 9 Replies
Feb 9, 2010
I have a custom role provider class that is currently being used by a web application. We are now in the process of migrating several windows applications from VB6 to VB.Net. From preliminary research, I understand that I can use the custom role provider in win forms as well and came across Client Application Services. I understand how the Client Application Services is setup, but can't seem to find how the custom role provider code will be shared between the web apps and the windows apps.
View 3 Replies
Jan 31, 2011
I'm having issues with an ASP.net site (framework 3.5, IIS6 ) having very slow 'first hit' response times. I'm guessing that the issue is to do with the app pool recycling and having to warm up.
I got to thinking. As part of the site I have a HTTP module that spins up a 'never ending loop' on a separate thread which periodically (every 5 seconds) calls an sproc on SQL to make sure the database is still there. I'm wondering if a similar approach might work to get the site to make an HTTP request to "itself" as a keep alive.
My question is, before I go and do this, can anyone think of any reason why it won't work? For example, something like "oh no... ASP.Net will figure out that you're playing with yourself and not go through the whole page lifecycle... etc etc".
View 1 Replies
Apr 15, 2010
I am asking this out of curiosity. I got the following error when this is not enabledAn attempt was made to load a program with an incorrect formatThis is related to loading a class library but this particular class library is compiled for any CPU with VS2010 64 bit running on Win7 64-bit
View 4 Replies