Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Maximum request length exceeded?

I am using the Web Service Toolkit in Access to generate the code needed to call a Web Service which in turn sends an email using SMTP. My problem is when sending a large attachment with the email request, I get the error "Maximum request length exceeded". In ASP.NET is would set the maxRequestLength in httpRequest to change the upper limit in the caller. How do I do the same thing from VBA using the generated SOAP call?

Private Sub Class_Initialize()

'*****************************************************************

'This subroutine will be called each time the class is instantiated.

'Creates sc_ComplexTypes as new SoapClient30, and then

'initializes sc_ComplexTypes.mssoapinit2 with WSDL file found in

'http://localhost:3038/EnterpriseDataService.Host/U...

'*****************************************************************

Dim str_WSML As String

Dim c_WSDL_URL As String

'--Read in the WebService URL so that this can be migrated effectivly

c_WSDL_URL = GetAppSetting("Administrative System", "EnterpriseDataService", "UtilityServiceWebService")

If GetCurrentEnvironment() = PROD_ENV Then

c_WSDL_URL = Replace(c_WSDL_URL, "ENVIRONMENT", "")

Else

c_WSDL_URL = Replace(c_WSDL_URL, "ENVIRONMENT", "-" & GetEnvironmentName)

End If

str_WSML = "<servicemapping>"

str_WSML = str_WSML & "<service name='UtilityService'>"

str_WSML = str_WSML & "<using PROGID='MSOSOAP.GenericCustomTypeMapper30' cachable='0' ID='GCTM'/>"

str_WSML = str_WSML & "<types>"

str_WSML = str_WSML & "<type name='EmailInfo' targetNamespace='http://enterprisedataservice.datatypes/2007/09' uses='GCTM' targetClassName='struct_EmailInfo'/>"

str_WSML = str_WSML & "</types>"

str_WSML = str_WSML & "</service>"

str_WSML = str_WSML & "</servicemapping>"

Set sc_UtilityService = New SoapClient30

sc_UtilityService.MSSoapInit2 c_WSDL_URL, str_WSML, c_SERVICE, c_PORT, c_SERVICE_NAMESPACE

'Use the proxy server defined in Internet Explorer's LAN settings by

'setting ProxyServer to <CURRENT_USER>

sc_UtilityService.ConnectorProperty("ProxyServer") = "<CURRENT_USER>"

'Autodetect proxy settings if Internet Explorer is set to autodetect

'by setting EnableAutoProxy to True

sc_UtilityService.ConnectorProperty("EnableAutoProxy") = True

Set sc_UtilityService.ClientProperty("GCTMObjectFactory") = New clsof_Factory_UtilityServic

End Sub

2 Answers

Relevance
  • 4 years ago

    confident, yet that does no longer unavoidably advise that an prolonged cable won't artwork, this is merely that it loses attenuation at longer lengths. long cables will artwork, yet will experience extra packet loss.

  • Anonymous
    1 decade ago

    it seems all correct

Still have questions? Get your answers by asking now.