|
|
|
Настройка сервера RS 2005 при использовании в отчетах собственных .dll
|
|||
|---|---|---|---|
|
#18+
День добрый. Переломал все бубны. MSDN не дал понимания ровным счетом никакого. Перечитал кучу блогов по этой теме. Безрезультатно. Правил конфиги и добавлял в код в сборку, резултат один #Error при деплое. Вот код сборки. Что конкретно и куда нужно прописать в cfg сервера чтобы это заработало? Imports System.Data Imports System.Data.SqlClient Imports System.Data.OleDb Imports System.Data.DataSet Imports System.Xml Imports system.IO Imports Microsoft.VisualBasic.ApplicationServices Imports System.Security <Assembly: AllowPartiallyTrustedCallers()> Public Class Creator Public Shared Function RDFEF(ByVal strFilePath As String, ByVal strSheetName As String, ByVal name As String) As String If strFilePath Is Nothing Then Throw New NullReferenceException("strFilePath") If File.Exists(strFilePath) = False Then Throw New FileNotFoundException(strFilePath) If String.IsNullOrEmpty(strSheetName) Then Throw New Exception("Empty sheet name.") ' define con. params Dim str As String = String.Format("Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source={0};Extended Properties=""Excel 8.0;HDR=YES;""", strFilePath) Dim permission As New SqlClientPermission(Security.Permissions.PermissionState.Unrestricted) permission.Assert() ' init con. Dim cnn As New System.Data.OleDb.OleDbConnection(str) ' open con. to xl file Try cnn.Open() Catch ex As Exception cnn.Dispose() Throw ex End Try ' query str. (like any ordinary SQL) Dim strSQL As String = String.Format("SELECT [F6] FROM [" + strSheetName + "$] where [РЕЕСТР ОТЧЕТОВ СЕРВЕРА ОТЧЕТНОСТИ]='" + name + "'") ' init data adapter Dim da As New System.Data.OleDb.OleDbDataAdapter(strSQL, cnn) ' init data set Dim ds As New System.Data.DataSet(strSheetName) ' read xl data Try da.Fill(ds) Catch ex As Exception da.Dispose() ds.Dispose() cnn.Close() Throw ex End Try ' close connections and dispose objects da.Dispose() cnn.Close() cnn.Dispose() Return ds.GetXml() End Function End Class P.S. за код не пинать, с .net знаком слабо слабо, взял готовый вариант, примерно мне подходящий по задаче, и исправил на то, что мне нужно. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.02.2009, 16:42 |
|
||
|
Настройка сервера RS 2005 при использовании в отчетах собственных .dll
|
|||
|---|---|---|---|
|
#18+
http://msdn.microsoft.com/en-us/library/ms152828(SQL.90).aspx http://msdn.microsoft.com/en-us/library/ms154658(SQL.90).aspx --- This posting is provided "AS IS" with no warranties, and confers no rights. TechNet RU SQL форум ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 09.02.2009, 22:25 |
|
||
|
Настройка сервера RS 2005 при использовании в отчетах собственных .dll
|
|||
|---|---|---|---|
|
#18+
Спасибо за ответ. И это читал. И делал как написано. Не помогло. Может правда с руками чего, но не месяц же непрекращающихся попыток? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.02.2009, 09:39 |
|
||
|
Настройка сервера RS 2005 при использовании в отчетах собственных .dll
|
|||
|---|---|---|---|
|
#18+
можно попробовать под отладчиком из report designer'a. --- This posting is provided "AS IS" with no warranties, and confers no rights. TechNet RU SQL форум ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.02.2009, 22:57 |
|
||
|
Настройка сервера RS 2005 при использовании в отчетах собственных .dll
|
|||
|---|---|---|---|
|
#18+
Можно поподробнее? Локально у меня все работает, как часы. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.02.2009, 10:17 |
|
||
|
Настройка сервера RS 2005 при использовании в отчетах собственных .dll
|
|||
|---|---|---|---|
|
#18+
попробуйте включить verbose logging на сервере ( см http://%5Dhttp://msdn.microsoft.com/en-us/library/ms156500(SQL.90).aspx%5B/url]) дайте вашему коду full trust --- This posting is provided "AS IS" with no warranties, and confers no rights. TechNet RU SQL форум ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.02.2009, 22:05 |
|
||
|
Настройка сервера RS 2005 при использовании в отчетах собственных .dll
|
|||
|---|---|---|---|
|
#18+
У меня все нормально работает. Почитай тут:http://vfox.kristall.ru/rs1.html С уважением, Алексей ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.02.2009, 09:38 |
|
||
|
Настройка сервера RS 2005 при использовании в отчетах собственных .dll
|
|||
|---|---|---|---|
|
#18+
Итак по порядку. Создал сборку Excel.dll (код в первом посте) Положил ее в папки ...\reportserver\bin\ и ...\Reporting Services\ReportManager\bin В файл конфигурации rssrvpolicy.config добавил следующие записи: В раздел PermisionSets <PermissionSet class="NamedPermissionSet" version="1" Name="MyDatabasePermissionSet" Description="A special permission set that grants sql access."> IPermission class="SqlClientPermission" version="1" Unrestricted="true" /> <IPermission class="SecurityPermission" version="1" Flags="Execution, Assertion" /> <IPermission class="FileIOPermission" version="1" Read="C:\Reestr.xls" /> </PermissionSet> В раздел Codegroup </CodeGroup> ... вот сюда... </CodeGroup> </CodeGroup> </PolicyLevel> Добавил запись <CodeGroup class="UnionCodeGroup" version="1" PermissionSetName= "FullTrust" Name="Excel" Description=""> <IMembershipCondition class="UrlMembershipCondition" version="1" Url="C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin\Excel.dll"/> </CodeGroup> Запускаю отчет - в том месте где я вызываю метод получаю #Error Лог ReportServer __.log (то что нашел касаемо моего многострадального) <Header> <Product>Microsoft SQL Server Reporting Services Version 9.00.1399.00</Product> <Locale>en-US</Locale> <TimeZone>Pacific Standard Time</TimeZone> <Path>C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles\ReportServer__02_11_2009_23_32_49.log</Path> <SystemName>BUVEN</SystemName> <OSName>Microsoft Windows NT 5.2.3790 Service Pack 2</OSName> <OSVersion>5.2.3790.131072</OSVersion> </Header> w3wp!webserver!1!2/11/2009-23:32:50:: i INFO: Reporting Web Server started w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing ConnectionType to '0' as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing IsSchedulingService to 'True' as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing IsNotificationService to 'True' as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing IsEventService to 'True' as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing PollingInterval to '10' second(s) as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing WindowsServiceUseFileShareStorage to 'False' as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing MemoryLimit to '60' percent as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing RecycleTime to '720' minute(s) as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing MaximumMemoryLimit to '80' percent as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing MaxAppDomainUnloadTime to '30' minute(s) as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing MaxQueueThreads to '0' thread(s) as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing IsWebServiceEnabled to 'True' as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing MaxScheduleWait to '5' second(s) as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing DatabaseQueryTimeout to '120' second(s) as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing ProcessRecycleOptions to '0' as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing RunningRequestsScavengerCycle to '60' second(s) as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing RunningRequestsDbCycle to '60' second(s) as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing RunningRequestsAge to '30' second(s) as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing CleanupCycleMinutes to '10' minute(s) as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing DailyCleanupMinuteOfDay to default value of '120' minutes since midnight because it was not specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing WatsonFlags to '1064' as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing WatsonDumpOnExceptions to 'Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException,Microsoft.ReportingServices.Modeling.InternalModelingException' as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing WatsonDumpExcludeIfContainsExceptions to 'System.Data.SqlClient.SqlException,System.Threading.ThreadAbortException' as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing SecureConnectionLevel to '0' as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing DisplayErrorLink to 'True' as specified in Configuration file. w3wp!library!1!2/11/2009-23:32:50:: i INFO: Initializing WebServiceUseFileShareStorage to 'False' as specified in Configuration file. w3wp!resourceutilities!1!2/11/2009-23:32:50:: i INFO: Reporting Services starting SKU: Enterprise w3wp!resourceutilities!1!2/11/2009-23:32:50:: i INFO: Evaluation copy: 0 days left w3wp!runningjobs!1!2/11/2009-23:32:50:: i INFO: Database Cleanup (Web Service) timer enabled: Next Event: 600 seconds. Cycle: 600 seconds w3wp!runningjobs!1!2/11/2009-23:32:50:: i INFO: Running Requests Scavenger timer enabled: Next Event: 60 seconds. Cycle: 60 seconds w3wp!runningjobs!1!2/11/2009-23:32:50:: i INFO: Running Requests DB timer enabled: Next Event: 60 seconds. Cycle: 60 seconds w3wp!runningjobs!1!2/11/2009-23:32:50:: i INFO: Memory stats update timer enabled: Next Event: 60 seconds. Cycle: 60 seconds w3wp!library!8!02/11/2009-23:32:57:: i INFO: Call to GetPermissions:/ w3wp!library!8!02/11/2009-23:32:59:: i INFO: Catalog SQL Server Edition = Enterprise w3wp!library!8!02/11/2009-23:33:03:: i INFO: Call to GetSystemPermissions w3wp!library!8!02/11/2009-23:33:13:: i INFO: Call to GetPermissions:/reports_list1 w3wp!library!8!02/11/2009-23:33:16:: i INFO: Call to GetSystemPermissions w3wp!library!5!02/11/2009-23:33:23:: i INFO: Call to RenderFirst( '/reports_list1' ) w3wp!library!5!02/11/2009-23:33:25:: Using folder C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\RSTempFiles for temporary files. w3wp!webserver!5!02/11/2009-23:33:26:: i INFO: Processed report. Report='/reports_list1', Stream='' w3wp!library!1!2/11/2009-23:42:51:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams ТО что в логе написано, мне не очень понятно. Что и где я мог забыть? Думаю, было мне было бы полезно посмотреть нормально настроеный rssrvpolicy.config. Если есть такая возможность, киньте сюда пожалуйста. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.02.2009, 11:43 |
|
||
|
Настройка сервера RS 2005 при использовании в отчетах собственных .dll
|
|||
|---|---|---|---|
|
#18+
я бы заменил все throw на return "описание ошибки" --- This posting is provided "AS IS" with no warranties, and confers no rights. TechNet RU SQL форум ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 13.02.2009, 23:12 |
|
||
|
Настройка сервера RS 2005 при использовании в отчетах собственных .dll
|
|||
|---|---|---|---|
|
#18+
А что это даст? Либа локально отрабатывает нормально. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 16.02.2009, 11:03 |
|
||
|
Настройка сервера RS 2005 при использовании в отчетах собственных .dll
|
|||
|---|---|---|---|
|
#18+
Локально (в обычном preview) custom code исполняется с full trust. используйте debuglocal --- This posting is provided "AS IS" with no warranties, and confers no rights. TechNet RU SQL форум ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 18.02.2009, 22:47 |
|
||
|
|

start [/forum/topic.php?fid=31&msg=35802351&tid=1536360]: |
0ms |
get settings: |
8ms |
get forum list: |
20ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
45ms |
get topic data: |
10ms |
get forum data: |
2ms |
get page messages: |
58ms |
get tp. blocked users: |
1ms |
| others: | 216ms |
| total: | 366ms |

| 0 / 0 |
