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