Hello,
I've written a windows control that runs in an asp.net page using an <object> tag. The control accesses a scanner on the local machine.
Everything was working fine until I installed .net 2.0 as part of the SQL Server Management Studio Express.
Now the control throws an error "Application attempted to perform an operation not allowed by the security policy"
I've tried giving the .dll permisson using the .net framework 1.1 configuration tool. So far nothing seems to work.
Thanks for any help.
Jon

.net 2.0 security breaks my app
MattBrindley
klahking
Sreekanth Bharatham
That's a big help, thanks.
The next question then, is how do I get the windows control to specify the proper version of the .dll The server is set properly to .net 1.1, but the control runs in the local machine environment, not on the server.
mp4city
redocdlab
The dll doesn't seem to install on the local machine, rather it seems to run in memory and then disappear. I'll try injecting the config file into the .dll after it's compiled. Perhaps that will work.
ramil.d
Go to the directory where the assembly file was copied, and try to add a text mycontrol.dll.config or mycontrol.exe.config. (<controlfile.ext>.config), and put something like this.
< xml version="1.0" encoding="utf-8" >
<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
</startup>
<appSettings>
<!-- User application and configured property settings go here.-->
<!-- Example: <add key="settingName" value="settingValue"/> -->
</appSettings>
</configuration>
Chriswo2
ak-dd
For controls hosted in the browser the latest installed version of the CLR will always be used. This is by design and there is no way around it that isn't a very dirty hack.
Why don't you just change the v2.0 security policy on the machine to allow you whatever permissions you are currently allowing on v1.* already