473,748 Members | 3,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

3 New Member
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\asse mbly.

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 : InitializeCompo nents.
When I add the following lines, I see no error (even I don't reach the code of the method that calls initializeCompo nents) :
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 2507
Frinavale
9,735 Recognized Expert Moderator Expert
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
Eitan Mizrahi
3 New Member
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 Recognized Expert Moderator Expert
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
Eitan Mizrahi
3 New Member
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 Recognized Expert Moderator Expert
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
2659
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 that says: 'There was a problem retrieving printer information for this object. The object may have been sent to a printer that was unavailable.' When I choose 'report wizard', I can go through all of the steps but then I get an error message...
1
1540
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 when i check the path with the code: Directory.Exists(...) the result is true. Here is the code: http://www.adeo.co.il/test.aspx
5
3640
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 New System.Diagnostics.Process 'p.Start(MDEPDirStr & "macrun.exe", sPPTOut) p.Start("C:\WINDOWS\SYSTEM32\CALC.EXE") 'p.Start("C:\WINDOWS\SYSTEM32\macrun.exe", sPPTOut)
0
1089
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
11702
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 java.sql.SQLException: Deadlock found when trying to get lock; Try restarting transaction message from server: "Lock wait timeout exceeded; try restarting transaction"; We get such errors generally on inserts or updates while applying a
4
3062
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 thought it was my stored procedure but that doesn't seem to be the case. The following are the connection strings that I've tried: //private string connstring = "integrated security=SSPI;data source=<ip address>;" // "persist security...
2
3022
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 that opens up fine. I've tried it with another program executable and it works as well. When I go to run coreftp.exe, it will not work. I have even tried putting code into a .bat file and trying to execute that and it executes, but I get the same...
1
8822
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 Exception:Deadlock found when trying to get lock; Try restarting transaction, message from server: "Lock wait timeout exceeded; Try restarting transaction" at com.xyz.retrieveDetails(MySessionBean.java:679) at...
3
1406
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 have been set to full trust, the IE security to low, but still the component does not run. Does anybody know if or what difference is there between Windows XP and 2000 in terms of running .NET user controls in IE?
0
8828
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9537
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9319
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9243
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8241
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6795
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4599
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3309
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.