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

.NET (Core and Framework)

 
QuestionKernel32 error in opening oledb connection Pin
projectcode13-May-06 6:29
projectcode13-May-06 6:29 
AnswerRe: Kernel32 error in opening oledb connection Pin
mr_123453-May-06 6:37
mr_123453-May-06 6:37 
GeneralRe: Kernel32 error in opening oledb connection Pin
projectcode13-May-06 7:05
projectcode13-May-06 7:05 
QuestionRe: Kernel32 error in opening oledb connection Pin
mr_123453-May-06 9:23
mr_123453-May-06 9:23 
AnswerRe: Kernel32 error in opening oledb connection Pin
projectcode13-May-06 10:05
projectcode13-May-06 10:05 
Question.Net 2.0 Security Pin
mlauahi2-May-06 5:15
mlauahi2-May-06 5:15 
AnswerRe: .Net 2.0 Security Pin
DotNetDominator3-May-06 5:29
DotNetDominator3-May-06 5:29 
GeneralRe: .Net 2.0 Security Pin
mlauahi4-May-06 10:39
mlauahi4-May-06 10:39 
Well I did read the entire article and saw what was happening.

From everything I saw unless I was not doing it exactly, is that
one way to do what I want to do was to Create a permission set, then
add the appropriate rights to that permission set and then do a Permission
Set DEMAND on it. From his example though it seemed that if He wanted to then
check for Create rights he still had to go through the trouble of creating a
FileStream Object to see if he really had the rights to do the operation.

I have tried the following. Even if I have only Read access only to XPath that this code works
all the time, I can never generate a SecurityException Error.

TRY

DIM DirectoryName AS STRING = XPath

DIM PS As New PermissionSet(PermissionState.None)
PS.AddPermission(New FileIOPermission(FileIOPermissionAccess.Write, PATH.GetFullPath(XPath)))
PS.Demand()

RETURN TRUE

CATCH EX AS SecurityException

RETURN FALSE

CATCH EX As Exception

RETURN FALSE

END TRY

I also created a codegroup, and a permissionset using the .NET 2.0 configurator. That gives
unrestricted access to the Security, UIPermission, and the FileIOPermission objects. I just
want to tell if my current user can create in a given directory, or if they can read from a
given directory etc. Any further ideas as to why I cannot trap an error above?

GeneralRe: .Net 2.0 Security Pin
DotNetDominator4-May-06 20:30
DotNetDominator4-May-06 20:30 
QuestionSQL Reporting Services Pin
ckruger2-May-06 0:08
ckruger2-May-06 0:08 
AnswerRe: SQL Reporting Services Pin
JimRoss2-May-06 11:31
JimRoss2-May-06 11:31 
QuestionFramework 1.0 and 2.0 Pin
charbelasmar1-May-06 21:45
charbelasmar1-May-06 21:45 
AnswerRe: Framework 1.0 and 2.0 Pin
CWIZO1-May-06 23:48
CWIZO1-May-06 23:48 
QuestionCan I create publisher policy for DLL assemblies? Pin
Steve M.1-May-06 8:05
Steve M.1-May-06 8:05 
Question1.1 & 2.0 in tandem Pin
duncanthescott1-May-06 5:35
duncanthescott1-May-06 5:35 
AnswerRe: 1.1 & 2.0 in tandem Pin
Josh Smith1-May-06 6:11
Josh Smith1-May-06 6:11 
AnswerRe: 1.1 & 2.0 in tandem Pin
raghuvarma1-May-06 23:52
raghuvarma1-May-06 23:52 
Questionconverting from .net 2.0 to .net 1.1 Pin
K.A.L30-Apr-06 10:51
K.A.L30-Apr-06 10:51 
AnswerRe: converting from .net 2.0 to .net 1.1 Pin
Dave Kreskowiak30-Apr-06 11:21
mveDave Kreskowiak30-Apr-06 11:21 
AnswerRe: converting from .net 2.0 to .net 1.1 Pin
Graham Nimbley30-Apr-06 11:56
Graham Nimbley30-Apr-06 11:56 
GeneralRe: converting from .net 2.0 to .net 1.1 Pin
K.A.L30-Apr-06 14:06
K.A.L30-Apr-06 14:06 
GeneralRe: converting from .net 2.0 to .net 1.1 Pin
Graham Nimbley30-Apr-06 14:16
Graham Nimbley30-Apr-06 14:16 
GeneralRe: converting from .net 2.0 to .net 1.1 Pin
K.A.L1-May-06 1:06
K.A.L1-May-06 1:06 
AnswerRe: converting from .net 2.0 to .net 1.1 Pin
HimaBindu Vejella2-May-06 18:42
HimaBindu Vejella2-May-06 18:42 
QuestionEnterprise library database config Pin
w3Nima30-Apr-06 3:28
w3Nima30-Apr-06 3:28 

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.