Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.NET config snap in help

Status
Not open for further replies.

jcisco

Programmer
Sep 17, 2002
125
US
Can someone help me out with this problem.
Background: running a laptop with windows 2k server standard ed, and VS.NET.

I wrote a VB.NET app call ManagedExample. all this app does is read and write to a file called c:\myTest.txt located on the same machine (but i'm assuming if i get this to work it should work on client machines as well? right?)

I compiled the app for release, and shared its bin folder with Web Sharing. Under the web sharing permissions I left it's Access permission as read, and Application permission as Scripts.

Next i went to the .NET config tool in MMC. Opened up my Runtime Security Policy - went down to user - the to the users Permission Set and created InetTest and added these permission: File Dialog (open), File IO (File Path c:\myTest.txt with read and write checked), Isolated Storage (Domain Isolatation By User, Disk Quota 10240), Security (only checked the Enable assembly execution), User Interface (safe subwindows, and own clipboard), and Printing (Safe Printing).

Then i went to the user Code Groups and made a new code group called test and under the "choose a condition type" I picked URL, and added my local url for the app. in my case it was
Under the "Assign a Permission Set" I picked my InetTest that i created and clicked finished.

Now the problem, when i go to the url I'm able to launch the application that part works no problem. but when i click on the button to read or write to the file i get this err.
"writing Request for the permission of type System.Security.Permissions.FileIOPermission, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed."

Now all i want to be able to do is write a application, release it in the zero deployment and be able to control its permissions. I have read some tech doc's (from MS) on the subject but they have been no help what so ever. no clear cut examples of how i should be doing this.. I know i'm missing something here and i'm hoping someone can point it out.

Also i'm not understanding how this application would be linking to the User Permissions that I created for it... say i make this application and i need it to run file IO, and i make another application that only needs the read IO wouldn't both applications be using the same permission set? thus both of them can read and write or is there a linking part to this mess that i'm missing.

cheers.
john

--------------
:)
 
i got it to work under the machine code group but still unable to do it under the user group. I guess you can also make a .msi file for your ent.. does anyone know how to do this as well?

--------------
:)
 
I just happen to be investigating a solution as proposed by RockFord Lhotka in his book "Visual Basic .NET Business Objects". He seems to be a big promoter of "no-touch deployment" and has come up with a pretty elegent solution that gets around most of the common headaches. It's not the point of the book or anything (which is great, btw) but he has an appendix on it. Also, take a look a this for a intro:
HTH,

B.J.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top