GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Microsoft  >  C#
Go To First  |  Previous Question  |  Next Question 
 C#  |  Question 51 of 431    Print  

Why do I get a security exception when I try to run my C# app?

Some security exceptions are thrown if you are working on a network share. There are some parts of the frameworks that will not run if being run off a share (roaming profile, mapped drives, etc.). To see if this is what's happening, just move the executable over to your local drive and see if it runs without the exceptions. One of the common exceptions thrown under these conditions is System.Security.SecurityException.

To get around this, you can change your security policy for the intranet zone, code group 1.2, (the zone that running off shared folders falls into) by using the caspol.exe tool.




  
Total Answers and Comments: 1 Last Update: January 10, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
January 10, 2006 09:24:30   #1  
sahu Member Since: December 2005   Contribution: 324    

RE: Why do I...

ans:

Yes,this is right.


 
Is this answer useful? Yes | No

 Related Questions

All methods marked with the DllImport attribute must be marked as public static extern.  
Latest Answer : It works perfectly.  You can find the dialogue window by using "ALT+Tab" keyRobert  ...

C# does not support an explicit fall through for case blocks. The following code is not legal and will not compile in C#: switch(x){case 0:// do somethingcase 1:// do something in common with 0default:// 
Latest Answer : c# switch allows fall through if and only if in empty case. as long as there is a statement in the case it must  use break or go to to  jump out of the case. ...

The difference is that static read-only can be modified by the containing class, but const can never be modified and must be initialized to a compile time constant. To expand on the static read-only case 
Latest Answer : Constant : The constants are the one whose value remain same at all the time.it will be used if u want to define something at compile time.Read only....if you don't know value at compile time but u can find that at runtime that time u can use ...

Use a conditional attribute on the method, as shown below: class Debug{[conditional("TRACE")]public void Trace(string s){Console.WriteLine(s);}}class MyClass{public static void Main(){Debug.Trace("hello");}}In 
Latest Answer : if you are using conditinoal attribute then add the name spaceSystem.Diagnostics.ConditionalAttribute ...

You need to use the /target:library compiler option.  
Latest Answer : Open the property page of the Project File and thenopen CommonProperties -> Genaral ->Output Typechange the output type to class library and build the application then u'll get a dll file.also in the Configuartion Properties ->Build -> Output ...

The word checked is a keyword in C#.  
Latest Answer : Reason is checked is a keyword in C#,but if u want to keyword as an identifier use @ with it.e.g int @checked=3;This works with all the keywords,but it is recommended to avoid it. ...

What is the syntax for calling an overloaded constructor within a constructor (this() and constructorname() does not compile)?
The syntax for calling another constructor is as follows: class B{B(int i){ }}class C : B{C() : base(5) // call base constructor B(5){ }C(int i) : this() // call C(){ }public static void Main() {}}  

C# has the is operator: expr is type  
Latest Answer : EX:==============using System; class ClassA {} public class TestIs{   public static void Test (object o)    {      ClassA a = null;       if (o is ClassA)       ...

If you leave off the return type on a method declaration, the compiler thinks you are trying to declare a constructor. So if you are trying to declare a method that returns nothing, use void. The following 
Latest Answer : If your method does not have any return type then mention void before that method or return 0 ...

Strings are not null terminated in the runtime, so embedded nulls are allowed. Console.WriteLine() and all similar methods continue until the end of the string.  
Latest Answer : Console.WriteLine() stop printing when it reaches a 'Carriage Return' (denotes next line) character within a string! ...


 Sponsored Links

 
Related Articles

Security enhancements in SQL Server 2005

The trustworthy computing initiative has contributed greatly to help microsoft improve customer experience. A number of customer needs on security have been addressed. 1. Restricting user access to sql server 2. Disabling services and restricting service configuration 3. Reducing the surface are aof
 

ITIL Security Management

What is ITIL Security Management? The process of ITIL Security Management describes the structure model of security in the management organization. It is based on the Code of Practice for Information Security Management that is also often known as ISO/IEC 17799. Security Management is basically inf
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Effective Controls for Attaining Continuous Application Security

Effective Controls for Attaining Continuous Application Security Throughout the Web Application Development Life Cycle Given the choice, every organization would want secure Web sites and applications from the Web application development phase all the way through the software development life cycle.
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Top 10 Application Security Vulnerabilities in Web.config Files - Part One

These days, the biggest threat to an network security comes from its public Web site and the Web-based applications found there. Unlike internal-only network services such as databases-which can be sealed off from the outside via firewalls-a public Web site is generally accessible to anyone who wan
 

Top 10 Application Security Vulnerabilities in Web.config Files - Part Two

Some of the most common and dangerous application security vulnerabilities that exist in ASP.NET Web-based applications come not from the C# or VB.NET code that make up its pages and service methods, but instead from the XML code that makes up its Web.config files. Incorrect configurations can open
 

Security and IT Certification

Learning about different types of IT Certification is the first step to becoming successful with different types of technology. IT Certification is first divided into different groups.  Each of these groups will have certain focuses in relation to technology and how it can be used.&nbsp
 

JavaScript Exception Handling – Part II

JavaScript Exception Handling Part II In this JavaScript tutorial you will learn about exception handling viz try… catch finally statement and nested try… catch statements along with syntax and examples mosgoogle center try… catch finally Statement JavaScript has a
 

JavaScript Exception Handling – Part I

JavaScript Exception Handling Part I In this JavaScript tutorial you will learn about Exception Handling Catching errors in JavaScript Using try catch statement and throw in JavaScript along with syntax and examples mosgoogle center It is impossible for a programmer to write a program without erro
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape