Click here to Skip to main content
15,353,606 members
Home / Discussions / C#
   

C#

 
AnswerRe: Monitoring file changes and changing data within the file... Pin
Eddy Vluggen3-Oct-12 1:39
professionalEddy Vluggen3-Oct-12 1:39 
AnswerRe: Monitoring file changes and changing data within the file... Pin
Pete O'Hanlon3-Oct-12 2:26
mvaPete O'Hanlon3-Oct-12 2:26 
GeneralRe: Monitoring file changes and changing data within the file... Pin
Dave Kreskowiak3-Oct-12 5:33
mveDave Kreskowiak3-Oct-12 5:33 
GeneralRe: Monitoring file changes and changing data within the file... Pin
Pete O'Hanlon3-Oct-12 5:37
mvaPete O'Hanlon3-Oct-12 5:37 
GeneralRe: Monitoring file changes and changing data within the file... Pin
Dave Kreskowiak3-Oct-12 13:38
mveDave Kreskowiak3-Oct-12 13:38 
AnswerRe: Monitoring file changes and changing data within the file... Pin
BobJanova3-Oct-12 2:42
MemberBobJanova3-Oct-12 2:42 
GeneralRe: Monitoring file changes and changing data within the file... Pin
Pete O'Hanlon3-Oct-12 3:10
mvaPete O'Hanlon3-Oct-12 3:10 
GeneralRe: Monitoring file changes and changing data within the file... Pin
JD863-Oct-12 13:59
MemberJD863-Oct-12 13:59 
Sorry for the delay responses! Just had a baby girl Smile | :)

Anyways let me explain. I'm setting up a multi-tenant quickbooks environment. The problem is as we probably all know is it wasn't really designed for multi-tenancy. Now everything works fine with what I have except the username is populated on a program level.

So in the ProgramData directory (All Users) there is a qbw.ini file that contains LASTUSERNAME=. Each time a user launches quickbooks it reads this information and prepopulated the username field for the company database login.

I don't want people seeing other peoples logins. Most just use Admin which isn't a big deal but some use their company name. So I don't want another company seeing that.


So my idea is to monitor that file for updates using a file system watcher and changing that value in the INI file to blank. So basically changing something like this: "LASTUSERNAME=Admin" to this: "LASTUSERNAME="

Quickbooks does not place a permanent lock on this file. So we don't have to worry about quickbooks locking it for a long period of time.

I'm trying suggestions as we speak. I'm adding an error count to stop the service if an exception happens so many times within a specific time period. Hopefully this will stop an overflow exception like you were talking about. I can make something to restart the service ever so often.

Not the best plan but so far thats what I got!
GeneralRe: Monitoring file changes and changing data within the file... Pin
JD8612-Oct-12 5:27
MemberJD8612-Oct-12 5:27 
QuestionC# setup and deploy project templates located at? Pin
dcof2-Oct-12 5:10
Memberdcof2-Oct-12 5:10 
AnswerRe: C# setup and deploy project templates located at? Pin
isenthil2-Oct-12 6:30
Memberisenthil2-Oct-12 6:30 
GeneralRe: C# setup and deploy project templates located at? Pin
dcof2-Oct-12 17:48
Memberdcof2-Oct-12 17:48 
GeneralRe: C# setup and deploy project templates located at? Pin
Dave Kreskowiak3-Oct-12 2:28
mveDave Kreskowiak3-Oct-12 2:28 
AnswerRe: C# setup and deploy project templates located at? Pin
Dave Kreskowiak2-Oct-12 12:33
mveDave Kreskowiak2-Oct-12 12:33 
Questionsyntax Pin
messages2-Oct-12 4:29
Membermessages2-Oct-12 4:29 
AnswerRe: syntax Pin
Eddy Vluggen2-Oct-12 4:31
professionalEddy Vluggen2-Oct-12 4:31 
GeneralRe: syntax Pin
messages2-Oct-12 5:28
Membermessages2-Oct-12 5:28 
AnswerRe: syntax Pin
Richard MacCutchan2-Oct-12 5:54
mveRichard MacCutchan2-Oct-12 5:54 
GeneralRe: syntax Pin
messages2-Oct-12 6:09
Membermessages2-Oct-12 6:09 
Questionmultiple loading of assemblies - does it have any associated problems? Pin
Danzy832-Oct-12 2:53
MemberDanzy832-Oct-12 2:53 
AnswerRe: multiple loading of assemblies - does it have any associated problems? Pin
Eddy Vluggen2-Oct-12 3:23
professionalEddy Vluggen2-Oct-12 3:23 
GeneralRe: multiple loading of assemblies - does it have any associated problems? Pin
Danzy832-Oct-12 3:29
MemberDanzy832-Oct-12 3:29 
AnswerRe: multiple loading of assemblies - does it have any associated problems? Pin
Eddy Vluggen2-Oct-12 4:29
professionalEddy Vluggen2-Oct-12 4:29 
AnswerRe: multiple loading of assemblies - does it have any associated problems? Pin
jschell2-Oct-12 8:42
Memberjschell2-Oct-12 8:42 
AnswerRe: multiple loading of assemblies - does it have any associated problems? Pin
Dave Kreskowiak2-Oct-12 12:29
mveDave Kreskowiak2-Oct-12 12:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.