I have a console application that I need to run a stored procedure in but I'm getting this error:

a t   S y s t e m . D a t a . S q l C l i e n t . S q l C o n n
e c t i o n . P e r m i s s i o n D e m a n d ( ) 

       a t 
 S y s t e m . D a t a . S q l C l i e n t . S q l C o n n e c t
i o n F a c t o r y . P e r m i s s i o n D e m a n d ( D b C o
n n e c t i o n   o u t e r C o n n e c t i o n ) 

       a t 
 S y s t e m . D a t a . P r o v i d e r B a s e . D b C o n n e
c t i o n C l o s e d . O p e n C o n n e c t i o n ( D b C o n
n e c t i o n   o u t e r C o n n e c t i o n ,   D b C o n n e
c t i o n F a c t o r y   c o n n e c t i o n F a c t o r y ) 


       a t   S y s t e m . D a t a . S q l C l i e n t . S q l
C o n n e c t i o n . O p e n ( ) 

       a t   J G U _ M V E
x p o r t I m p o r t . J G U A M a r k e t V a l u e I m p o r
t e r . M o v e F r o m T e m p T a b l e T o P r o d u c t i o
n M o n t h l y M a r k e t V a l u e s ( )   i n   C : \ B A C
K E D U P \ w c j j \ V S 2 0 1 0 \ m s y s g i t \ p r o j e c
t s \ J G U - M V E x p o r t I m p o r t \ J G U - M V E x p o
r t I m p o r t \ J G U A M a r k e t V a l u e I m p o r t e r
. c s : l i n e   6 7 

       a t   J G U _ M V E x p o r t I
m p o r t . P r o g r a m . M a i n ( S t r i n g [ ]   a r g s
)   i n   C : \ B A C K E D U P \ w c j j \ V S 2 0 1 0 \ m s y
s g i t \ p r o j e c t s \ J G U - M V E x p o r t I m p o r t
\ J G U - M V E x p o r t I m p o r t \ P r o g r a m . c s : l
i n e   3 7 

If I were dealing with asp.net I would change to full trust but I'm not sure how to handle this for the console application. Any suggestions. I have done a fair amount of searching on this error with no luck for my exact use case.

That's really hard to read, why all the spaces between letters and the odd font?

Now, what's the actual exception thrown, what's the code that threw it?

commented: You comment prompted me to remove a try catch block from the code. After doing this the debugger pointed out the exact issue.The connection string was not being passed to the SqlConnection constructor. Weird error for that though. Anyway problem solved. T +1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.