Exception details: system. runtime. interopservices. comexception: Invalid category string

Source: Internet
Author: User
Invalid category string

Note:An error occurred while executing the current Web request. Check the stack trace information to learn about this error andCodeDetailed information about the cause of the error.

Exception details:System. runtime. interopservices. comexception: Invalid category string

Source error:

Row 88: String Ss = server. mappath ("RPT \ s_cardtradedaydetail.rpt "). tostring (); row 89: crystalreportsource1.reportdocument. load (server. mappath ("RPT \ s_cardtradedaydetail.rpt"), openreportmethod. openreportbytempcopy );

This problem occurs when a server is deployed.
Permission problems
There are several solutions
1st. Assign permissions to access COM to the Asp.net account, and configure COM +
2nd. In the system. Web Section of Web. config, add
<Identity impersonate = "true" username = "account with administrator permissions" Password = "corresponding password"/>
To simulate an identity with administrative permissions to run your code.

I used the second method. Why is this problem not found on other servers? It may be that the server permission settings are too high. Please let me know. Thank you!

I found that the second method does not work either, 3rd: add the user network service to the C: \ WINDOWS \ Temp folder and have the modification permission. // I think this is because the CRYSTAL REPORT must generate temporary files in C: \ WINDOWS \ Temp

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.