Click here to Skip to main content
15,893,487 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: How can I tell what version of .NET is installed? Pin
Christian Tratz13-Oct-02 23:11
Christian Tratz13-Oct-02 23:11 
QuestionWhich technologies to use for configuration like dreamweaver ? Pin
gerti11-Oct-02 5:42
gerti11-Oct-02 5:42 
GeneralGraphics object. Pin
Pete Bassett11-Oct-02 1:26
Pete Bassett11-Oct-02 1:26 
GeneralRe: Graphics object. Pin
Paul Riley11-Oct-02 1:50
Paul Riley11-Oct-02 1:50 
GeneralRe: Graphics object. Pin
Pete Bassett11-Oct-02 1:57
Pete Bassett11-Oct-02 1:57 
GeneralRe: Graphics object. Pin
Paul Riley11-Oct-02 2:10
Paul Riley11-Oct-02 2:10 
GeneralRe: Graphics object. Pin
Pete Bassett11-Oct-02 2:22
Pete Bassett11-Oct-02 2:22 
GeneralChanging permission set for CodeGroup Pin
EnkelIk10-Oct-02 23:18
EnkelIk10-Oct-02 23:18 
Hi.

In my organisation we want to run an application from a server on the co-workers computers when they log-on to the local intranet, to register that they have loged-on, set the printer connections and so on. In order to be able to do this we want to set the permission level on the machines for the Local Intranet to FullTrust.

I'm trying to create an application that installed locally will do this. I have been able to create a new child codegroup that gives FullTrust to the directory where the inlogg-application is situated, but efforts changing the permission set for the LocalIntranet_Zone is so far without success.

The sample code below shows what I have done:

penumLevels=SecurityManager::PolicyHierarchy();
while (penumLevels->MoveNext())
{
try
{
pPolLevel = __try_cast <policylevel*> (penumLevels->Current);
}
catch(System::InvalidCastException* pcatchException)
{
MessageBox::Show(pcatchException->get_Message());
}


// Positioning at root level
pGroup =pPolLevel->RootCodeGroup;

// Find Machine Level Policy
pstrTmp=pPolLevel->Label->ToString();
if ( pstrTmp->Compare(pstrTmp,"Machine")==0)
{
//Find All Code codegroup
pstrTmp=pGroup->MembershipCondition->ToString();
if(pstrTmp->Compare(pstrTmp,"All code")==0)
{
//Loop through the children to find LocalIntranet_Zone
pList=pGroup->get_Children();
sCount=pList->get_Count();
for(sIndex=0;sIndex<scount;sindex++)
{
="" try
="" pchildgroup="__try_cast" <unioncodegroup*="">(pList->get_Item(sIndex));
}
catch(System::InvalidCastException* pcatchException)
{
MessageBox::Show(pcatchException->get_Message());
}

pstrTmp=pChildGroup->get_Name();

if(pstrTmp->Compare(pstrTmp,"LocalIntranet_Zone")==0)
{
//Getting the FullTrust permission set
pFullPerm=pPolLevel->GetNamedPermissionSet("FullTrust");

//Checking what is the present permission set
pstrTmp=pChildGroup->get_PermissionSetName();

//Create a new policy statement with the desired trust level
Security::Policy::PolicyStatement *pPolicy;
pPolicy=new Security::Policy::PolicyStatement(pFullPerm);

//Set the new policy
pChildGroup->set_PolicyStatement(pPolicy);

//And save changes System::Security::SecurityManager::SavePolicy();

//And again checking what the permission set is
//to make sure it has been changed
pstrTmp=pChildGroup->get_PermissionSetName();
}
}
}
}
}

When I check the name of the permission set the second time it is FullTrust, quite as I want it to only this does not have any impact on the real setting, the local intranet does still not have FullTrust status. Is there something preventing the level from being changed to a higher trustee level or am I missing something?

Best regards
/EnkelIk
GeneralSeeking .NET Adoption Pin
Tariq10-Oct-02 22:36
Tariq10-Oct-02 22:36 
GeneralRe: Seeking .NET Adoption Pin
Kevin McFarlane11-Oct-02 4:52
Kevin McFarlane11-Oct-02 4:52 
GeneralRe: Seeking .NET Adoption Pin
Tariq12-Oct-02 8:21
Tariq12-Oct-02 8:21 
GeneralRe: Seeking .NET Adoption Pin
Matt Philmon16-Oct-02 12:35
Matt Philmon16-Oct-02 12:35 
GeneralDisappearing label Pin
Derek Lakin10-Oct-02 0:00
Derek Lakin10-Oct-02 0:00 
GeneralRe: Disappearing label Pin
David Stone10-Oct-02 5:11
sitebuilderDavid Stone10-Oct-02 5:11 
GeneralRe: Disappearing label Pin
Derek Lakin10-Oct-02 20:08
Derek Lakin10-Oct-02 20:08 
GeneralRe: Disappearing label Pin
Pete Bassett10-Oct-02 5:37
Pete Bassett10-Oct-02 5:37 
GeneralRe: Disappearing label Pin
Derek Lakin10-Oct-02 20:10
Derek Lakin10-Oct-02 20:10 
GeneralRe: Disappearing label Pin
Nnamdi Onyeyiri10-Oct-02 10:23
Nnamdi Onyeyiri10-Oct-02 10:23 
GeneralRe: Disappearing label Pin
Derek Lakin10-Oct-02 20:12
Derek Lakin10-Oct-02 20:12 
GeneralRe: Disappearing label Pin
Nnamdi Onyeyiri11-Oct-02 4:40
Nnamdi Onyeyiri11-Oct-02 4:40 
GeneralRe: Disappearing label Pin
Derek Lakin13-Oct-02 22:47
Derek Lakin13-Oct-02 22:47 
GeneralRe: Disappearing label Pin
Nnamdi Onyeyiri14-Oct-02 5:15
Nnamdi Onyeyiri14-Oct-02 5:15 
GeneralRe: Disappearing label Pin
Derek Lakin17-Oct-02 1:12
Derek Lakin17-Oct-02 1:12 
GeneralRe: Disappearing label Pin
Pete Bassett10-Oct-02 22:51
Pete Bassett10-Oct-02 22:51 
GeneralRe: Disappearing label Pin
Derek Lakin17-Oct-02 1:09
Derek Lakin17-Oct-02 1:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.