WSE 3.0: can't set maxRequestLength in web.config
- Hi
I'm making a web service to send large amounts of data by using MTOM. I read this help from ms:
http://msdn.microsoft.com/en-us/library/aa529330.aspx
There you can read you must put the following section in web.config if you want to enlarge the size limit in the message:
<system.web>
<httpRuntime maxMessageLength="409600" executionTimeoutInSeconds="300"/>
</system.web>
I can't set both maxMessageLength and executionTimeoutInSeconds neither in web.confg.. vs2005 shows 'Attribute 'maxMessageLength' not recognized'..
I installed WSE 3.0 correctly and I applied the WSE settings as you can read in the help.. in the web.config.
I need to change any other setting to enable maxMessageLength ini the web.config?.
Thanks in advance.
Answers
For WSE 3.0 , the way to add maxMessageLength and executionTimeoutInSeconds is like this :
<configuration>
<microsoft.web.services3>
<messaging>
<executionTimeoutInSeconds value="60" />
<maxMessageLength value="1024" /maxMessageLength>
</messaging>
</microsoft.web.services3>
</configuration>
Pls note that these values 60, 1024 are just for the sake of example it may differ in your case . pls note the hierarchy of the tags and also make sure you have the <microsoft.web.services3> tag registered as a ConfigSection in web.config. It would look something like this :
<configuration>
<configSections>
<section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</configSections>
</configuration>
I hope this helps !- Marked As Answer byAmadeo Casas - MSFTModeratorWednesday, November 04, 2009 5:01 PM
- Proposed As Answer byAnand.Ranganathan Wednesday, November 04, 2009 6:22 AM
All Replies
- Were you aware that WSE is obsolete? You should really try this with WCF.
John Saunders
WCF is Web Services. They are not two separate things.
Use WCF for All New Web Service Development, instead of legacy ASMX or obsolete WSE
Use File->New Project to create Web Service Projects
- Hi John, thanks for your reply
I agree, it would be better to use wcf, but i can just develop in vs05, framework 2.0.
I installed WSE 3.0 correctly and I enable all the WSE 3.0 settings on my web.config, but I can't set 'maxMessageLength' properties in that config.
Any other advice? - No, sorry, I don't know WSE, and hope to never need to know it.
John Saunders
WCF is Web Services. They are not two separate things.
Use WCF for All New Web Service Development, instead of legacy ASMX or obsolete WSE
Use File->New Project to create Web Service Projects
For WSE 3.0 , the way to add maxMessageLength and executionTimeoutInSeconds is like this :
<configuration>
<microsoft.web.services3>
<messaging>
<executionTimeoutInSeconds value="60" />
<maxMessageLength value="1024" /maxMessageLength>
</messaging>
</microsoft.web.services3>
</configuration>
Pls note that these values 60, 1024 are just for the sake of example it may differ in your case . pls note the hierarchy of the tags and also make sure you have the <microsoft.web.services3> tag registered as a ConfigSection in web.config. It would look something like this :
<configuration>
<configSections>
<section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</configSections>
</configuration>
I hope this helps !- Marked As Answer byAmadeo Casas - MSFTModeratorWednesday, November 04, 2009 5:01 PM
- Proposed As Answer byAnand.Ranganathan Wednesday, November 04, 2009 6:22 AM


