dotNet 1.1 compatibility with 2.0


G

gvb

I have a .Net 1.1 application that starts through internet explorer and
uses webservice for data-retrieval.

It is an application that runs for 3 years now (so it was first created
with 1.0 framework and later compiled with 1.1). To get it running i had
to add it to the trusted sites and set security settings of dotnet to
full trust.

It all worked fine, but now there is a problem with the 2.0 framework.
It seems that when i run the application it no longer uses the 1.1
framework, but the 2.0 one, but this causes some SecurityExceptions.

I'll post the error below.

When i adjust security settings for 2.0 framework (set to full trust
like i did with 1.1), the application will start, but there are still
some securityerrors that come up in the program itself.

Problem is that it is computer dependant, my old pc and our terminal
server don't have the problem, my new pc and my clean win xp + sp2 on
vmware do have the problem.

second problem is that the .net 2.0 configuration is only available when
vs2005 is installed, so on my vmware i can't even adjust the settings...

need some help with this...


here is the exception:

************** Exception Text **************
System.Security.SecurityException: Request for the permission of type
'System.Security.Permissions.SecurityPermission, mscorlib, Version=
2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at ToerStTruiden.mdiMainApp.PreLoad()
at anaXis.dotNet.ObjLib.aXbaseForm.aXbaseForm_Load(Object sender,
EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage
(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
The action that failed was:
InheritanceDemand
The type of the first permission that failed was:
System.Security.Permissions.SecurityPermission
The Zone of the assembly that failed was:
Trusted


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
IEExecRemote
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/IEExecRemote/2.0.0.0
__b03f5f7f11d50a3a/IEExecRemote.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0
__b77a5c561934e089/System.dll
----------------------------------------
ToerStTruiden
Assembly Version: 1.0.0.0
Win32 Version: n/a
CodeBase: http://www.eyes-e-
tools.net/sinttruiden/application/ToerStTruiden.EXE
----------------------------------------
anaXis.eBoX.ObjLib
Assembly Version: 1.0.1.1
Win32 Version: n/a
CodeBase: http://www.eyes-e-
tools.net/sinttruiden/application/anaXis.eBoX.ObjLib.DLL
----------------------------------------
anaXis.dotNet.ObjLib
Assembly Version: 1.0.1.1
Win32 Version: n/a
CodeBase: http://www.eyes-e-
tools.net/sinttruiden/application/anaXis.dotNet.ObjLib.DLL
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0
__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0
__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0
__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
anaXis.dotNet.ClassLib
Assembly Version: 1.0.1.1
Win32 Version: n/a
CodeBase: http://www.eyes-e-
tools.net/sinttruiden/application/anaXis.dotNet.ClassLib.DLL
----------------------------------------
anaXis.eBoX.ClassLib
Assembly Version: 1.0.1.1
Win32 Version: n/a
CodeBase: http://www.eyes-e-
tools.net/sinttruiden/application/anaXis.eBoX.ClassLib.DLL
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0
__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0
__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0
__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Web.Services
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Web.Services/2.0.0.0
__b03f5f7f11d50a3a/System.Web.Services.dll
----------------------------------------
8v_hwxt_
Assembly Version: 1.0.1.1
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0
__b77a5c561934e089/System.dll
----------------------------------------
qcpbhwwv
Assembly Version: 1.0.1.1
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0
__b77a5c561934e089/System.dll
----------------------------------------
3xoy4vzn
Assembly Version: 1.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0
__b77a5c561934e089/System.dll
----------------------------------------
ccp96s8j
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0
__b77a5c561934e089/System.dll
----------------------------------------
wewo-q42
Assembly Version: 1.0.1.1
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0
__b77a5c561934e089/System.dll
----------------------------------------
 
Ad

Advertisements

M

Mehfuz Hossain

Did you checked you mappings iis . After you install .net 2.0 there is
a new tab in iis , where you can forcely map , a web site to use
particular framework.

also use aspnet_regiis from vs command prompt tool to map a website
to a particular script mappings.

Best Regards,
Mehfuz hossain
http://www.mehfuz.com
 
G

gvb

The website is not the problem, it works fine. It is the application that
starts from the website that's causing the problem.
There is a link to an .exe and that exe is causing the securityexceptions.
 
M

Mehfuz Hossain

the machine where you are running your exe , does it meets all the
security criteria, i mean did you make it trusted.
 
G

gvb

the machine where you are running your exe , does it meets all the
security criteria, i mean did you make it trusted.

that would be my local machine, and trusting is ok for 1.1 and 2.0. But it
shouldn't use the 2.0 framework from my local machine, but the 1.1 version.
(or it shouldn't give the securityexceptions when using 2.0).

I'm going to try removing 2.0 on my virtual machine and see what happens
 
G

gvb

I'm going to try removing 2.0 on my virtual machine and see what
happens
Removing 2.0 framework has a succesful result, so it is definately a 2.0
compatibility issue.

gvb
 
Ad

Advertisements

P

Patrice

This is not what I see here. I have both 1.1 and 2.0 and the application I'm
running still uses 1.1. My understanding is that if you have both framework,
the application should run against the framework it was compiled for (unless
explicitely instructed to do otherwise).
 
G

gvb

This is not what I see here. I have both 1.1 and 2.0 and the
application I'm running still uses 1.1. My understanding is that if
you have both framework, the application should run against the
framework it was compiled for (unless explicitely instructed to do
otherwise).

that's my understanding too, and I too have a pc with framework 1.1 and 2.0
where it works. But on that pc I first configured the trusted zones and
then I installed the 2.0 framework. Maybe there is a problem there.

Fact is that when I look at thrown the exception, a lot of 2.0.0.0
assemblies are being mentioned

System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
IEExecRemote
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)

these all look .Net 2.0 to me

So apparently the 2.0 framework is used and is giving me an exception.

But the question is why?

gvb
 
Ad

Advertisements

P

Patrice

What if you try a bare bone 1.1 application that just displays the .NET
framework version used so that you don't have security issue ? Does it run
under 1.1 or 2.0 (try to run from the local drive as well as from the web
site to see if the behavior is different). If it behaves the same it could
be a system wide problem (something in machine.config screwed up ?). If not
it would be rather a problem with the IE helper that handles .NET downloads
?

Good luck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top