Reporting Server Web Service- (FileShare) CreateSubscription: The value of parameter 'ExtensionSettings' is not valid
I've tried to create a subscription by Web Service api calling the method CreateSubscription and I've an error: 

> The value of parameter 'ExtensionSettings' is not valid. --->
> Microsoft.ReportingServices.Diagnostics.Utilities.InvalidParameterException:
> The value of parameter 'ExtensionSettings' is not valid.


 Below is my code:

 

     

ReportingService2010 m_RptManager = new ReportingService2010();     

m_RptManager.Url = "<path>/ReportService2010.asmx";     

m_RptManager.Credentials = GetCredential();     

string filename = Path.GetFileName(m_FileName);     

string path = Path.GetDirectoryName(m_FileName);     

ParameterValue[] extensionParams = new ParameterValue[7];     

for (int i = 0; i < extensionParams.Length; i++)             

extensionParams[i] = new ParameterValue();     

extensionParams[0].Name = "FILENAME";     

extensionParams[0].Value = filename;     

extensionParams[1].Name = "FILEEXTN";     

extensionParams[1].Value = "False";     

extensionParams[2].Name = "PATH";     

extensionParams[2].Value = path;     

extensionParams[3].Name = "RENDER_FORMAT";     

extensionParams[3].Value = m_Format;     

extensionParams[4].Name = "WRITEMODE";     

extensionParams[4].Value = "Overwrite";     

extensionParams[5].Name = "USERNAME";     

extensionParams[5].Value = m_UserName;     

extensionParams[6].Name = "PASSWORD";     

extensionParams[6].Value = m_Password;     

ExtensionSettings extensionSettings = new ExtensionSettings();     

extensionSettings.Extension = "Report Server FileShare";     

extensionSettings.ParameterValues = extensionParams;     

MinuteRecurrence pattern = new MinuteRecurrence();     

pattern.MinutesInterval = 1;     

ScheduleDefinition schedule = new ScheduleDefinition();     

schedule.StartDateTime = DateTime.Now;     

schedule.EndDateSpecified = false;     

schedule.Item = pattern;     

XmlSerializer serializer = new XmlSerializer(typeof(ScheduleDefinition));     

string dateMatch;     

using (StringWriter sw = new StringWriter())           

{               

serializer.Serialize(sw, schedule);               

dateMatch = sw.ToString();           

}     

string reportPath = "MyReport";     

string eventType = "TimedSubscription";     

string description = "description";     

m_RptManager.CreateSubscription(reportPath, extensionSettings, description, eventType, matchData, GetReportParameters(reportPath));




Where have I wrong? 
  • Edited by GeFabio 17 hours 24 minutes ago
April 27th, 2015 9:42am

Hi GeFabio,

Base on my research, this issue may be caused by the settings of your delivery extension. The file share delivery extension have many settings, maybe one of them is incorrect. For more information about Reporting Services Delivery Extension Settings, please see: http://msdn.microsoft.com/en-us/library/ms154020(v=sql.90).aspx

Please first check if this "extensionParams[2].Value = path;", It seems the path is incorrect, in the file share delivery, When specifying the target folder in a subscription, use Uniform Naming Convention (UNC) format that includes the computer's network name. Do not include trailing backslashes in the folder path. The following example illustrates a UNC path:
\\<servername>\reportarchive\operations\2003

More details information, please reference to the article below:
CreateSubscription Method
Report Server Web Service Endpoints
Using CreateSubscription and the Reporting Service API

Please also check if other parameters are correct too.

If you still have any problem, please feel free to ask.

Regards,
Vicky Liu

Free Windows Admin Tool Kit Click here and download it now
April 28th, 2015 12:47am

Thank for reply, I checked my parameter and I seem that (maybe) is  ok below is my parameters, do you see anything of wrong?

<?xml version="1.0" encoding="utf-16"?>
<ExtensionSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Extension xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer">Report Server FileShare</Extension>
  <ParameterValues xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer">
    <ParameterValue>
      <Name xmlns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">FILENAME</Name>
      <Value xmlns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">pippo.xls</Value>
    </ParameterValue>
    <ParameterValue>
      <Name xmlns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">FILEEXTN</Name>
      <Value xmlns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">False</Value>
    </ParameterValue>
    <ParameterValue>
      <Name xmlns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">PATH</Name>
      <Value xmlns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">\\10.4.44.253\D$\Data Applications\DBP\Output\DOMAIN\User\14</Value>
    </ParameterValue>
    <ParameterValue>
      <Name xmlns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">RENDER_FORMAT</Name>
      <Value xmlns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">EXCEL</Value>
    </ParameterValue>
    <ParameterValue>
      <Name xmlns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">WRITEMODE</Name>
      <Value xmlns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">Overwrite</Value>
    </ParameterValue>
    <ParameterValue>
      <Name xmlns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">USERNAME</Name>
      <Value xmlns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">domain\user</Value>
    </ParameterValue>
    <ParameterValue>
      <Name xmlns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">PASSWORD</Name>
      <Value xmlns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">xxxxxx</Value>
    </ParameterValue>
  </ParameterValues>
</ExtensionSettings>

 
April 28th, 2015 2:38am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics