Security Exception

Mar 29, 2010 at 5:07 PM

This is really confusing.

I have a script that accesses SqlServer, and I run it in two modes. 
1. First I have a console application, and I can connect to the database just fine.
2. I have a Windows Service, but when I do a connect, it fails with a security exception

I'm baffled as to what the difference would be, since I can connect in the same process if I don't do it via a script.

Any ideas would be of great help, although I can default to the console app, it's not as elegant, and on a server, requires an active remote session to always be running.

Coordinator
Mar 29, 2010 at 9:04 PM
Hi,

I would say that your service is not running in the same trust mode as if it is in console mode. What kind of security exception do you have ? You can bypass the security by disabling it on the jintengine.

Sent from my iPod touch

Le 29 mars 2010 à 18:07, Dewey <notifications@codeplex.com> a écrit :

From: Dewey

This is really confusing.

I have a script that accesses SqlServer, and I run it in two modes. 
1. First I have a console application, and I can connect to the database just fine.
2. I have a Windows Service, but when I do a connect, it fails with a security exception

I'm baffled as to what the difference would be, since I can connect in the same process if I don't do it via a script.

Any ideas would be of great help, although I can default to the console app, it's not as elegant, and on a server, requires an active remote session to always be running.

Mar 30, 2010 at 7:41 AM

Hi neonp, it is a trust issue.

How can you bypass security in JintEngine?

Coordinator
Mar 30, 2010 at 8:15 AM

Hi Dewey,

 

You can disable the security by calling DisableSecurity on your JintEngine instance.

 

Regards,

Nicolas Penin.

Mar 30, 2010 at 10:47 PM

Nicolas, that WORKED!!!!

Thanks!

Jun 9, 2010 at 3:37 PM
lol I had the same problems thanks for the solution !