473,412 Members | 4,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Problem on security, when trying to put win-form usercontrol on web

I see a message on:
http://bytes.com/topic/asp-net/answe...tion-please-he

I have got the same problem, which I cannot figure out what is the solution for weeks.

I have Windows 7 (Home premium edition), framework 3.5 (how can I check that, if gacutil is correct version, if it metters, anyway ...)

I am writting on C#.

Also on assemblyInfo.cs :
Expand|Select|Wrap|Line Numbers
  1. [assembly: AllowPartiallyTrustedCallers]
  2. [assembly: FileIOPermission(SecurityAction.RequestMinimum)]
On Web.config :
Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <configuration>
  3. <system.web>
  4.         <authorization>
  5.             <allow users ="*" />
  6.         </authorization>
  7.  
  8. <identity impersonate="true"/>
  9.   <securityPolicy>
  10.     <trustLevel name="Full" policyFile="internal"/>
  11.   </securityPolicy>
  12. <compilation>
  13.       <assemblies>
  14.       <add assembly="MyDll, Version=1.0.0.0, 
  15.                         Culture=neutral,
  16.                         PublicKeyToken=..."/>
  17. </assemblies>
  18. </compilation>
  19.     </system.web>
  20. </configuration>
  21.  
Also I have put all of my dlls on c:\windows\assembly.

Nothing happens - same error :
Expand|Select|Wrap|Line Numbers
  1. request for the permission of type 'system.security.permissions.fileiopermission,mscorlib, version = 2.0.0.0, Culture = neutral,PublicTokenKey=b77a5c561934e089' failed
This happens when no lines are before the method that calls : InitializeComponents.
When I add the following lines, I see no error (even I don't reach the code of the method that calls initializeComponents) :
Expand|Select|Wrap|Line Numbers
  1. [System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Assert, Unrestricted = true)]
  2.         [System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand, Name = "FullTrust")]
I have also run caspol.exe.
I don't know what to do with the explanation on the link I gave (Is it necessary to do something with msi installation to check that I am doing right things).

Any help will be appreciated, since I am dealing with the problem for weeks, with no solution.

Thanks :)
Nov 4 '10 #1
5 2496
Frinavale
9,735 Expert Mod 8TB
If you are developing an ASP.NET application, it is best to use ASP.NET controls.

For example, in ASP.NET you have the FileUpload control which opens a "file dialog" that allows the users to select a file in order to upload it to the server.

I recommend using ASP.NET controls in ASP.NET applications because WinForm Controls require the end user to use Internet Explorer and are not guaranteed to work. WinForm controls are meant for desktop-client development, not web development.

-Frinny
Nov 8 '10 #2
Are you sure about that?
I need to use, at least for a while, user-control on win-form at the old standard (no metter if it is ugly ...)
For java there are applets, so I think there must be an equivalent for asp.net - same as applets.

Thanks :)
Nov 8 '10 #3
Frinavale
9,735 Expert Mod 8TB
Hmm I don't think so...not "applets"

There is Silverlight but I'm not sure if that could help you.

What are your requirements?
What exactly are you trying to accomplish?

Is it really hard to recreate the same looking "old standard" user control using ASP.NET controls??

If your existing control is implemented in layers (UI layer, Buisness Layer, and Data Access Layer) than you may even be able to use the existing code in the WinForms user control to power your ASP.NET control...

-Frinny
Nov 9 '10 #4
What is the most simmiliar to creating web-application as win-form, doing in real C# code ?

Is it WebGui application?
Is it asp.net web application?

Thanks :)
Nov 9 '10 #5
Frinavale
9,735 Expert Mod 8TB
I'd say that an Asp.NET Web Application was the "closest" to win-forms for the Internet; however, they are very different environments.

Silverlight applications are WPF for the Internet.
Nov 9 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: intl04 | last post by:
I am getting strange print-related error messages when trying to create (not print!) reports. For example, when I click 'new' to create a report then choose 'design view', I get an error message...
1
by: יוני גולדברג | last post by:
Hi, While trying to create new directory i recieve the following error message: "System.IO.DirectoryNotFoundException: Could not find a part of the path "\\premfs16\sites". The path exists, even...
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
0
by: Google Groups | last post by:
Hi, I have the following configuraiton: Server side: Apache 2.x with deflate module configured for cotet-stream. Client Side: IE 6.0.2 SP2 dot net framework v1.1.4322
0
by: cwho.work | last post by:
Hi! We are using apache ibatis with our MySQL 5.0 database (using innodb tables), in our web application running on Tomcat 5. Recently we started getting a number of errors relating to...
4
by: =?Utf-8?B?VGVycmFuY2U=?= | last post by:
I have an application that runs fine on my machine(of course) that access the local Sql Server. However, when trying to run this application from another machine I receive a Sql timeout error. I...
2
by: techgirl | last post by:
Hi All- I was wondering if anyone could help me with this issue. I am trying to run this 3rd party application called "CoreFTP.exe" from within C#. I have tested my code with "Notepad.exe" and...
1
by: Arif Mohammed | last post by:
Hi, iam using MySql 4.0.1 and jboss-4.0.4.GA Iam getting the following exception when there are more concurrent requests more than 50 in a second Caused by: org.xyz.MyClass: SQL...
3
by: =?Utf-8?B?R3VubmFy?= | last post by:
Hi everybody! I am experiencing a problem when trying to run a C# .NET user control in MSIE on Windows 2000. On Windows XP SP2, the same code runs without problems. The .NET security settings...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.