.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan
Santhakumar Munuswamy
Fauzul Azmi
Asad Ali
Post New Web Links

Medium Trust and OleDbPermission unrestricted=true

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :ASP.Net
 
 Hi,can anybody enlighten me what holes i punch when i extend the medium trust policies with OleDbPermission unrestricted=true?I want to read Excel files and need to change "Data Source" and "ExtendedParameters", so i do not want to restrict things further. Is it possible to access devices, services or files outside the web application root with this configuration?   Thanks     (mk)


View Complete Post


More Related Resource Links

Mysql connector and medium trust shared hosting

  
Hi at all. I've a big problem with GoDaddy Shared Hosting. I've written an ASP.NET application with MySql Database, but my application can't run, with the "Security Exception" error. The problem is that mysql connector must be recompiled with some .... different option. But i can't recompile.. i got always error. So i'm asking you if someone have a link for a mysql connector version able to run in medium trust environment.Very Thanks in advance.Bye

managed IIS7module +.Net 4.0 integrated pipeline + Medium Trust Level +GAC

  

I'm developing a managed module for IIS7. Assembly with my code is placed in GAC and worked fine within 2.0 pipeline...  

But with .NET 4.0 pipeline (and Medium Trust Level chosen) there are no permissions to read registry and code is unable to read/write "C:\Program Files\<Folder>\MyAppConfig.file"

Is there any way to grant my assembly with proper permissions to do this?


Can sqlce4 ctp2 run in medium trust level?

  

Hi 

I am using SQLCe4 ctp2, but when my application run in medium trust level. It will throw a security exception shows :

 

Cannot perform CAS Asserts in Security Transparent methods

Exception stack trace is:

 

[InvalidOperationException: Cannot perform CAS Asserts in Security Transparent methods]
 System.Security.CodeAccessSecurityEngine.CheckNReturnSO(PermissionToken permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 create) +0
 System.Security.CodeAccessSecurityEngine.Assert(CodeAccessPermission cap, StackCrawlMark& stackMark) +61
 System.Security.CodeAccessPermission.Assert() +28
 System.Data.SqlServerCe.KillBitHelper.GetKillBit() +231
 System.Data.SqlServerCe.KillBitHelper..cctor() +56

[TypeInitializationException: The type initializer for 'System.Data.SqlServerCe.KillBitHelper' threw an exception.]
 System.Data.SqlServerCe.KillBitHelper.ThrowIfKillBitIsSet() +0
 System.Data.SqlServerCe.SqlCeCommand..cctor() +5

[TypeInitializationException: The type initializer for 'System.Data.SqlServerCe.SqlCeCommand' threw an exception.]
 System.Data.SqlServerCe.SqlCeCommand..ctor() +0
 _Default.Page_Load(Object sen

Error while deploying a WSP with Unrestricted="true" in the Package.Template.xml

  

Does anyone know how to create a CAS PermissionSet that allows for Unrestricted="true" in the Package.Template.xml file for a Visual Studio 2010 SharePoint Project?  The following does not work.

<?xml version="1.0" encoding="utf-8"?>
<Solution xmlns="http://schemas.microsoft.com/sharepoint/">
 <CodeAccessSecurity>
  <PolicyItem

linq not working on shared server with Medium Trust security

  

On my PC everything is all rigth but on the webserver I get an error: 'OrderBy' is not a member of 'System.Array', maybe due to the trust level.
Is there I way to bypass this or I have to resign myself to it?




Making website 'medium trust' compliant

  

My web hosting provider re-configured their servers for 'medium trust' overnight and now my ASP.NET website will not run. All they will tell me is that it needs to be set for 'medium trust' and will not advise beyond that. I inserted <trust level="Medium" /> between the <system.web> tags in the web.config file but that hasn't fixed the problem. I'm using the auto-generated web.config file from Visual Web Developer for ASP.NET 3.5, and don't believe I'm doing anything out of the ordinary as far as violating 'medium trust' restrictions. Has anybody else had to deal with this problem? If so, please help!


{ End Bracket }: Election Results Even Voters Can Trust

  

Surprisingly, cryptography can be applied to the electoral process to allow every individual voter to check the integrity of an election tally. Find out how here.

Josh Benaloh

MSDN Magazine June 2008


Do You Trust It?: Discover Techniques for Safely Hosting Untrusted Add-Ins with the .NET Framework 2

  

When you allow your application to run arbitrary code through an add-in, you may expose users to unknown code, running the risk that malicious code will use your application as an entry point into the user's data. There are several techniques you can use to reduce the attack surface of your application, which Shawn Farkas discusses here.

Shawn Farkas

MSDN Magazine November 2005


FormView KeepInEditMode=true isn't retaining values

  


I have an "Edit Page" in my application. It uses a FormView bound to an EntityDataSource.

I have a handler setup for the FormView OnItemUpdated event. If an exception occurs (such as foreign key constraints or non date vales entered in a date colum, etc.), then I set the "KeepInEditMode=true". This is SUPPOSED to retain the user entered values on all of the text boxes instead of rebinding the FormView to the data again and clearing those text boxes. (Right?)

Well, it isn't working...

I have stepped through the code via the debugger and the "KeepInEditMode" does get set to true, but as soon as the page reloads, the values revert back to the original database values (the data is being rebound).

I should also mention that I am setting "ExceptionHandled" to true. I am doing this because I am handling the Exception by displaying an error in a specific area of the page and if I dont mark it as handled, IE generates an Exception popup.

Any ideas?
 


Error "user does not have permission to perform this operation" with User Instance = True.

  

I setup SQL Server 2005 / SQL Express. All works fine in SQL Server 2005.

I am connecting to a SQL Database from VS 2005,  Tools/Connect to Database. I set the Data Source to "Microsoft SQL Server Database File (SqlClient)" (meaning SQL Server Express) and User Instance = True, and Integrated Security = True.

The above is working successfully on all machines except my Laptop. On my Laptop, I am getting this error "user does not have permission to perform this operation". On my Laptop, if I change User Instance = False, it works fine. Also, If I connect to SQL Server 2005 it works fine only if User Instance = False.

I tried all kind of security changes, nothing worked. For example, I setup Everyone as Full Control for the Folder and the MDF File of SQL Server. I gave my user ID as sysadmin role in SQL Server Express. Also, I enabled creating User Instance form SQL Server Express, Nothing is working.

Appreciate your help.

Tarek.


How To Access Datakeys In Javascript...and How To make gridview Column Visible true in javascript

  

How To Access Gridview's Datakeys In Javascript...and How To make gridview Column Visible true in javascript



Reply me..


Menu doesn't popup when WIndow style set to AllowsTransparency="True" WindowStyle="None"

  
Hi,I'm facing an issue, when using Window style set to AllowsTransparency="True" WindowStyle="None", my menus in menubar doesn't popup, rather they gets hidden (not visible) and if you just click by guess then menu item will be executed, its just that menu item is not shown visisble.However, if I revert back the Window style to normal without Transparency then menus visible(popup) perfectly.I'm not sure what could be an issue?San

How to Consume (Cookieless =true) Session Enabled Web services

  
  Hi, I need to use cookieless=true in web.config and enablesession=true in web methods.   I've two web methods like, [WebMethod(EnableSession=true)] public void SetName(string Name) { Session["Name"] =Name; } [WebMethod(EnableSession=true)} public string GetName() { return (string)Session["Name"] }   In my aspx.cs, using proxy I want to call SetName in button 1 click, and retrieve the name (which i put it into web service session on button 1 click ) in button 2 click like,   protected void Button1_Click(sender o, eventargs e) { webserviceproxy proxy =new webserviceproxy(); proxy.SetName("Prabhu"); } protected void Button2_Click(sender o, eventargs e) { webserviceproxy proxy =new webserviceproxy(); Response.Write( proxy.GetName()); } Here, How can I use cookie container and how can i achieve what Im expecting to do?   Please help me on this. thanks Prabhu P Work Smart, Not Hard

How can I show INSTEAD OF in XML output?

  
I am trying to create an XML document as the result of queries against our database tables. In some cases I need fields (usually INT) to display as <FieldName xsi:nil ="true" /> and that seems to work just fine if I used "ELEMENTS XSINIL"   However, I need to be able to chose (basically on a field by field basis in my SELECT statements) to return a blank field when the database holds a NULL value such as: <FieldName></FieldName>  (Or <FieldName/> either way would be fine).   How can I do that? Thank you for your help!   SELECT RecordCode, FieldToBeBlank, [Year] , [Month] FROM dbo.SomeTable FOR XML PATH('CustomRootName'), ELEMENTS XSINIL

Error "user does not have permission to perform this operation" with User Instance = True.

  
I setup SQL Server 2005 / SQL Express. All works fine in SQL Server 2005. I am connecting to a SQL Database from VS 2005,  Tools/Connect to Database. I set the Data Source to "Microsoft SQL Server Database File (SqlClient)" (meaning SQL Server Express) and User Instance = True, and Integrated Security = True. I am using Windows Authentication mode in SQL Server Express. The above is working successfully on all machines except my Laptop. On my Laptop, I am getting this error "user does not have permission to perform this operation". On my Laptop, if I change User Instance = False, it works fine. Also, If I connect to SQL Server 2005 it works fine only if User Instance = False. I tried all kind of security changes, nothing worked. For example, I setup Everyone as Full Control for the Folder and the MDF File of SQL Server. I gave my user ID as sysadmin role in SQL Server Express. Also, I enabled creating User Instance form SQL Server Express, Nothing is working. I am already added to the Administrator Group locally on my Laptop. Still same problem. Checked this article: http://msdn.microsoft.com/en-us/library/ms254504.aspx, same problem. I enabled User Instances and also tried to Disable User Instances. When I disable user instances, and then try to connect from VS, I get a different error, which is asking to enable user instances.

Values in user control fields empty when AutoEventWireup=true ?

  
As a BizTalk developer I'm trying to build a ASP.NET website so some obvious things might be new to me (so please be gentle). I have a web form and I have a user control on it. This user control contains a panel with some user properties that are to be stored in a database. So far nothing fancy. The user control itself contains a panel and is working fine (all code to retrieve and store the values is working). I used the default settings of creating a user control and one of them was AutoEventWireup=true. This works fine because I also have some dropdown boxes (and other fields) that need to be filled with values from the database and that happens in the Page_load event. The panel specifies the 'DefaultButton' which calls a method when clicked to save the values after the user has changed them. On this click the code of the method is called, I confirmed that, but I found out that the values of my controls on the user control (for example the Textbox control) are empty. As a non-ASP.NET developer I couldn't figure out why. So I changed some settings like AutoEventWireup to false. Off course this resulted in my dropdown boxes no longer to be initially filled, but my surprise was big to find out my controls actually contained the values the user typed in. Logically I need both the values and th

radiobutton list item make visible true or false in javascript

  
in my project i have used one radiobuttonlist according different user login , i want to make one of radiobuttonlist item visible true or false..   please help me to solve this issue.   thanks in advance.  
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend