Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

httpRuntime Parameter maxUrlLength Does Not Work

Status
Not open for further replies.

HardingR2000

Programmer
Oct 6, 2008
40
US
I am getting the following error:

The path of the item '\SSRS_TrSummMatrixReports\TRSumByCustomerAndDealType.rdl' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash. (rsInvalidItemPath)

I am running .NET 4.0 and Visual Studio 2010. I do not know what version of MVC I am running. How do I find this information?

From hits I have found on the web, I am suppose to be able to change the maxUrlLength to solve this problem. I have tried various settings, but still have not been able to get past this problem.

The maxUrlLength is set in the <system.web> section of Web.config and looks like:
<httpRuntime maxUrlLength="4096" maxQueryStringLength="4096" maxRequestLength="8000" relaxedUrlToFileSystemMapping="true" />

Yes, my URL is probably longer than 260 characters. I am passing 7 parameters, some of which are multi-value parameters (which vary in length). The maxQueryStringLength, maxRequestLength and relaxedUrlToFileSystemMapping parameters that I specified above were just my attempt at fixing the problem.

Note: When I begin typing the <httpRuntime maxUrlLength... the automatic parameter name lookup (sorry I don't know the correct description) did not show maxUrlLength and it was not in the pop-up list, but it did not give an error either.
Can anyone give a newbee like me some guidance on solving this problem?

My code is:

MyReportViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote

MyReportViewer.ServerReport.ReportServerUrl = New System.Uri(" ' Report Server URL

MyReportViewer.ServerReport.ReportPath = "\SSRS_TrSummMatrixReports\TRSumByCustomerAndDealType.rdl" 'Report name

MyReportViewer.DataBind()

Dim reportParameterCollection As Microsoft.Reporting.WebForms.ReportParameter() = New Microsoft.Reporting.WebForms.ReportParameter(7) {}

Dim rptParam(6) AsMicrosoft.Reporting.WebForms.ReportParameter

rptParam(0) = New Microsoft.Reporting.WebForms.ReportParameter("StartDate", dteStartDate.ToString())
rptParam(1) = New Microsoft.Reporting.WebForms.ReportParameter("EndDate", dteEndDate.ToString())
rptParam(2) = New Microsoft.Reporting.WebForms.ReportParameter("Parm_Entity", txtListEntitiesValues.ToString())
rptParam(3) = New Microsoft.Reporting.WebForms.ReportParameter("Parm_DealType", txtListDataTypeValues.ToString())
rptParam(4) = New Microsoft.Reporting.WebForms.ReportParameter("Parm_LeaseRep", txtListLeaseRepValues.ToString())
rptParam(5) = New Microsoft.Reporting.WebForms.ReportParameter("Parm_MktingRep", txtListMktingRepValues.ToString())
rptParam(6) = New Microsoft.Reporting.WebForms.ReportParameter("Parm_DealAreaRep", txtListDealAreaValues.ToString())

MyReportViewer.ServerReport.SetParameters(rptParam)

It is failing on the statement above with the error message I posted earlier. The seven parameters listed above will cause the length of the URL to exceed 260 characters.

1) Why doesn't the maxUrlLength parameter in the Web.config file work?

2) How do I get the complete Url as built by my code so that I can display it in a MSGBOX or some other way?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top