Visual Studio 2010 permissions on files - c#

There is a small program which is supposed to open file and then output it to console adding line numbers. The problem is that no matter whether program is run from command console of from IDE it throws exception regarding file permission.
I moved both executable and the file which is supposed to be read (simple TXT file) to several directories (my document, temp, etc) run console as Admin, run Visual studio as admin, gave all permissions to both files, but it always throws exception. The strangest thing is that a week or two ago I fund solution by trial and error but but I can' remember it.
Here is exception:
Exception: System.UnauthorizedAccessException: Access to the path 'C:\Users\Nena
d\documents\visual studio 2010\Projects\Listing 10.6\Listing 10.6\bin\Debug\prog
ram.cs' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, I
nt32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions o
ptions, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolea
n useLongPath)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean
bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at ListFile.Main(String[] args) in C:\Users\Nenad\documents\visual studio 201
0\Projects\Listing 10.6\Listing 10.6\Program.cs:line 22
Press any key to continue . . .
Here is code:
// ListFile.cs - program to print a listing to the console
//-----------------------------------------------------------
using System;
using System.IO;
class ListFile
{
public static void Main(string[] args)
{
try
{
int ctr = 0;
if (args.Length <= 0)
{
Console.WriteLine("Format: ListFile filename");
return;
}
else
{
FileStream fstr = new FileStream(args[0], FileMode.Open);
try
{
StreamReader t = new StreamReader(fstr);
string line;
while ((line = t.ReadLine()) != null)
{
ctr++;
Console.WriteLine("{0}: {1}", ctr, line);
}
}
catch (Exception e)
{
Console.WriteLine("Exception during read/write: {0}\n", e);
}
finally
{
fstr.Close();
}
}
}
catch (System.IO.FileNotFoundException)
{
Console.WriteLine("ListFile could not find the file {0}", args[0]);
}
catch (Exception e)
{
Console.WriteLine("Exception: {0}\n\n", e);
}
}
}

Check one of these possibilities:
File is not open in any other window/application
Run your applications .exe file as Administrator (optional extra, enable UAC so that you will see the request that the application requires elevated privileges and to explicitly give them, in Windows8 disabling UAC only hides these popups but that doesn't mean the application will have elevated rights so be careful if using Win8)
Manually set read rights to Everyone for that file
Check that the file is not in a special folder (but i think you already did that, but just to be sure create c:\temp and put it there)
CAUTION - The exception shows that there was a problem accessing C:\Users\Nena
d\documents\visual studio 2010\Projects\Listing 10.6\Listing 10.6\bin\Debug\prog
ram.cs not the a simple text file!!!
Be careful you may be providing a wrong path in your code by accident. And the Users folder is a special folder which requires elevated privileges to access, so better move the whole executable + readableFile to an ordinary folder where it will not encounter problems (like the c:\temp i mentioned above)

Related

Launching linux process from asp.net core application fail (file not found)

I am creating an app in asp.net core that is run in a linux docker container using visual studio on windows. This app launches a different process depending on what platform it is on with Process.Start(). Currently, the process is launched correctly when run on my local windows machine, but when I switch to linux container I get this error (even tho both files I am attempting to launch are stored in the same directory). I did a check with File.Exists(processPath) and it shows that the file does in fact exist, but when the process is launched the Interop.Sys.ForkAndExecProcess() method seems to throw "No such file or directory" when it actually tries to launch the binary.
Unhandled Exception: System.ComponentModel.Win32Exception: No such file or directory
at Interop.Sys.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setUser, UInt32 userId, UInt32 groupId, Int32& lpChildPid, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean shouldThrow)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
Here is the code
var assemblyFileInfo = new FileInfo(typeof(TemplateClass).Assembly.Location);
var rootDirectory = Path.Combine(assemblyFileInfo.DirectoryName, "HelmExecutables/Data/");
var processPath = "";
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
processPath = Path.Combine(rootDirectory + "helm_windows.exe");
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
processPath = Path.Combine(rootDirectory + "helm_linux.out");
}
var process = new Process();
var startInfo = new ProcessStartInfo();
startInfo.FileName = processPath;
process.StartInfo = startInfo;
process.Start();
One thing that came into my mind looking your code is processPath can be just an empty string if both RuntimeInformation.IsOSPlatform(OSPlatform.Windows) and RuntimeInformation.IsOSPlatform(OSPlatform.Linux) are false.
What I would do is check if RuntimeInformation.IsOSPlatform(OSPlatform.Linux) is true when the code runs in the docker image.
After that, I would Console.WriteLine(processPath) (or get the value of processPath in any other way) and try to start that executable from the command-line manually and see what happens.

Unable to execute TekRadius CLI from C#

TekRadius is a Radius server that I want to access through my ASP.NET application. I first tried to execute TekRadius CLI directly using C#. But it didn't worked. Now I am trying to execute it through CMD by calling it in C# code like this:
System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
startInfo.UseShellExecute = false;
startInfo.RedirectStandardOutput = true;
startInfo.RedirectStandardError = true;
startInfo.CreateNoWindow = true;
startInfo.FileName = "cmd.exe";
startInfo.Arguments = "/C \"c:\Program Files (x86)\TekRADIUS LT\trclilt.exe\" -u " + username + " " + password;
process.StartInfo = startInfo;
process.Start();
string line = "";
while (!process.StandardError.EndOfStream)
{
line = line + "\n" + process.StandardError.ReadLine();
}
File.WriteAllText(HttpContext.Current.Server.MapPath("~\\error.txt"), line);
TekRadius is working fine when executed directly through CLI or GUI or through Visual Studio's Internal Server. But on main server my custom error log error.txt is showing this error:
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.UnauthorizedAccessException: Access to the path 'C:\Windows\TEMP\System.Data.SQLite.dll' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)
at ????????????????????????????????????????.????????????????????????????????????????(String , String )
at ????????????????????????????????????????.????????????????????????????????????????()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at ????????????????????????????????????????(String[] )
TekRadius CLI uses SQLLite for storing its username and password. And I know its the TekRadius that is unable to access 'C:\Windows\TEMP\System.Data.SQLite.dll', not my application because I am using SQL Server and my above C# code is not making any attempts to access database. I am using Windows Server 2012 R2 and I am also unable to set new permissions on Windows folder. Please tell me what can I do to give access to this location to TekRadius CLI?
Finally after 12 hours I was able to solve it by myself. Solution was to give full control to ISS_IUSRS for System.Data.SQLite.dll in C:\Windows\Temp folder. Also, do the same for c:\Program Files (x86)\TekRADIUS LT\trclilt.exe.

File in use by another process error when uploading a file using server but not localhost

I am fairly new to MVC and .NET, and I've hit my first problem that I have been stuck on for 3 days now. I apologize for the lengthy post.
Part of the project I am working on requires that the user be able to select an XLS or XLSX file and upload it so the data can be imported by the application. It is likely the files being uploaded will have upwards of 20,000 rows of data.
I have test files with 5000, 10000, and 20000 rows in them. When I run my app on my local machine (using Visual Studio 2010), all of these files get saved to the network share and processed just fine. No errors. However, when I deploy the app to our development server, I get an error after 5 minutes that the 10k and 20k file cannot be accessed because it is in use by another process.
Error message: The process cannot access the file 'removed this part of path\TestBook-10k-rows.xlsx' because it is being used by another process.
Stack trace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at System.Web.HttpPostedFile.SaveAs(String filename)
at System.Web.HttpPostedFileWrapper.SaveAs(String filename)
at edtStar.Controllers.TableController.Import(HttpPostedFileBase UploadFile, FormCollection collection) in <removed this part of the path>\TableController.cs:line 392
The 10000 row file is 304KB in size, and I have the length limits set as follows in my web.config:
<httpRuntime
maxRequestLength="4096"
requestLengthDiskThreshold="1024"/>
I can't find anything special about 5 minutes, but it is always returning the error 5 minutes after I start the upload.
I have tried this with Chrome and IE. Both work via localhost, neither work via our dotnet app server.
The stack trace says it is blowing up on the SaveAs() method, but I can see the file on the network share location and the size matches.
After saving the file, I have to read it and return the data to a new view. There is a fair amount of processing being done on the data before returning it to the view, which is where I would expect to wait 5 minutes or more. After I'm done reading the file, I close the connection and delete the file from the network share. The file gets deleted shortly after I get the exception, too. The file does not exist when I start each upload.
I am the only person working with this application right now as it is still in development. I do not believe anyone else is accessing the saved copy on the network share while I am doing my testing. I can consistently reproduce this issue but I have no idea why it is happening.
Has anyone seen anything like this or have any suggestions for me? My guess is there's a setting somewhere on our app server but I haven't been able to pinpoint it.
Thanks!
Edit:
Here is the code that is handling the file upload.
// Validate, save, and read the selected file.
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Import(HttpPostedFileBase UploadFile, FormCollection collection)
{
// Do some initial file validation - removed
string filePath = Path.Combine(EDTConstants.NETWORK_SHARE_PATH, Path.GetFileName(UploadFile.FileName));
try
{
// Do some validation on the file that was uploaded.
if (UploadFile == null)
{
// return an error here - there was no file selected.
}
if (UploadFile.ContentLength == 0)
{
// return an error here - the file is empty.
}
if (!filePath.ToUpper().EndsWith("XLS") && !filePath.ToUpper().EndsWith("XLSX"))
{
// return an error here - the file extension is not supported.
}
// Things are good so far. Save the file so we can read from it.
UploadFile.SaveAs(filePath);
DataSet fileDS = new DataSet();
string connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + filePath + ";Extended Properties=\"Excel 12.0;HDR=YES;\"";
using (OleDbConnection conn = new OleDbConnection(connString))
{
conn.Open();
using (DataTable dtExcel = conn.GetSchema("Tables"))
{
// ... a bunch of code removed ...
}
conn.Close();
}
CloseFile(filePath);
}
catch (Exception e)
{
// Unexpected error
EDTUtils.LogErrorMessage(EDTConstants.TABLE_IMPORT, User.Identity.Name, e);
ViewData[EDTConstants.SSN_VD_ERROR_MSG] = EDTConstants.EM_UNEXPECTED + System.Environment.NewLine + e.Message;
ViewData[EDTConstants.VIEWDATA_FILE] = UploadFile.FileName;
CloseFile(filePath);
return View(tab);
}
// Closes a file - logs errors but does not throw any exceptions.
private void CloseFile(string filePath)
{
try
{
System.IO.File.Delete(filePath);
}
catch (IOException ioe)
{
EDTUtils.LogErrorMessage(EDTConstants.TABLE_IMPORT, User.Identity.Name, ioe);
}
}
I do see the same error logged, once when doing the SaveAs() and then again when doing the Delete. It's weird, though, the file does go away. It's almost like the app server has another thread trying to do something during this process, and that doesn't happen on localhost.
Edit
After I changed the executionTimeout value, I noticed that Chrome said "Uploading 79%..." at the 5 minute mark, then the file disappeared on the network share, then reappeared, and then after a minute or two, Chrome said the page was not available, with "Error code: ERR_INVALID_RESPONSE". The file has not been deleted from the network share yet. In IE, I am asked to log in to the app again at the 5 minute mark.
maxRequestLength is specified in KB but requestLengthDiskThreshold specifies the limit for the input stream buffering threshold, in bytes.
Therefore you need to change requestLengthDiskThreshold to 543744 (531KB x 1024)
Also check any of the following settings that apply to your scenario
<httpRuntime
executionTimeout = "HH:MM:SS"
maxRequestLength = "number"
requestLengthDiskThreshold = "number"
useFullyQualifiedRedirectUrl = "[True|False]"
minFreeThreads = "number"
minLocalRequestFreeThreads = "number"
appRequestQueueLimit = "number"
enableKernelOutputCache = "[True|False]"
enableVersionHeader = "[True|False]"
apartmentThreading = "[True|False]"
requireRootedSaveAsPath = "[True|False]"
enable = "[True|False]"
sendCacheControlHeader = "[True|False]"
shutdownTimeout = "HH:MM:SS"
delayNotificationTimeout = "HH:MM:SS"
waitChangeNotification = "number"
maxWaitChangeNotification = "number"
enableHeaderChecking = "[True|False]"
/>
Maybe a timeout is happening for the request, and the file is kept by the upload process and in the next attempt is still busy.
I suggest you delete any of the uploaded files, recycle you application pool, set a executionTimeout in the httpRuntime settings and try again.
The details of the httpRuntime settings are here
http://msdn.microsoft.com/en-us/library/e1f13641%28v=vs.85%29.aspx
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Import(HttpPostedFileBase UploadFile, FormCollection collection)
{
// Do some initial file validation - removed
string filePath = Path.Combine(EDTConstants.NETWORK_SHARE_PATH, Path.GetFileName(UploadFile.FileName));
try
{
// Do some validation on the file that was uploaded.
if (UploadFile == null)
{
// return an error here - there was no file selected.
}
if (UploadFile.ContentLength == 0)
{
// return an error here - the file is empty.
}
if (!filePath.ToUpper().EndsWith("XLS") && !filePath.ToUpper().EndsWith("XLSX"))
{
// return an error here - the file extension is not supported.
}
// Things are good so far. Save the file so we can read from it.
UploadFile.SaveAs(filePath);
DataSet fileDS = new DataSet();
string connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + filePath + ";Extended Properties=\"Excel 12.0;HDR=YES;\"";
using (OleDbConnection conn = new OleDbConnection(connString))
{
conn.Open();
using (DataTable dtExcel = conn.GetSchema("Tables"))
{
// ... a bunch of code removed ...
}
conn.Close();
}
}
catch (Exception e)
{
// Unexpected error
EDTUtils.LogErrorMessage(EDTConstants.TABLE_IMPORT, User.Identity.Name, e);
ViewData[EDTConstants.SSN_VD_ERROR_MSG] = EDTConstants.EM_UNEXPECTED + System.Environment.NewLine + e.Message;
ViewData[EDTConstants.VIEWDATA_FILE] = UploadFile.FileName;
}
finally
{
CloseFile(filePath);
}
//you were only returning in the CATCH ?
return View(tab);
}
Also check that there is no ANTIVIRUS trying to scan the files that you just uploaded

Send mail with attachment C#

I am writing an application that is supposed to send an email, with up to 3 attachments.
It is just a really simple web form, with 3 FileUpload controls to browse the possible attachments.
The application is deployed in a webfarm and of course runs on server-side.
I managed to make it send the emails, but I am having problems with the attachments. Right now, I am using this procedure to attach the files:
if (fuAttatchment.HasFile)
{
fuAttatchment.SaveAs(Server.MapPath(fuAttatchment.FileName));
MyMessage.Attachments.Add(new System.Net.Mail.Attachment(Server.MapPath(fuAttatchment.FileName)));
filesize += fuAttatchment.PostedFile.ContentLength;
}
The error I am getting once I submit, is the following:
Send failure: System.UnauthorizedAccessException: Access to the path 'E:\Inetpub\IS\MSTicketRequest\wallpaper-3010.jpg' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode) at System.Web.HttpPostedFile.SaveAs(String filename) at System.Web.UI.WebControls.FileUpload.SaveAs(String filename) at MSTicketRequest.WebForm1.btnSubmit_Click(Object sender, EventArgs e) in C:\Users\ggruschka\Desktop\ggruschka\MSTicketRequest\MSTicketRequest\Default.aspx.cs:line 54
I have not been able to figure out why is this happen, probably I am missing something regardin security policies or something like that.
Thank you very much in advance for your help !
instead of this:
fuAttatchment.SaveAs(Server.MapPath(fuAttatchment.FileName));
MyMessage.Attachments.Add(new System.Net.Mail.Attachment(Server.MapPath(fuAttatchment.FileName)));
do this:
fuAttatchment.SaveAs("somewhere local"+fuAttatchment.FileName);
MyMessage.Attachments.Add(new System.Net.Mail.Attachment("somewhere local"+fuAttatchment.FileName));
you don't need to be saving the attachments on the server!
Looks like the user that the site is running under doesn't have access to write to the target file path. Check the directory's security permissions and make sure the IIS user has write access.
Depends on what type ur application pool is. But if it is networkservice you gotta add networkservice.IIS_Users for ApplicationPoolIdentity but I'm not sure on this one.
http://www.windowsecurity.com/articles/understanding-windows-ntfs-permissions.html
If that doens't help you can try to remove the read only option.
You an send email via your gmail account. Here is how to do it (I dunno if it helps).
1. You need textbox where you are going to upload attachment.
2. Button 'Browse', and 'OpenFileDialog1'. In button 'Browse' you put this
private void btnBrowse_Click(object sender, EventArgs e)
{
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
txt_attachment.Text = openFileDialog1.FileName;
}
}
You need button 'Send with an attachment' in which you place this:
MailMessage mail = new MailMessage(txt_gmail.Text, txt_to.Text, txt_subject.Text, txt_body.Text);
mail.Attachments.Add(new Attachment(txt_attachment.Text));
SmtpClient client = new SmtpClient(txt_server.Text);
client.Port = 587;
client.Credentials = new System.Net.NetworkCredential(txt_gmail.Text, txt_password.Text);
client.EnableSsl = true;
client.Send(mail);
MessageBox.Show("Mail sent", "Succes", MessageBoxButtons.OK);
foreach (Control control in this.Controls)
{
TextBox box = control as TextBox;
if (box != null)
{
box.Text = "";
}
}
}
an the last thing (because when you do this it will show some errors) you need to create Gmail.dll file. Here is the link ho to do it:Here you can create Gmail.dll
I hope this helps.

Windows Phone 7: SQLite

I'm trying to get Community.Csharp working with Windows Phone, I've tried using both the version from http://wp7sqlite.codeplex.com/ and compiling the main trunk with the WINDOWS_PHONE flag, but when I run the application on the phone I get an error when trying to execute any queries (but not when opening the database; only on queries): "Unable to open database file"
_conn = new SqliteConnection("Version=3,uri=file:recipes.sqlite");
_conn.Open();
cmd.CommandText = "SELECT * FROM recipes";
SqliteDataReader reader = cmd.ExecuteReader();
Interestingly though, I'm using the following to check for the existence of a table and no exceptions are thrown:
cmd.CommandText = "SELECT * FROM sqlite_master WHERE name='" + tableName + "'";
SqliteDataReader rdr = cmd.ExecuteReader();
exists = rdr.Read();
rdr.Close();
I have a Windows app which uses SQLite, so if I could use SQLite as opposed to Sterling DB or something else, that would save huge amounts of time. The problem I'm having currently is that once I open the database and close it, I cannot re-open it.
I am using the same library for our company's application and as far as I know, also documented at http://wp7sqlite.codeplex.com (under Some Recommendations ), if you close the connection you'll need to recreate it again.
== ADDITIONAL COMMENTS ==
I've tracked down the cause of the error, created a fix and am testing it in our application. Briefly, in order to port the Community.CSharpSqlite library to WP7, the author wrote a FileStream wrapper around WP7 IsolatedStorageFileStream. When a db is opened, the db file stream is opened and read and closed by CSharpSqlite. But a handle to this stream is also stored in a Dictionary mapping the file path to stream. When a db is opened for a second time, the handle to the stream is retrieved but since it's closed (I'm assuming, haven't verified yet) the db fails to open.
I will attempt to get my changes deployed to the wp7sqlite.codeplex.com project, but in the meantime if you have the source code make the following changes to Community.CsharpSqlite.FileStream
change from
public FileStream(string path, FileMode mode, FileAccess access, FileShare share, int unused)
{
IsolatedStorageFileStream handler = null;
if (FileStream.HandleTracker.TryGetValue(path, out handler))
{
_internal = handler;
}
else
{
if (mode == FileMode.Create || mode == FileMode.CreateNew)
{
_internal = IsolatedStorageIO.Default.CreateFile(path);
}
else
{
_internal = IsolatedStorageIO.Default.OpenFile(path, FileMode.OpenOrCreate);
}
FileStream.HandleTracker.Add(path, _internal);
}
}
to
public FileStream(string path, FileMode mode, FileAccess access, FileShare share, int unused)
{
IsolatedStorageFileStream handler = null;
if(FileStream.HandleTracker.TryGetValue(path, out handler))
{
_internal = handler;
if(!_internal.CanRead)
{
FileStream.HandleTracker.Remove(path);
CreateOpenNewFile(path, mode);
}
} else {
CreateOpenNewFile(path, mode);
}
}
private void CreateOpenNewFile(string path, FileMode mode)
{
if(mode == FileMode.Create || mode == FileMode.CreateNew)
{
_internal = IsolatedStorageIO.Default.CreateFile(path);
} else {
try {
_internal = IsolatedStorageIO.Default.OpenFile(path, FileMode.OpenOrCreate);
} catch(Exception ex) {
var v = ex;
}
}
FileStream.HandleTracker.Add(path, _internal);
}
This is the first time I'm attempting to debug and contribute to an open source project. Any comments or thoughts on these changes will be greatly appreciated.
Alasdair.
Hi I have encountered the same issue ... I think i got the fix for it.
This is what I've done.
public void CloseDB()
{
Connection.Close(); //Connection is a property(of type SqliteConnection) of my object
FileStream.HandleTracker.Clear(); //This here is the fix
}
I don't really need to change the dll.
I'm not yet sure if this will cause errors later on , but for now it works for me.
... I'm only a junior programmer:D

Categories

Resources