repost-security problem on 2k5 not on 2k3

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have a simple (1 form) Winforms VB.net 2003 app and am migrating it to
vb2005

testing both on the same box...

if i run the 2003 version it works correctly, but the 2005 version fails
when attempting to connect to a SQL Server database.
looking at the connection object after the attempt i have an exception
object in the WorkstationID:-

"Request for the permission of type
'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."

in the 2003 version i have a valid workstation id

the code to this point is identical

StackTrace " at System.Security.CodeAccessSecurityEngine.Check(Object
demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Environment.get_MachineName()
at System.Data.SqlClient.SqlConnection.get_WorkstationId()"

any ideas?

*guy*
 
hmmmmm
copied all the code into another solution - no changes, new one works, old
still does not!

grrrrrrrrrr
 
not strictly true, the converted app was still in cb2003 format ie one file
for the form, whereas the the one that works has a vb2005 styel partial class
setup, can not see wy it should make a difference but?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top