Hey Simi,
I am sorry that I will not be able to provide you with anything close to a
solution.
You did not mention what you refer to as "Application written and compiled
in NET 1.1" . The "one is running perfect on Server in TS if executed
directly" or "our ERP System over a helper-dll"?
Maybe check out this blog:
http://blogs.msdn.com/kaevans/archive/2005/11/15/493077.aspx
If your "ERP System" is a "native application", then the following stands:
"1.1 add-in to a native application (such as Office or Internet Explorer)"
"Computer with 1.1 and 2.0"
"Loads with 2.0 unless the process is configured to run against 1.1"
What I am saying is that your problem has two sides:
One is the "framework", the other one is the actual error.
The error might have a completely different reason.
You are running the "dll" under completely different permissions.
What if, e.g., you are using an XmlSerializer or webservice-proxy but do not
have the permissions to write into the temp-directory in one of the two
approaches.
So it might be that the "2.0" is causing the problem, but it might be
something else.
If a DLL is hosted by a process it generally runs under the permission set
of that process.
So if you run an exe stand-alone, it has your permissions.
(Be aware however, that a DLL being used by a process can be a
COM+-application and have it's own, different user-context due to that).
If you run it through another application, then you have to check, what the
permissions are that your application is requiring (directly, e.g. writing to
specific directories, or indirectly when for example the XmlSerializer
creates a temporary class) - and which permissions you actually have.
So I recommend:
1. Find out: Who is reporting the error exactly?
2. How is the execution path of the application (including your dll) until
there and what does the application "want" to do.
3. If you can modify the DLL, make it speak to you, say: add debug-output
(e.g. with #if DEBUG sections). (I do not recommend using a debugger for this
scenario as running a debugger changes permissions). So you can find out how
"far" the execution goes.
4. run tools to find out what is going on in the system...
http://www.sysinternals.com/
try "Filemon" first and maybe even "regmon"
In any case: It will involve sound analyzing.
From this information you provided so far, I fear, nobody really can tell
you what might be the problem.