User (Old forums)MemberOctober 22, 2007 at 11:17 amPost count: 23064
i met this exception in trying to binding datagrid from the database:
Request for the permission of type ‘System.Data.SqlClient.SqlClientPermission, System.Data, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
The action that failed was:
The type of the first permission that failed was:
The Zone of the assembly that failed was:
any1 know what is the reason ?
thanks for advance
Imported from legacy forums. Posted by NAHR_ELGANNAH (had 537 views)User (Old forums)MemberOctober 22, 2007 at 2:55 pmPost count: 23064
Imported from legacy forums. Posted by nat (had 310 views)User (Old forums)MemberOctober 23, 2007 at 5:39 amPost count: 23064
Thank you testn
but i don’t use a database located in a different server.
FYI, i tried the same code with windows application and it worked properly. but with using XAML Browser Application i met this strange problem.
any advices ?
Imported from legacy forums. Posted by NAHR_ELGANNAH (had 379 views)User (Old forums)MemberOctober 23, 2007 at 7:02 amPost count: 23064
Sandbox means you can’t even use database located on the same server.
<a href=”http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2286461&SiteID=1″>http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2286461&SiteID=1</a> Web services is probably a better alternative.
Imported from legacy forums. Posted by nat (had 212 views)User (Old forums)MemberOctober 23, 2007 at 9:53 amPost count: 23064
Thank you testn again
i tried to follow your advice and made a trivial web service and tried to call it from XBAP but i recieved this error:
“Cannot create instance of ‘Page1’ defined in assembly ‘XBAPLastGrid, Version=1.0.2852.26076, Culture=neutral, PublicKeyToken=null’. Exception has been thrown by the target of an invocation. Error in markup file ‘Page1.xaml’ Line 1 Position 7”
this is although when trying the same calling in a web site (not XAML) it worked properly.
Imported from legacy forums. Posted by NAHR_ELGANNAH (had 4235 views)
- You must be logged in to reply to this topic.