Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / October 2006

Tip: Looking for answers? Try searching our database.

C# click once application with report and reference to assembly

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
reifen-straub - 10 Oct 2006 14:36 GMT
Hi, we have a C# click once application with a report.
This report has a reference to an assembly to calculate some things.

If we run this application locally with the 'click once' checkbox
unchecked, everything works.
But if we publish the application and for this automatically click once
gets checked, we get the following error message within the report:

Error during the local report processing. The definition of the report
"main report ' is invalid. Unexpected error during the report
processing. Error during the requirement of the type of authorization
System.Security.Permissions.FileIOPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.

We don`t have any further ideas how to fix this problem.
Does anybody know a solution for this?
Andy - 10 Oct 2006 17:49 GMT
are you sure the report is included in the clickonce manifest?  Check
out the .application and .deployment files to make sure.

A better idea might be to embed the report as a resource into your
application.

Andy

> Hi, we have a C# click once application with a report.
> This report has a reference to an assembly to calculate some things.
[quoted text clipped - 12 lines]
> We don`t have any further ideas how to fix this problem.
> Does anybody know a solution for this?
reifen-straub - 12 Oct 2006 14:52 GMT
> are you sure the report is included in the clickonce manifest?  Check
> out the .application and .deployment files to make sure.
[quoted text clipped - 3 lines]
>
> Andy

Hi Andy,

I have a [REPORT_NAME].deploy file on the server and it`s also
downloaded to the folder, click-once created onto the client.
I also can change the characteristic of the report from content to
embeded resource and it makes no difference. If I activate click-once,
I cannot access the report and if it`s not activated, it works.

I think the error occurs because I have this reference to my assembly
in the report. Without this everything works.
Also if I start the application from the [APPLICATION.EXE] which was
downloaded into the folder, click-once created onto the server, I can
access the report in the application. But in this why I work only
locally and the application doesn`t check for any updates.

Here a part of the code I use for the assembly and for the report:

reportViewer1.LocalReport.ExecuteReportInCurrentAppDomain(AppDomain.CurrentDomain.Evidence);

this.reportViewer1.ProcessingMode = ProcessingMode.Local;
this.reportViewer1.LocalReport.AddTrustedCodeModuleInCurrentAppDomain("[NAME_OF_THE_DLL],
Version=1.0.0.0, Culture=neutral, PublicKeyToken=[TOKEN_OF_THE_DLL]");
this.reportViewer1.LocalReport.ReportPath =
"berichte\\monatsbericht.rdlc";
this.reportViewer1.RefreshReport();

and this i have added to the DLL:

[assembly: System.Security.AllowPartiallyTrustedCallers]

Any ideas?

Thanks for your help!

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.