473,395 Members | 1,631 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Caspol -s off in .NET 2.0 error

Hi All,

We are doing development using remote login to distanced development
machines. As our profile is local, when we want to do build in the remote
machine, it takes long time. So in .NET 1.1 we used to switch off the CAS and
do the build. It used to be very much faster. Now, we've upgraded our systems
to .NET 2.0. When we try to build with CAS off, the build is breaking. I've
captured two errors,

Error1:

RegAsm : error RA0000 : Type library exporter encountered an error while
processing 'TradeActivity.IActivityResults.get_Test(#0), TradeActivity'.
Error: Type library exporter cannot load type 'Syste
m.Data.DataSet' (error: System.IO.FileLoadException: Unverifiable code
failed policy check. (Exception from HRESULT: 0x80131402)).

Error2:

Target UnmanagedRegistration:

C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Micros oft.Common.targets(2720,9):
error MSB3212: The assembly "C:\Program Files\MDAFactory.dll" could not be
converted to a type library. Type library exporter encountered an error while
processing 'MDAFactory.StartBatchFetch2(#0), MDAFactory'. Error: Type library
exporter cannot load type 'System.Data.DataTable' (error:
System.IO.FileLoadException: Unverifiable code failed policy check.
(Exception from HRESULT: 0x80131402)).

Btw, we are using nant script to build. Any idea, how we can resolve this
issue?

Thanks in advance.

Regards,
Chester
Dec 22 '06 #1
8 5618
Hello Chester,

From your description, you originally build your application with CAS
turning off to improve performance, however, when you tried this in
building a .NET 2.0 solution, you encountered some errors, correct?

From the error message, it seems the error occured when the build is
processing some COM interop objects (generate TLBexp output). Are you
exposing some managed classes to COM? I've just performed some research and
haven't found any exact matched cases in the internal database. For general
troubleshooting, I would suggest you try create a simple build script which
simply do the tlbexp or related task only to see whether the same problems
remains. If so, we can isolate the issue to a small scope for further
research.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Dec 25 '06 #2
Hi Steven,

You are correct. It is failing when I do tlbexp. So I've created a simple
project with a class, which has a public method returns DataTable. When I try
to do a tlbexp while CAS off, it fails.

Code:

[ClassInterface(ClassInterfaceType.AutoDual)]
[ComVisible(true)]
public class TlbExport
{
public DataTable GetTable()
{
return new DataTable();
}
}

Error :

TlbExp : error TX0000 : Type library exporter encountered an error while
processing 'TlbExport.TlbExport.GetTable(#0), TlbExport'. Error: Type library
exporter cannot load type 'System.Data.DataTable' (error:
System.IO.FileLoadException: Unverifiable code failed policy check.
(Exception from HRESULT: 0x80131402)).

I'm thinking whether it has anything to do with our security.config
settings. But I couldn't figure out anything.

Regards,
Chester

"Steven Cheng[MSFT]" wrote:
Hello Chester,

From your description, you originally build your application with CAS
turning off to improve performance, however, when you tried this in
building a .NET 2.0 solution, you encountered some errors, correct?

From the error message, it seems the error occured when the build is
processing some COM interop objects (generate TLBexp output). Are you
exposing some managed classes to COM? I've just performed some research and
haven't found any exact matched cases in the internal database. For general
troubleshooting, I would suggest you try create a simple build script which
simply do the tlbexp or related task only to see whether the same problems
remains. If so, we can isolate the issue to a small scope for further
research.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Dec 26 '06 #3
Thanks for your reply Chester,

I'll try performing some tests on my local side and will update you if I
get any new finding.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Dec 29 '06 #4
Hello Chester,

I've performed some tests in my local environment and has reproduced the
exact behavior you met. currently I'll discuss with some other engineers to
see whether this is an existing issue or if there is any workaround. I'll
update you as soon as possible.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.

Jan 4 '07 #5
Yes, this behavior is not easy to workaround. I'm still pinging the related
product team on this and will update you if I get any information.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Jan 8 '07 #6
Hello Chester,

Since I haven't got any confirmation on any existing issue on this and this
should be an obvious issue of the tlbexp utility. I have submied a bug
request to the product team internally to ask for any further information
on this. I'll closely monitor it and inform you the latest update.

Thanks for your understanding.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Jan 10 '07 #7
Hello Chester,

Just inform that we're still tracking the submited internal bug request and
the product team is finding proper resource to review on the issue. I'll
keep on informing you the latest update.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Jan 17 '07 #8
Hello Chester,

As for this issue, the product team engineer has identified it and reported
a definite bug to windows sdk team also. Current we haven't got any
solution or workaround on this. However, if you want to further track this
issue, I would suggest you contact CSS since they'll have the more direct
and proper channel to communicate with product team.

Thank for your posting and understanding.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Jan 22 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: LUE42 | last post by:
I am attempting to set a new Code Group security policy using the CASPOL tool. I am using SMS 2 (SP4) to push this job to the client workstations using a script. The script and command work...
3
by: Deepak | last post by:
I have to show a Windows Form user control in a web page using the object tag. Now i have configure the security configuration on the client side using Caspol.exe. Now i need to give all the...
2
by: Craig Miles | last post by:
Hi, I have a couple of small exes compiled using the same .snk file. These exes will be deployed to the client machines using a "No Touch Deployment" scenario from a web server. We need to...
0
by: Peter F | last post by:
Hello I hope you can help my with this... I have made a program in VB.Net, which is suppose to be in a shared directory on a server. Other people can then map the drive and run it from their...
0
by: Jess.Albert | last post by:
The overall problem: -I've got .Net 2.0 code running from a network share (\\server01\share\vb.netcode.exe we'll assume). -Windows won't run code from a share unless it's trusted. -I need to...
1
by: Joe | last post by:
Hi I am just writting a small utility to fire off some Caspol commands I can run Caspol.exe -lg to see the security settings for DotNet thru command line Is there a way to get what...
3
by: DBC User | last post by:
Today when I tried to run a caspol on a box where I have only framework 3.0 and found out that it is not distributed like it does in 2.0 or 1.1 How can I run a caspol on client box where we have...
0
by: =?Utf-8?B?Y3J5cHRpYw==?= | last post by:
Hey, can I execute a FileIOPermission on a mapdrive without using the caspol tool or the mscorcfg configuration editor? - it have to be working If not, can everbody describe a solution to set...
6
by: Brian Gideon | last post by:
I obviously need some education on how caspol -resolveperm works. I was having a problem with my ASP.NET application throwing a SecurityException from System.Web.Extensions.dll. So I tried: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...

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.