.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

ASPNET locked out

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :ASP.Net


I have a web service.  When called, the web service creates a folder and files on another specified server in our network.  When the command executes, I keep getting a crash.  Basically, it says the ASPNET account is locked out.  I unlock it and try again.  Same thing.

I tried using impersonate in the web.config, and it still tried to get into the server as ASPNET.

The web server hosting the web service has Anonymous access enabled, allows the IIS to control the passworld, and also has intergrated Windows Authentication checked. 

This is a test.  I am running the service on my XP machine local IIS and the target drive is D: (secondary) drive on a 2003 server on the network. 

I've tried three versions of the impersonate set up.  It keeps getting sent over as ASPNET.

<authentication mode="Windows"/>
<identity impersonate="true" />


<authentication mode="Windows"/>
<identity impersonate="true" userName="xxx" password="xxxx" />


<authentication mode="Windows"/>
<identity impersonate="true" userName="Domain\xxx" password="xxxx" />

View Complete Post

More Related Resource Links

SmtpClient and Locked File Attachments

Got a note a couple of days ago from a client using one of my generic routines that wraps SmtpClient. Apparently whenever a file has been attached to a message and emailed with SmtpClient the file remains locked after the message has been sent. Oddly this particular issue hasn't cropped up before for me although these routines are in use in a number of applications I've built.

No ASPNET User in Windows Server 2008?


I have been looking everywhere online regarding this, but have not found a clear answer.


I have an ASP.Net app running on Windows Server 2008, it's basically a reporting app using Crystal Reports. I have encountered a roadblock in regards to rendering some pages. When I run the app in Visual Studio(on the same 2008 machine) everything works perfectly. Yet when I publish it and run it live the reports will not display correctly, I get a message saying Failed to render page.


I looked this error up in the Crystal Reports website and the fixes they have there refer to giving the windows "aspnet" user full access rights to certain folders on the machine. I would be happy to do this, however there is no aspnet user in Windows Server 2008.


I installed the server and set its role to be Web Server. I also checked all the options regarding ASP.Net and IIS 6 compatibility. Yet there is no ASPNET username anywhere.


Did I set the server up wrong? or do I have to do something within ASP.Net to  create this user and then give it rights? 

.AspNet-Menu-Selected Problems


I am trying to have the selected item in the menu be noticeable different than the other items.  I am able to change the border as in the samples, but nothing else. I would like the selected font color to change as well as the background image / color.  Here is a sample page and style sheet.  Any help is greatly appreciated.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
    <link href="MainStyle.css" rel="stylesheet" type="text/css" />
    <form id="form1" runat="server">
    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%">
                    <!-- Indention Pushes First Link Over -->

Migrating aspnet tables to dev server - having issues



We're trying to migrate a one of our apps to our dev server for testing and development, but we're having problems with the membership functionality. We can add users, but there seems to be a disconnect with roles. We can query the aspnet_users table and find the new user in there, but when we query the aspnet_usersinroles table, that user id is not present.

We're also unable to run the Roles.GetUsersInRole("somerole") method. It returns 0 records. When I run Roles.ApplicationName, it returns the correct name, so .NET should be passing the correct app name.

We're just a little baffled. If anyone could shed some light on what could be the issue, we would appreciate it.

Thanks! :)

Documents becoming "locked for editing" by self, when no other edits are happening


On our SharePoint 2007 SP1 farm, intermittently, when a user opens a Microsoft Office document (usually Excel) for editing by single-clicking its name in IE, the following error dialog mysteriously occurs when Office opens:

File in Use
myfile.xlsm is locked for editing
by 'domainname\yourname'
Open 'Read-Only' or click 'Notify' to open read-only and receive notification
when the document is no longer in use.

The problem is, nobody else is editing this document, and the identified user ('domainname\yourname') is the name of the current user (the person opening the document right now)!

This is not "user error", e.g., the same user editing the file from two different computers, or the file being checked out. This is a real, intermittent problem. If the same user opens the same file again 1 minute later, the problem might be gone, even though nothing changed.

It's almost as if some kind of intermittent race condition is happening, where the document gets locked too early...?

We are completely stumped. Any ideas?

Other details:
- SharePoint servers (1 front-end, 1 query, 1 indexing) are all Windows 2003 Server
- SQL Server 2008 on database server
- Clients are mostly Windows XP
- Our versioning model is:
--- Content approval: not required

blackberry + aspnet


Hi guys

This is my first post in the mobile development forum, I would like to develop an application targeted to nokia and blackberry. (web applications)

My development platform is Visual Studio 2010 and Sql Server 2005 express (vb.net) and OS is windows 7.

Where can I find some mobile controls to use in my applications, I would need a datagrid also. I noticed Visual Studio does not have this feature but I remember it being there in VS2005. Can i download them from somewhere or can i use the normal controls when developing a web form?



how change the direction of AspNet-Menu-Horizontal

 .PrettyMenu .AspNet-Menu-Horizontal{ direction :rtl; } ????

Delete users from ASPNET DB if it exist

Good day! We have Sharepoint 2010, SQL 2008, FBA. All works well! I try to create windows form with many functions one of which is to create and delete users from aspnet database. I make a code for users creating. Now I try to write a code for users deleting. Here it is: private void Delete_Click(System.Object sender, System.EventArgs e) { string userName = string.Empty; string Status = string.Empty; int cnt = 0; if (MessageBox.Show("You are about to delete " + UsrName.Text + ". Are you sure you want to continue?", "Delete Users", MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.No) return; try { //delete the user userName = UsrName.Text; Membership.DeleteUser(userName, true); } catch (Exception ex) { cnt += 1; Status += ex.Message; } if (cnt == 0) { MessageBox.Show("User was deleted successfully. ", "Users Deleted", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("There were errors deleting user: " + Status, "Error", MessageBoxButtons.OK, MessageBoxIcon.Information); } } If I delete existing users all works fine. If I try to delete unexisting users I have the message which is in last statement. How can

Transaction (Product Id 54) was dead locked

Hi,    I am using sql server 2005 express edition. The database is filled up to 700 MB. it is giving error like "Transaction (Product Id 54) was dead lock resources with another process and had been chosen as dead lock victim returns transaction." I am getting this error for this we are restarting sql server. Then it is working fine for 2 hours after that it is giving same error with diferent product id like 59 etc.   our clients nearly 1000.   I didn't  find what is problem.   Please solve my problem. Because my application in production.     Thanks in Advance.      

New website default to ASPNET 2.0? IIS 6

My Goolge-fu has failed me. My Win2k3 server is running IIS 6. When I create a new website, it always defaults to ASPNET 1.1 and I have to change it over to use v2. Is there a way to set the default version to 2.0? Under the ASPNET tab in the properties dialog for the "Web Sites" node, the Dropdown for ASPNET Version is greyed out and set to 1.1.4322 and all the existing websites are set to 2.0 already.It's not a big issue, but kind of a pain. Any help is appreciated.

The document is locked for editing by another user" error message when you try to open a document in

We recently made checkin/out required for editing documents. So when ever a user uploads a document and when he tries to edit the document on clicking it by the same user. Its says 

The document is locked for editing by another user" error message. 

I don't know why this is happening. If you guys know anything about this message. Please let me know.

Migrating ASPNET Role/Membership Database to New Server



I have an existing ASPNET role/membership database created on SQLExpress 2005 (WIndows 2003 Server). I created it under the .NET 3 framework many years ago using the aspnet_regsql.exe application in full GUI mode. 

I am setting up a new Windows 2008R2 server with .Net Framework 4 and SQL Server 2008R2. I don't want users to have to recreate accounts or create roles, etc.


1. Should I backup the current database and import it into the new system, and if so do I even need to use the aspnet_regsql.exe application. (If so which version do I use, different aspnet_regsql.exe files exist in different directories (i.e., FrameWork, FrameWork64)

2. Should I just run aspnet_regsql.exe on its own and then somehow try to import the current data into those tables.

I am concerned that if I just import somehow the roles within SQL server will not be created properly. 

thanks in advance,


Client image files uploaded to Server are staying locked when accessed again.


I have a web form that, upon user request, uploads an image file from the client to a server folder, makes a thumbnail and saves to another folder than sets an imageurl of an image control to that thumbnail. All fine up to here, problem is that at times (not always but could not find the exact pattern) when uploading an existing file, it throws a ' ... file used by another process ... ' error, both on the original image file and the created thumbnail. Is there a way to prevent the locking of these files or alternately, which object need I destroy to release the image file and avoid these contentions? I do destroy the image object immediately after thumbnail is created. Ideas anyone?

SQL 2005 not updating and appears locked?


Hi All,

It appears my SQL server is locked up. The symptoms are:

Windows Automatic Update fails with error code 737D

Outlook opens but I cannot send/receive and last read email won't de-highlight as if outlook cannot change file. When I even right click and mark as read I get an error saying the pst file is already in use.

Another software I use (Mamut Accounts) which also uses sql server won't open it's file either.

I went to the User folder and see a lock symbol over the yellow folder icon. I'm not sure if this has always been there or just since this problem.

I am using Windows 7 with Office 2007. And it appears I have SQL2005 I have already gone through the Windows advice here:


However, in my running of this instruction it never comes up with 'complete suspended installations' as an option. I only have the option to change or remove.

Any help would be gratefully received as I can't do anything at the moment and need to access email.

Thanks :-)

AspNet Membership Login Stoped Working !!!


Hello all

I have a web app that uses the Membership Provider to authenticate users.

Everything worked fine until today... when I tryed to log in it failed.

I looked in the database if something went wrong there and the user is deleted but everything looks fine there.

I tryed to recover the password using the user name and i got an error that the user is not recognized.

I tyed to recover the password (even though I am sure what the password is) but still no luck... (I get an error that hased passwords can not be decrypted)

I triyed it in local host and guess what ... still the same...

this is the provider section in my web config

    <membership defaultProvider="SqlMemberShipProvider">
        <remove name="SqlMemberShipProvider"/>
        <add name="SqlMemberShipProvider" 

Any i

Fried My Server! Sa Acct Locked Out


Ok, I was testing something on one of my servers and made the mistake of setting the default database for sa to a user database rather than master.  I changed it back in SSMS under Security/Logins/sa, by choosing master from the default db pulldown.   I thought this fixed it, but apparently not.

A little bit later I delete the user database that I had previously set as the sa default.  Now, everything I try to do I get "Cannot open user default database...login failed for user sa".  If I shut down SSMS, I can only reconnect by choosing "master" as the default db.   But even once in, I can't perform any actions without getting the error msg above.

I tried running the following query to fix it:


And a:

exec sp_defaultdb 'sa', 'master'

And even a:

EXEC sp_change_users_login @Action='Auto_Fix', @UserNamePattern='sa', @Password='fof!master0'

In case this was some user/login orphan issue.  No go.

This is SQL 2005.   I'm sure there is some easy fix, but its beyond me.  Can anyone help?




ASPNet Security confusion


I am trying to leverage the ASPNet security model but I am running into some confusion. 


I am using the Membership object to create users, how do I associate a user with a particular Application?  I see there is an ApplicationName property, would i set this before createUsers to associated the created users with an application? 

I am using the Business Template Silverlight template and the template comes with a login field.  I need a way to for a user to use that login but be associated with a particular Application.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend