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


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

The file or directory is corrupted or unreadable

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :Sql Server
 

Hi,

I have installed a two node active/passive sql 2005 cluster on windows 2003 in vmware workstation environment . the cluster installed successfully (configured the cluster according to the link "http://www.bradspace.net/blog/kb/?p=91&more=1&c=1&tb=1&pb=1"). but when I try to move sql server resource group to passive node, it gets fail by logging following error message in event log "initerrlog: Could not open error log file 'G:\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'. Operating system error = 1392(The file or directory is corrupted and unreadable.)."

I have taken sql resources group offline and manually moved only sql server shared drive to other node and i have found that i am not being able to access error log or any other folder including data on node 2. the operating system shows a error saying that disk is corrupted. I have run chkdsk which delete's all the files of sql setup.

I re-installed sql server, but again found the same problem . by wo


View Complete Post


More Related Resource Links

The file or directory is corrupted or unreadable

  

Hi,

I have installed a two node active/passive sql 2005 cluster on windows 2003 in vmware workstation environment . the cluster installed successfully (configured the cluster according to the link "http://www.bradspace.net/blog/kb/?p=91&more=1&c=1&tb=1&pb=1"). but when I try to move sql server resource group to passive node, it gets fail by logging following error message in event log "initerrlog: Could not open error log file 'G:\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'. Operating system error = 1392(The file or directory is corrupted and unreadable.)."

I have taken sql resources group offline and manually moved only sql server shared drive to other node and i have found that i am not being able to access error log or any other folder including data on node 2. the operating system shows a error saying that disk is corrupted. I have run chkdsk which delete's all the files of sql setup.

I re-installed sql server, but again found the same problem . by wo

Directory.Move leads to corrupted 'file'

  

Hello All,

 

I have earlier used Directory.Move to move one folder into an existing sub folder. The path I specified happened to have a slightly different case to the existing directory (temp vs Temp), and the result is two folders, one called temp the other Temp. Normally we can't do this through windows as it recognises the two folders to ultimately have the same name regardless of case. I expected the .NET class to handle in the same way.


I've deleted the original Temp folder, but this 'temp' directory still remains... it's recognised by Windows as a directory yet also reported as not existing! Whilst I could probably live with a redundant corrupt file somewhere on my disk it's really causing some problems with recursive functions that, like the rest of windows, get confused by the directory which exists but doesn't exist.

Has anybody had this same problem? Or rather, how can I fix this?

 

Running VS2008 on Win7.

 

Regards,

Chris


Get .doc or .docx file from Directory

  

Hi,

I want to get files(.doc,.docx) from Directory and show the Content with formatting in a webform.
Is there any solution?
Please help me.

Thanks in advance.


Directory lookup for the file failed with the operating system error 5

  
Hi I have a Windows desktop application that uses a SQLServer Express database.  The database files are downloaded from my website, followed by the application download (written in VBE).  The first procedure is to attach the database to the SQLServer instance from within the application. I have two test machines one runs Windows XP x84, the other Windows 7 x64.  I never have issues on attaching the database files in my test envirnoment but twice now other people downloading have got the following error System.Data.Sqlclient.sqlexception (ox 80131904) Directory lookup for the file C:\Documtents and Settings\Administrator\Desktop\Tem1.mdf failed with the operating system error 5 (failed to retrieve text for this error. Reason 1815) changed database context to 'master'. I'm not sure what the problem is and therefore how to correct the issue.  I attach the database in code using the create statement e.g. cmd7.CommandText = "USE Master CREATE DATABASE Tem1 ON PRIMARY (FILENAME = '" & DBFullPath & "') LOG ON (FILENAME = '" & DbLogPath & "') FOR ATTACH" Any help or suggestions would be very much appreciated. Chris    

how can i replace a file from a directory using file upload control and c# in a web applicatin

  
i m developing a web based appllication with asp.net and c#. I want to replace a file that is in a directory by code.

Creating Database gives error : "Directory lookup for the file "xxxxx.mdf" failed with the operating

  
Hello FriendsI am creating Database using SQLDMOcode is as follows... Code Snippet SQLServer2Class server = new SQLServer2Class();server.EnableBcp = true;server.Connect(WebConfigurationManager.AppSettings["ServerName"] ,WebConfigurationManager.AppSettings["UserName"],WebConfigurationManager.AppSettings["Password"]);DBFileClass dbFile = new DBFileClass();           dbFile.Name = dbName;          dbFile.PhysicalName = "C:\\" + dbName + ".mdf";          dbFile.Size = 300;          dbFile.FileGrowthType = SQLDMO_GROWTH_TYPE.SQLDMOGrowth_MB;          dbFile.FileGrowth = 25;          dbFile.PrimaryFile = true;          LogFile2Class dbLogFile = new LogFile2Class();          dbLogFile.Name = dbName + "_log";          dbLogFile.PhysicalName = "C:\\" + dbName + "_log.ldf";          dbLogFile.FileGrowthType = SQLDMO_GROWTH_TYPE.SQLDMOGrowth_Percent;          dbLogFile.FileGrowth = 10;          Database2Class newDb = new Database2Class();          newDb.Name = dbName;          newDb.FileGroups.Item("PRIMARY").DBFiles.Add((DBFile)dbFile);          newDb.TransactionLog.LogFiles.Add((_LogFile)dbLogFile);          server.Databases.Add((_Database)newDb); This Code Generates Following Error !!]Microsoft][ODBC SQL Server Driver][SQL Server]Directory lookup for the file "D:\Projects\my_system\mySys

FAQ: How do I listen to changes in a file/directory in the windows file system?

  
How do I listen to changes in a file/directory in the windows file system?Please remember to mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

DOCX FILE CORRUPTED WHEN RETRIEVED FROM SQL2005

  

I am saving .docx file to database,  the content type for .docx is :-application/vnd.openxmlformats-officedocument.wordprocessingml.document

but whil opening .docx file its giving error as

The file"abc.docx" cannot be opened because there are problem with content.

Details: The file is corrupt and can not be open.

but when chicking ok its opening the correct content.

My code is:

               Response.Clear();
                Response.AppendHeader("Content-Disposition", "attachment;filename=" + filename);
                Response.ContentType = contenttype;
                Response.OutputStream.Write(filedata, 0, filedata.Length);

Help!

Thanks


Writing File in Oracle to Secured Directory on NAS Server

  

I have a stored procedure that creates a comma delimited file. I can easily write to a directory on the database server, but I would like to write the file to a mapped network directory on a NAS server. The issue, at least conceptually (sorry for being a novice here), is that I have no way of accessing or embedding the necessary username/password to write to the specified directory.

Based on initial research, it looks like the oracle account is the one writing the file. Would that mean that the oracle account would have to have the appropriate privileges to the NAS directory? Who would that oracle user be? The niku account user being used to execute the proc?

Kind of lost here. Would like to send directly to the NAS to avoid an SFTP to another environment.



Why visual studio does not generate .vb file when, publishing project into normal directory other th

  

Hello,

I am using visual studio 2005,

When I publish my asp.net project into C:\Documents and Settings\temp\example, then it publish successfully,but into  C:\Documents and Settings\temp\example location , I dont see default.aspx.vb file. I do see Bin directory, PrecompiledApp.config file, webconfig file.

I am not sure , why it does not generate default.aspx.vb file (may be instead it is created PrecompiledApp.config file)

or is this because I am not publishing file into virtual directory.

Give me some advice on this.

Thank you

maxmax


Reading Data From File Gets Corrupted

  

I am reading data from a TXT file that requires me to replace some of the existing data, and then write it back to the file.  The issue is, there are special characters in the file that get corrupted when I write the text back to the file.

For example, I have a string in a file "foo.txt" that has the following "?rdrf  +À [HIGH]".  My application reads the text into a string, goes through the line and replaces [HIGH] with a value, and then writes back to the file.  The issue is, the special text characters get corrupted.

Here is an abbreviated version of the code base:

string fileText = System.IO.File.ReadAllText("foo.txt");
fileText= iPhoneReferenceText.Replace("[HIGH]", low);
TextWriter tw = new StreamWriter

I want SSIS to fire everytime a file is placed in a directory

  

I am slightly confused by this. I have setup a WMI file watcher on a directory which is designed to fire a data flow task and then delete said file each time I place a file in the directory.

 

However, when I run it in debug everything is fine, for the first run (the file is processed and then deleted). HEre is my problem, the WMI task, and my other task return with Success after processing the file meaning when I place another file in the directory (after the event) nothing happens?

Could someone explain what I am missing? I am quite confused.


File.Copy to Program Files Directory.

  
I searched high and low and have found some discussions on this topic but do seem to see any solutions.   So here is my issue.   I have an application that will copy 2 files to the Program Files directory.   What happen is, when I run it and the files exist (this should be what normally happens) I get accessed denied.   If I try to do a File.Delete (in code) first I get an access denied, however I can manually (in OS windows explorer) delete the files and then the copy will work.   I am running the application as Admin, so permissions to the folder are good.  

The application is restoring a 3rd party software file that tends to get corrupted a lot.   We have mechanism that will back this file up, but when I try to restore it I get the problem described above.   (not a file lock issue, I have made sure no programs have a handle to the file)

OS = Vista32
Program written in C#

Is there anyway of accomplishing this?

Thanks

Cannot move file from one ftp directory to another in .NET Framework 4.0

  

I'm in the progress of updating my C++ code from visual studio 2005 to visual studio 2010.  I've come across a problem where the FtpWebRequest class is unable to move a file from one directory to another directory on a ftp server when an absolute FtpWebRequest::RenameTo path is specified.

For example, I want to move the file, file.txt from source to destination as follows:
source: /working/
destination: /data/

An example of the code I use to handle this is below:

    Uri^ target = gcnew Uri( gcnew String("FTP://servername//working/file.txt"));
   
    FtpWebRequest^ request = dynamic_cast<FtpWebRequest^>(WebRequest::Create( target ));
   
    request->Credentials = gcnew NetworkCredential( gcnew String("username"), gcnew String("password") );


    request->EnableSsl = (ftpType == ftpTypeFTPS) ? true : false;
    request->KeepAlive = false;
    request->Method = WebRequestMethods::Ftp::Rename;
    request->RenameTo = gcnew String("/data/file.txt");
    request->GetResponse()->Close();


The problem is that FtpWebRequest treats the FtpWeb

404 - File or directory not found

  

hi,

i created a site using asp.net, i got hosting space and uploaded my files, as per my process i ll send the Email verification link to users mail id with link to my site, if they click the link they will directly redirect to my site's registration page.
it's working fine in my local iis and in visual studio, but in the host i'm getting error as  

Server Error
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

i don't know where the problem is the path is correct also i checked the spelling, could any one help how to fix the issue.

regards
Priya


File do exist in the output directory, But always FileNotFound Exception

  

Hi all,

I have a solution with several projects, some of them are C# whlie others are C++.net. the c++ projects are used as reference libraries for the c# projects.

the solustion can be complied and run well in 32-bit system, but when i built it in 64-win7, I  change all project to win32 platform.  when i managed to build the solution, and try to run  from one of the c# form appliction project which depend on on c++ project, there alway throw fileNotFoundException as follow:

System.IO.FileNotFoundException was unhandled
  Message=Could not load file or assembly 'CvAdapter.dll' or one of its dependencies. The specified module could not be found.
  Source=GraphicResarch
  FileName=CvAdapter.dll
  FusionLog=""
  StackTrace:
       at GraphicResarch.DisplayForm..ctor()
       at GraphicResarch.Program.Main() in D:\Develop\Code\AIStudio\AISeeStudio\GraphicResarch\Program.cs:line 18
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at

Categories: 
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