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

.NET (Core and Framework)

 
GeneralTELL ME I'M WRONG !! Pin
philippe dykmans13-May-04 15:13
philippe dykmans13-May-04 15:13 
GeneralRe: TELL ME I'M WRONG !! Pin
TigerNinja_14-May-04 13:52
TigerNinja_14-May-04 13:52 
GeneralRe: TELL ME I'M WRONG !! Pin
philippe dykmans15-May-04 4:24
philippe dykmans15-May-04 4:24 
GeneralProblem with TCP in a derived UserControl Pin
Tim Kohler13-May-04 8:47
Tim Kohler13-May-04 8:47 
QuestionHow to announce Windows Service Manager, that service fails (Recovery Options) Pin
Jan Lehmann12-May-04 20:18
Jan Lehmann12-May-04 20:18 
AnswerRe: How to announce Windows Service Manager, that service fails (Recovery Options) Pin
ian mariano13-May-04 10:28
ian mariano13-May-04 10:28 
AnswerRe: How to announce Windows Service Manager, that service fails (Recovery Options) Pin
ian mariano13-May-04 10:33
ian mariano13-May-04 10:33 
GeneralSystem.Environment.MachineName Exception Pin
Member 9993512-May-04 8:40
Member 9993512-May-04 8:40 
Hi, I'm using the following code to get the Machine name in an app

System.Environment.MachineName

On most computers this works fine but on one of our testers computers (machine is a windows 2000 desktop pc, not a networking share either), it's throwing the following exception.

Request for the permission of type System.Security.Permissions.EnvironmentPermission, mscorlib, Version = 1.0.50000.0, Culture = neutral, publicKeyToken = blahblahblah failed.

I have no idea what is causing this. I tried messing around with the .Net Configuration. Figured mscorlib didn't have permission rights.


also.........

I can't get any computer information in general. Trying to do some WMI core queries as well from code and getting a "Security Error" Exception. Below is the code that gets the disk size.

public string GetsDiskSize(){
ManagementClass cimobject;
ManagementObjectCollection moc;

cimobject = new ManagementClass("Win32_DiskDrive");
moc = cimobject.GetInstances();

try { // BIOS INFO
foreach(ManagementObject mo in moc){
this.m_sDiskSize = GetSystemValue("Size",mo);
mo.Dispose();
break;
}
}
catch(Exception ex){
System.Windows.Forms.MessageBox.Show("GetsDiskSize " + ex.Message);
cimobject.Dispose();
moc.Dispose();
return ex.Message;
}
cimobject.Dispose();
moc.Dispose();
return this.m_sDiskSize;
}
GeneralRe: System.Environment.MachineName Exception Pin
Aryadip12-May-04 20:21
Aryadip12-May-04 20:21 
GeneralRe: System.Environment.MachineName Exception Pin
TigerNinja_18-May-04 19:17
TigerNinja_18-May-04 19:17 
GeneralEnterprise Instrumentation Framework Pin
Mark Tutt12-May-04 3:54
Mark Tutt12-May-04 3:54 
GeneralInstall Shield Help Pin
hprahul12-May-04 0:27
hprahul12-May-04 0:27 
GeneralRe: Install Shield Help Pin
Roman Rodov12-May-04 16:10
Roman Rodov12-May-04 16:10 
GeneralRe: Install Shield Help Pin
O Ismail19-May-04 7:30
O Ismail19-May-04 7:30 
GeneralCalling Modeless Dialog box from a callback Pin
Bilal Farooq11-May-04 20:34
Bilal Farooq11-May-04 20:34 
GeneralRe: Calling Modeless Dialog box from a callback Pin
Aryadip11-May-04 23:46
Aryadip11-May-04 23:46 
GeneralRe: Calling Modeless Dialog box from a callback Pin
Bilal Farooq12-May-04 19:48
Bilal Farooq12-May-04 19:48 
Generalcomposit data entry control Pin
sangeetha bhatta11-May-04 17:12
sangeetha bhatta11-May-04 17:12 
GeneralRe: composit data entry control Pin
Aryadip11-May-04 19:45
Aryadip11-May-04 19:45 
GeneralCode access security for in-memory assembly Pin
VRubins11-May-04 4:30
VRubins11-May-04 4:30 
GeneralRe: Code access security for in-memory assembly Pin
TigerNinja_11-May-04 12:05
TigerNinja_11-May-04 12:05 
GeneralRe: Code access security for in-memory assembly Pin
Aryadip12-May-04 1:51
Aryadip12-May-04 1:51 
General.NET Questions Pin
Honest10-May-04 22:22
Honest10-May-04 22:22 
GeneralRe: .NET Questions Pin
Ernst Kuschke11-May-04 1:18
Ernst Kuschke11-May-04 1:18 
QuestionHow to call VB.NET DLL from VC+.NET Pin
Member 87328310-May-04 12:47
Member 87328310-May-04 12:47 

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.