11 Replies - 1434 Views - Last Post: 10 April 2014 - 08:37 AM

#1 joe.lim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 09-June 08

JIT Debugger Access is denied

Posted 02 April 2014 - 01:14 AM

Hi guys/gals,

I need help here. I have a program which run fine on my and a lot of my clients network ( peer-to-peer, no server). But I have a client whose network simply would not let me run my application, the JIT Debugger pop up as soon as I run the program with the message 'ACCESS DENIED'.
My program is in VB.Net 2003 and the database is in Access2000, and there is nothing unusual about the network, no server, no password nothing. I can access the database using windows without any problem.
So anybody with any help is most appreciated.

Regards,
Joe Lim

Is This A Good Question/Topic? 0
  • +

Replies To: JIT Debugger Access is denied

#2 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3589
  • View blog
  • Posts: 11,157
  • Joined: 05-May 12

Re: JIT Debugger Access is denied

Posted 02 April 2014 - 06:38 AM

Some AV software consider unsigned software as malicious and just block all their API calls. Have you tried disabling the AV software?

What is the OS of the machine? Are you logged on as administrator when you access the database using Windows, but as a less privileged user when in the context of your program?
Was This Post Helpful? 0
  • +
  • -

#3 joe.lim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 09-June 08

Re: JIT Debugger Access is denied

Posted 03 April 2014 - 02:01 AM

View PostSkydiver, on 02 April 2014 - 06:38 AM, said:

Some AV software consider unsigned software as malicious and just block all their API calls. Have you tried disabling the AV software?

What is the OS of the machine? Are you logged on as administrator when you access the database using Windows, but as a less privileged user when in the context of your program?


That's the thing, there are no anti-virus program installed. The pcs are running windows 7. The main pc where the access database reside is windows 8. All PRO versions.
Was This Post Helpful? 0
  • +
  • -

#4 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 399
  • View blog
  • Posts: 1,455
  • Joined: 15-January 14

Re: JIT Debugger Access is denied

Posted 03 April 2014 - 12:13 PM

Is there any context or indication about what specifically you are being denied access to? A line of code perhaps?
Was This Post Helpful? 0
  • +
  • -

#5 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3589
  • View blog
  • Posts: 11,157
  • Joined: 05-May 12

Re: JIT Debugger Access is denied

Posted 03 April 2014 - 06:39 PM

Well, since the JIT debugger comes up, you might as well click the button to say that you want to debug your program and look at which line of code is causing the Access Denied.
Was This Post Helpful? 0
  • +
  • -

#6 joe.lim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 09-June 08

Re: JIT Debugger Access is denied

Posted 07 April 2014 - 12:06 AM

View PostArtificialSoldier, on 03 April 2014 - 12:13 PM, said:

Is there any context or indication about what specifically you are being denied access to? A line of code perhaps?


No, nothing.

View PostSkydiver, on 03 April 2014 - 06:39 PM, said:

Well, since the JIT debugger comes up, you might as well click the button to say that you want to debug your program and look at which line of code is causing the Access Denied.


The thing is there is no source code there, only exe.
Was This Post Helpful? 0
  • +
  • -

#7 cfoley  Icon User is online

  • Cabbage
  • member icon

Reputation: 2020
  • View blog
  • Posts: 4,188
  • Joined: 11-December 07

Re: JIT Debugger Access is denied

Posted 07 April 2014 - 04:32 AM

I would start by finding the line where it happens. Is there an exception that you can catch? I would start by wrapping the entire event handler or Main in a try..catch. Catch the most broad exception so you know you will get it. If that works you can log the stack trace, message, inner exceptions, etc...

If that doesn't give you any joy then then try throwing together some minimal executable examples. Write one to connect to Access, another to connect then execute a query. They are short and quick so you can write as many as you can think of and ask your client to try them all.

If that doesn't work, you can resort to adding lots of logging to the area where you think the problem lies.

Once you know the exact part of the code you will be in a better position to research a solution.
Was This Post Helpful? 0
  • +
  • -

#8 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3589
  • View blog
  • Posts: 11,157
  • Joined: 05-May 12

Re: JIT Debugger Access is denied

Posted 07 April 2014 - 05:40 AM

View Postjoe.lim, on 07 April 2014 - 03:06 AM, said:

View PostArtificialSoldier, on 03 April 2014 - 12:13 PM, said:

Is there any context or indication about what specifically you are being denied access to? A line of code perhaps?


No, nothing.

View PostSkydiver, on 03 April 2014 - 06:39 PM, said:

Well, since the JIT debugger comes up, you might as well click the button to say that you want to debug your program and look at which line of code is causing the Access Denied.


The thing is there is no source code there, only exe.

If you send your PDBs to your client and place them beside their corresponding assemblies, the debugger will try to find the file and line number. Since you won't have any source code there, you can try clicking Browse (to remotely point to the source) or simply Cancel. In the former case, it should give you the exact line. In the latter case, you'll be able to look at the callstack and see files and line numbers, as well as annotated assembly code that reveals files and line numbers.

If that still fails, then start creating the minimal repros that cfoley very wisely recommends.
Was This Post Helpful? 1
  • +
  • -

#9 cfoley  Icon User is online

  • Cabbage
  • member icon

Reputation: 2020
  • View blog
  • Posts: 4,188
  • Joined: 11-December 07

Re: JIT Debugger Access is denied

Posted 07 April 2014 - 05:49 AM

I did not know that about the PDBs. Good to know!
Was This Post Helpful? 0
  • +
  • -

#10 joe.lim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 09-June 08

Re: JIT Debugger Access is denied

Posted 10 April 2014 - 06:36 AM

View Postcfoley, on 07 April 2014 - 04:32 AM, said:

I would start by finding the line where it happens. Is there an exception that you can catch? I would start by wrapping the entire event handler or Main in a try..catch. Catch the most broad exception so you know you will get it. If that works you can log the stack trace, message, inner exceptions, etc...

If that doesn't give you any joy then then try throwing together some minimal executable examples. Write one to connect to Access, another to connect then execute a query. They are short and quick so you can write as many as you can think of and ask your client to try them all.

If that doesn't work, you can resort to adding lots of logging to the area where you think the problem lies.

Once you know the exact part of the code you will be in a better position to research a solution.


Actually, I don't think it the coding issue, cause the same program work on my other clients network. I am having problem on only this client. Is there any setting in windows 7/8 that could cause this issue? But then again, I have other clients running on windows 7/8 without any problem.
Was This Post Helpful? 0
  • +
  • -

#11 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 399
  • View blog
  • Posts: 1,455
  • Joined: 15-January 14

Re: JIT Debugger Access is denied

Posted 10 April 2014 - 07:29 AM

There are plenty of things that could cause a generic "access denied" message. It's hard to guess what that might be without knowing what the code is trying to do. Maybe it's trying to connect to a server or network resource that requires authentication, maybe it's an issue with a driver or the database, or a permission issue with a directory that it's trying to access.

That error message is a runtime error, so maybe the code needs to be changed to add error checking in various places to catch that error and show a message about the specific problem.

This post has been edited by ArtificialSoldier: 10 April 2014 - 07:30 AM

Was This Post Helpful? 1
  • +
  • -

#12 cfoley  Icon User is online

  • Cabbage
  • member icon

Reputation: 2020
  • View blog
  • Posts: 4,188
  • Joined: 11-December 07

Re: JIT Debugger Access is denied

Posted 10 April 2014 - 08:37 AM

Quote

Actually, I don't think it the coding issue, cause the same program work on my other clients network. I am having problem on only this client. Is there any setting in windows 7/8 that could cause this issue? But then again, I have other clients running on windows 7/8 without any problem.


Sure, but at the moment all you know is you have some code that breaks on one computer and there is a database involved somewhere. Unfortunately, It doesn't look like anyone on here recognises the solution. The information you have is too vague for any useful diagnostics so you're going to need to narrow it down. Once you have done that, you might be able to google the solution yourself or come back here for another try.

Maybe it's a setting or maybe the database. Even if your code is correct, you can still use your code to help diagnose the problem. That's all I was suggesting.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1