.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

Log file WSS_AdminService.log - can i delete it?

Posted By:      Posted Date: September 07, 2010    Points: 0   Category :SharePoint
Hi, I've noticed that the size of a file WSS_AdminService.log every user profile setting eg. in C:\Documents and Settings\Default User\Local Settings\Temp is about 2GB currently. I understand that this file is updated by wssadmin.exe (the Windows SharePoint Services Administration service). questions: 1. we have many users who are no longer using the account to login to the server, can i delete teh file then? 2. is there a way that i can allow only a single file WSS_AdminService.log in a specific user account to be access by wssadmin.exe? in this case we can save more HDD space. because, if we have more than 50 users account, then 50 * 2GB and it's already 100GB. instead of 100GB, can we just make it 2GB and this file is share by all the sharepoint users? thanks. Sam. Does anyone have any insight into how I might alter what is logged or how often, or even just to persuade it to 'housekeep' better, as the file continues to grow (reaching 750MB on the first server I noticed this on)? As far as I can see it is not related to the Diagnostic logging settings in Central Administration > Operations. Renaming the file to append a date on a regular basis is my current solution - a new copy is then created by WSS Admin on its next log cycle.

View Complete Post

More Related Resource Links

Programmatically delete a .webpart file from wpcatalogs folder from an IIS website


We are using a third party wsp in our solution which directly adds the web parts into the web application store rather than the web part gallery(References to them are present in IIS site's wpcatalog directory). We want to remove these web part files so that the users will not be able to add these web parts to pages directly. Or any other modification so that users will not be able to add these directly. Is there a way we can do this programmatically?

How to delete an image file assigned to a PictureBox xontrol ?

In a Windows form application, some image files are assigned to PictureBox controls. I am trying to delete those image files. The first approach [1] with "Image.FromFile" gives an error message of "Another process is using this image file", although "Image.Dispose()" is executed. The second approach [2] using "Image.FromStream" results (X) images for PictureBoxes and Buttons, if "fs.Close()" is inclided. Without "fs.Close()", it gives the same error message of "Another process is using...". How can I display images properly and delete those images files ? Thanks [1] pictureBoxSelected.Image = Image.FromFile(@actualImage); . . . pictureBoxSelected.Image.Dispose(); pictureBoxSelected.Image = Image.FromFile(@tempImage);                                                if (System.IO.File.Exists(actualImage) == true) {     System.IO.File.Delete(actualImage); } [2] FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read); pictureBox.Image = System.Drawing.Image.FromStream(fs); fs.Close();

How to delete a file which was accessed by other process ?

Does Windows have a "unlock object" method in order to delete a file which is being used by another process ? Thanks

delete a csv file created via StreamWriter?

I don't know if this is the correct forum.. but, is there a way I can automatically delete the following .csv file that was created via streamwriter (after it is viewed by an individual)?CODE (I would like to automatically delete the_filename.csv)://///////////////////////////////////////////////////////////////////////////////////////////////            string filename = "~/downloadfiles/data_complex987654321_filename.csv";             StreamWriter sw = new StreamWriter(HttpContext.Current.Server.MapPath(filename));             StringBuilder sb = new StringBuilder();            string filename = "~/the_filename.csv";            StreamWriter sw = new StreamWriter(HttpContext.Current.Server.MapPath(filename));            StringBuilder sb = new StringBuilder();

can not delete data file after emptying the file

hi, i have two data file groups. data and data_new. i moved all objects from file group data to data_new. i verified not a single object is there in data file group. i want to remove all files in file group data and and evantually filegroup as well. i am trying to delete the file present in this file group. but it is throwing error cant be deleted because file is not empty .any one plz suggest.

delete file from server

hello champs...i want to delete the folders present in server...but when writing  System.IO.File.Delete(Server.MapPath("~/uploads/loading.zip"))or directory.delete(path,true)it is giving error of permission denied...again if i manually change the permission of that folder for user type: users to modify,read,write full control then end user can delete the folder. how to solve it...pro grammatically

Session Expires on File Delete

Dear All, I am trying to delete Files and Directory through ASP.NET3.5 (C#)web application. But as soon as Directory\File is deleted It  automatically redirects me to Login Page. It means I am lossing my session on deleting File/Directory. Plz help me out.

How can i delete the file uploaded in my web page?

 Hi Experts. I am writing a simple web page that  users can upload an image file. After the file is uploaded, Users can fill up  other question in the web page. then users click the submit button to register them and the file is uploaded previously is move to special folder and is saved there. Know i want to delete the uploaded file if the user upload the file but dont click the submit button and close the web page. because i dont need the file uploaded until the user is not registered. I use Session_End event but i dont know why it dont work. With Regards. Mojtaba

Can't delete database-file

HelloThis has been driving me crazy all day and I've had to shutdown the website so I'm pretty stressed right now.I'm trying to delete ASPNETDB.MDF on a server but I keep getting the error "Cannot delete ASPNETDB: It is being used by another person or program". I've shut down both the website and the SQL Server service but the problem remains.I've also tried detaching it using 'sp_detach_db' but get:"CREATE DATABASE permission denied in database 'master'. An attempt to attach an auto-named database for file ASPNETDB.MDF failed. A database with the same name exists, or specified file cannot be opened".The server is running Windows Server 2003 and Microsoft SQL Server 2005 Express.Any suggestions?Thanks.

Delete file Asyncronously that is uploaded by AsyncUploader



Suppose after Uploading file,i want to delete a particular file ,for that i have added a link, that calls a Web Service method to delete file stored in DataBase. That link is added throug JavaScript in OnClientUploadComplete JavaScript function. And this Delete link calls another JavaScript function that in turn calls Web Service method. But that delete link should contain some specified arguments against which file has to be deleted. I am confused how to pass that argument to dynamically created Link.

Please help

Delete Image file from file system


Hi guys,

I have a web site that you can upload images, the image path is saved in the ImgPath field in the data database and retrieves the image and displays it in the grid view. I want to be able to delete the image from a folder within my project when I delete the record. I'm trying to delete it from the Detailsview_ItemDeleting event.

Thanks for you help .

how to do checkin,checkout,undocheckout,delete operations for sharepoint 2007 document library file


i hope your understood my problem...

please suuggest me with your coading skills.....

thanks & regards



SMTP Email delete file C#



I have a ASP.Net website in which an email has to be sent to user with an excel attached if the user requests.

The user provides the email address, when click on a button to send report, an excel report with the result set should be attached to the email and sent to user.

The excel report will be saved on the server and through SMTP, I'm senidng the report in email. After the email is sent I should delete the excel file created on the server.When I'm trying to delete I get the error, the file is being used by SMTP object (other process).

Is there a way that I can delete this file after the email is sent? Please help me.



Unable to delete mdf and log file from server cuteftp


I am using VS 2008 with SQL in express edition . I have made my website and hosted it on server with help of cuteftp .Now i want to change

the website so when i tried to delete all files the App_data folder does not delete .

So i am unable delete my mdf and log file which are in this folder. It says file error.

I always use SQL in design window in VS and know less of coding in SQL.

Please help me out .

Delete file after associated process ends


I'm not sure this belongs in the BCL, but I can't find a better place. I'm trying to write a snippet that downloads and shows files. The brief process is the following

1. Write the temp file (by StreamWriter, etc, not really important)

2. Open the file with the associated program by shell execute or show the Open As dialog if no program is associated.

var p = new Process();
bool err;
  p.StartInfo = new ProcessStartInfo(fileName);
  err = true;
if( err )
  var psi = new ProcessStartInfo("rundll32.exe");
  psi.UseShellExecute = false;
  psi.Arguments = "shell32.dll,OpenAs_RunDLL \"" + fileName + "\"";
  p.StartInfo = psi;

3. After associated program closes, delete the temp file (this is done by a background proc

spfile.delete gives file is checked out or locked for editing exception.


hello friends,

i have developed a custom webservice wherein i try to move the spfile within a document library between two folders. I tried with spfile.delete but it gives me exception.

System.Runtime.InteropServices.COMException (0x8107090E): The file is a user http://tsnt4-test/espis/Lists/TSAkJKDocuments/154545445-342423/abc.doc DMTSIT \ spospisilova checked out or locked for editing.

even when i try to use spfile.copyTo and spfile.moveTo it gives me the same exception

i used the following two approaches

  //Approach 1

Can't delete file


I'm trying to read a csv file. I'm also try to delete all files in the temp directory on the page load. Everything goes fine the first time, but the second time I get an error saying it couldn't delete the file because it is in use by another process. I'm aware that this process is my vb file, I just can't seem to find what I need to dispose of to get rid of the file lock. Can anyone help? Here is my code

Imports System
Imports System.Web
Imports System.Web.UI.HtmlControls
Imports System.IO
Imports System.Xml
Imports System.Xml.Xsl

Partial Class admin_Default
    Inherits System.Web.UI.Page

    Protected Sub submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles submit.Click
        'clear out the directory
        For Each s In System.IO.Directory.GetFiles(Server.MapPath("~/admin/temp/"))
        Next 'for each

        If (FileUpload1.HasFile) Then

            Dim name As String = FileUpload1.FileName.ToString
            Dim ext As String = System.IO.Path.GetExtension(FileUpload1.FileName)
            Dim fullPath As String = Server.MapPath("~/admin/temp/" & name)

            If (ext = ".csv") Then

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