469,903 Members | 2,013 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

repost-security problem on 2k5 not on 2k3

guy
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(Obj ect
demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Environment.get_MachineName()
at System.Data.SqlClient.SqlConnection.get_Workstatio nId()"

any ideas?

*guy*

Feb 2 '06 #1
2 1452
guy
hmmmmm
copied all the code into another solution - no changes, new one works, old
still does not!

grrrrrrrrrr

"guy" wrote:
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(Obj ect
demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Environment.get_MachineName()
at System.Data.SqlClient.SqlConnection.get_Workstatio nId()"

any ideas?

*guy*

Feb 2 '06 #2
guy
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?

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

grrrrrrrrrr

"guy" wrote:
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(Obj ect
demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Environment.get_MachineName()
at System.Data.SqlClient.SqlConnection.get_Workstatio nId()"

any ideas?

*guy*

Feb 2 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Joe | last post: by
4 posts views Thread by Mike Lundell | last post: by
1 post views Thread by Fresh Air Rider | last post: by
reply views Thread by rawCoder | last post: by
14 posts views Thread by Steve McLellan | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.