|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Request for permission of the type 'System.Security.Permissions.RegistryPermission...' failedThe full message is:
Request for permission of the type 'System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. It happened while trying to execute a small program, from a network share, that will tests the correct installation of some ODBC/OLE drivers. It opens a specific registry key with My.Computer.Registry.LocalMachine and then does a quick SQL query via OLE drivers against a table in the company database. I copied all three items in the \bin directory of the project to the network share expecting that it would need all of them to run. So what is the error message telling me?? TIA! -- TFWBWY...A I forgot to add that I'm using VS 2005, but perhaps that's evident from the
"My." object. Does anyone have any ideas?? Show quoteHide quote "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:OfYjAsZXGHA.508@TK2MSFTNGP02.phx.gbl... > The full message is: > > Request for permission of the type > 'System.Security.Permissions.RegistryPermission, mscorlib, > Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. > > It happened while trying to execute a small program, from a network share, > that will tests the correct installation of some ODBC/OLE drivers. It > opens a specific registry key with My.Computer.Registry.LocalMachine and > then does a quick SQL query via OLE drivers against a table in the company > database. I copied all three items in the \bin directory of the project to > the network share expecting that it would need all of them to run. So > what is the error message telling me?? > > TIA! > > -- > TFWBWY...A > You can't do that.. When a assembly runs of the network, its not in
full-trusted mode, like running locally. Also, you don't have registry access when running from a limited user XP Account. Vijay Show quoteHide quote "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:%234f$r3vYGHA.3516@TK2MSFTNGP03.phx.gbl... >I forgot to add that I'm using VS 2005, but perhaps that's evident from the >"My." object. Does anyone have any ideas?? > > "Bryan Dickerson" <txprp***@netscape.net> wrote in message > news:OfYjAsZXGHA.508@TK2MSFTNGP02.phx.gbl... >> The full message is: >> >> Request for permission of the type >> 'System.Security.Permissions.RegistryPermission, mscorlib, >> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' >> failed. >> >> It happened while trying to execute a small program, from a network >> share, that will tests the correct installation of some ODBC/OLE drivers. >> It opens a specific registry key with My.Computer.Registry.LocalMachine >> and then does a quick SQL query via OLE drivers against a table in the >> company database. I copied all three items in the \bin directory of the >> project to the network share expecting that it would need all of them to >> run. So what is the error message telling me?? >> >> TIA! >> >> -- >> TFWBWY...A >> > > So, do I just need to go back to using the Windows Shell API to read the
registry (seems a pity)? Or how do I attain "full-trusted mode" from a Network share? Show quoteHide quote "VJ" <vijayba***@yahoo.com> wrote in message news:O4MuwBwYGHA.3972@TK2MSFTNGP04.phx.gbl... > You can't do that.. When a assembly runs of the network, its not in > full-trusted mode, like running locally. Also, you don't have registry > access when running from a limited user XP Account. > > Vijay > > "Bryan Dickerson" <txprp***@netscape.net> wrote in message > news:%234f$r3vYGHA.3516@TK2MSFTNGP03.phx.gbl... >>I forgot to add that I'm using VS 2005, but perhaps that's evident from >>the "My." object. Does anyone have any ideas?? >> >> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >> news:OfYjAsZXGHA.508@TK2MSFTNGP02.phx.gbl... >>> The full message is: >>> >>> Request for permission of the type >>> 'System.Security.Permissions.RegistryPermission, mscorlib, >>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' >>> failed. >>> >>> It happened while trying to execute a small program, from a network >>> share, that will tests the correct installation of some ODBC/OLE >>> drivers. It opens a specific registry key with >>> My.Computer.Registry.LocalMachine and then does a quick SQL query via >>> OLE drivers against a table in the company database. I copied all three >>> items in the \bin directory of the project to the network share >>> expecting that it would need all of them to run. So what is the error >>> message telling me?? >>> >>> TIA! >>> >>> -- >>> TFWBWY...A >>> >> >> > > I am not really sure, I just have knowledge, have not implemented any
code.... But I believe you have to use some class from System.Security namespace. for it... Check http://www.codeproject.com. You might find some samples there.. or try Google it... or using Shell API is the other option..., even so I am not sure you can get a trusted access from within a ..NET assembly... I assume that you are keeping some settings for your application, try keeping them in local file that goes along with the APP, but if you are reading the registry for ODBC settings, then I don't know of a better way to do that. You can check any of the above resources mentioned above Vijay Show quoteHide quote "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:OReBUFwYGHA.1196@TK2MSFTNGP03.phx.gbl... > So, do I just need to go back to using the Windows Shell API to read the > registry (seems a pity)? Or how do I attain "full-trusted mode" from a > Network share? > > "VJ" <vijayba***@yahoo.com> wrote in message > news:O4MuwBwYGHA.3972@TK2MSFTNGP04.phx.gbl... >> You can't do that.. When a assembly runs of the network, its not in >> full-trusted mode, like running locally. Also, you don't have registry >> access when running from a limited user XP Account. >> >> Vijay >> >> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >> news:%234f$r3vYGHA.3516@TK2MSFTNGP03.phx.gbl... >>>I forgot to add that I'm using VS 2005, but perhaps that's evident from >>>the "My." object. Does anyone have any ideas?? >>> >>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>> news:OfYjAsZXGHA.508@TK2MSFTNGP02.phx.gbl... >>>> The full message is: >>>> >>>> Request for permission of the type >>>> 'System.Security.Permissions.RegistryPermission, mscorlib, >>>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' >>>> failed. >>>> >>>> It happened while trying to execute a small program, from a network >>>> share, that will tests the correct installation of some ODBC/OLE >>>> drivers. It opens a specific registry key with >>>> My.Computer.Registry.LocalMachine and then does a quick SQL query via >>>> OLE drivers against a table in the company database. I copied all three >>>> items in the \bin directory of the project to the network share >>>> expecting that it would need all of them to run. So what is the error >>>> message telling me?? >>>> >>>> TIA! >>>> >>>> -- >>>> TFWBWY...A >>>> >>> >>> >> >> > > Anyone else got any ideas?
Show quoteHide quote "VJ" <vijayba***@yahoo.com> wrote in message news:ekaEOnwYGHA.3444@TK2MSFTNGP05.phx.gbl... >I am not really sure, I just have knowledge, have not implemented any >code.... But I believe you have to use some class from System.Security >namespace. for it... Check http://www.codeproject.com. You might find some >samples there.. or try Google it... or using Shell API is the other >option..., even so I am not sure you can get a trusted access from within a >.NET assembly... > > I assume that you are keeping some settings for your application, try > keeping them in local file that goes along with the APP, but if you are > reading the registry for ODBC settings, then I don't know of a better way > to do that. You can check any of the above resources mentioned above > > Vijay > > "Bryan Dickerson" <txprp***@netscape.net> wrote in message > news:OReBUFwYGHA.1196@TK2MSFTNGP03.phx.gbl... >> So, do I just need to go back to using the Windows Shell API to read the >> registry (seems a pity)? Or how do I attain "full-trusted mode" from a >> Network share? >> >> "VJ" <vijayba***@yahoo.com> wrote in message >> news:O4MuwBwYGHA.3972@TK2MSFTNGP04.phx.gbl... >>> You can't do that.. When a assembly runs of the network, its not in >>> full-trusted mode, like running locally. Also, you don't have registry >>> access when running from a limited user XP Account. >>> >>> Vijay >>> >>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>> news:%234f$r3vYGHA.3516@TK2MSFTNGP03.phx.gbl... >>>>I forgot to add that I'm using VS 2005, but perhaps that's evident from >>>>the "My." object. Does anyone have any ideas?? >>>> >>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>> news:OfYjAsZXGHA.508@TK2MSFTNGP02.phx.gbl... >>>>> The full message is: >>>>> >>>>> Request for permission of the type >>>>> 'System.Security.Permissions.RegistryPermission, mscorlib, >>>>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' >>>>> failed. >>>>> >>>>> It happened while trying to execute a small program, from a network >>>>> share, that will tests the correct installation of some ODBC/OLE >>>>> drivers. It opens a specific registry key with >>>>> My.Computer.Registry.LocalMachine and then does a quick SQL query via >>>>> OLE drivers against a table in the company database. I copied all >>>>> three items in the \bin directory of the project to the network share >>>>> expecting that it would need all of them to run. So what is the error >>>>> message telling me?? >>>>> >>>>> TIA! >>>>> >>>>> -- >>>>> TFWBWY...A >>>>> >>>> >>>> >>> >>> >> >> > > Look into Code Access Security Policies (CASPOL).
You can set up areas of your network from which you "trust" .Net code as though it were on your local machine and, therefore, with all the permissions you require. IIRC, VS2005 has some Whizzo tools for working out exactly what permissions your application(s) require but, where I am, just picking a known network location and granting "Full Trust" to it works quite nicely. HTH, Phill W. Bryan Dickerson wrote: Show quoteHide quote > So, do I just need to go back to using the Windows Shell API to read the > registry (seems a pity)? Or how do I attain "full-trusted mode" from a > Network share? > > "VJ" <vijayba***@yahoo.com> wrote in message > news:O4MuwBwYGHA.3972@TK2MSFTNGP04.phx.gbl... >> You can't do that.. When a assembly runs of the network, its not in >> full-trusted mode, like running locally. Also, you don't have registry >> access when running from a limited user XP Account. >> >> Vijay >> >> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >> news:%234f$r3vYGHA.3516@TK2MSFTNGP03.phx.gbl... >>> I forgot to add that I'm using VS 2005, but perhaps that's evident from >>> the "My." object. Does anyone have any ideas?? Thanks for your response. So would I have to setup the security on every
machine that runs it? At least for the first time it's invoked? Show quoteHide quote "Phill W." <p-.-a-.-w-a-r-d@o-p-e-n-.-a-c-.-u-k> wrote in message news:e251kl$t34$1@yarrow.open.ac.uk... > > Look into Code Access Security Policies (CASPOL). > > You can set up areas of your network from which you "trust" .Net code as > though it were on your local machine and, therefore, with all the > permissions you require. > > IIRC, VS2005 has some Whizzo tools for working out exactly what > permissions your application(s) require but, where I am, just picking a > known network location and granting "Full Trust" to it works quite nicely. > > HTH, > Phill W. > > Bryan Dickerson wrote: >> So, do I just need to go back to using the Windows Shell API to read the >> registry (seems a pity)? Or how do I attain "full-trusted mode" from a >> Network share? >> >> "VJ" <vijayba***@yahoo.com> wrote in message >> news:O4MuwBwYGHA.3972@TK2MSFTNGP04.phx.gbl... >>> You can't do that.. When a assembly runs of the network, its not in >>> full-trusted mode, like running locally. Also, you don't have registry >>> access when running from a limited user XP Account. >>> >>> Vijay >>> >>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>> news:%234f$r3vYGHA.3516@TK2MSFTNGP03.phx.gbl... >>>> I forgot to add that I'm using VS 2005, but perhaps that's evident from >>>> the "My." object. Does anyone have any ideas?? That's my understanding of it, yes. :-(
Regards, Phill W. Bryan Dickerson wrote: Show quoteHide quote > Thanks for your response. So would I have to setup the security on every > machine that runs it? At least for the first time it's invoked? > > "Phill W." <p-.-a-.-w-a-r-d@o-p-e-n-.-a-c-.-u-k> wrote in message > news:e251kl$t34$1@yarrow.open.ac.uk... >> Look into Code Access Security Policies (CASPOL). >> >> You can set up areas of your network from which you "trust" .Net code as >> though it were on your local machine and, therefore, with all the >> permissions you require. >> >> IIRC, VS2005 has some Whizzo tools for working out exactly what >> permissions your application(s) require but, where I am, just picking a >> known network location and granting "Full Trust" to it works quite nicely. >> >> HTH, >> Phill W. >> >> Bryan Dickerson wrote: >>> So, do I just need to go back to using the Windows Shell API to read the >>> registry (seems a pity)? Or how do I attain "full-trusted mode" from a >>> Network share? >>> >>> "VJ" <vijayba***@yahoo.com> wrote in message >>> news:O4MuwBwYGHA.3972@TK2MSFTNGP04.phx.gbl... >>>> You can't do that.. When a assembly runs of the network, its not in >>>> full-trusted mode, like running locally. Also, you don't have registry >>>> access when running from a limited user XP Account. >>>> >>>> Vijay >>>> >>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>> news:%234f$r3vYGHA.3516@TK2MSFTNGP03.phx.gbl... >>>>> I forgot to add that I'm using VS 2005, but perhaps that's evident from >>>>> the "My." object. Does anyone have any ideas?? > >
Check if TIF file in use
Data form wizard in VS.NET 2005 Delegate problems MSDN-Example with Collection(of T) Tabelle collegate in Access [VB .Net 2005] Is there really no way to turn the background compiler in VB.NET? Touch Screen programming? Simple question Tabbing not working in vb 6.0 forms file system watcher prevents PC shutdown |
|||||||||||||||||||||||