473,699 Members | 2,383 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 2503
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
2656
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
1536
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
3630
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
1084
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
11698
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
3060
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
3021
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
8814
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
1403
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
8687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8615
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
9034
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8883
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
5874
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
4376
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...
0
4629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3057
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
2
2347
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.