views:

32

answers:

1

I am writing a small windows service using .net framework 3.5 and its exibiting a wierd behaviour. The code gets stuck on

        using (OracleConnection con = new OracleConnection("Data Source=abc;Persist Security Info=True;User ID=xyz;Password=xyz;Unicode=True"))
        {

. . .

however when I debug it by attaching debugger to the service its working fine. Absoulutly clueless on this.

A: 

just a guess, have you put a breakpoint on that line and are you running the exe compiled in debug mode? i remeber a colleague , many years ago, being drived crazy because he execute an exe built with option debug instead of release which stopped on breakpoint. As i said this just a guess, maybe its not valid for lastes .net and vs version

Stefano
I have deployed the debug release
Umair Ahmed
and have you left a breakpoint somewhere? try to deploy a release version
Stefano
yep there are lots of break point left. I also tried deploying a release version and still no luck
Umair Ahmed
weird, are you sure that's the point it get stuck ? are you logging something (exceptions, actual operation being executed) , there's nothing inside windows event viewer?
Stefano
yep i introduced textfile logging to get to this point. I have a log entry just before and after the statement
Umair Ahmed
after the statement ? then it must stop inside the using, not at connection creation, try post the code inside the using
Stefano