I am getting a 400 error running my WCF service (.NET 3.5) in IIS7 with the following URL:
http://localhost/mrlabatch/MRLABatchProcessingService.svc/events/sr123%20eb/ACCESSCONTROL,ADT,ADTDERIVATION,ADTSTATIONNUMBER,ADTYEAR,CITY,COUNTY,FACILITYTYPE,FEDERALAIDROUTENUMBER,FUNCTIONALCLASSIFICATION,JURISDICTION,LEFTSHOULDERTYPE,LEFTSHOULDERWIDTH,LEFTSIDEWALKWIDTH,MASSDOTHIGHWAYDISTRICT,MEDIANTYPE,MEDIANWIDTH,MPO,NHSSTATUS,NUMBEROFPEAKHOURLANES,NUMBEROFTRAVELLANES,RIGHTOFWAYWIDTH,RIGHTSHOULDERTYPE,RIGHTSHOULDERWIDTH,RIGHTSIDEWALKWIDTH,ROUTEKEY,SPEEDLIMIT,STREETNAME,STREETOPERATION,SUBROUTE,SURFACETYPE,SURFACEWIDTH,TERRAIN,TRUCKROUTE,UNDIVIDEDLEFTSHOULDERTYPE,UNDIVIDEDLEFTSHOULDERWIDTH,URBANIZEDAREA,URBANTYPE/?frommp=8.28489&tomp=10.30031
The url will work fine in when debugging in Visual Studio (specifying a different port of course)
If I shorten the URL it works fine as well in both VS and IIS:
http://localhost/mrlabatch/MRLABatchProcessingService.svc/events/sr123%20eb/ACCESSCONTROL,ADT,ADTDERIVATION,ADTSTATIONNUMBER,ADTYEAR,CITY,COUNTY,FACILITYTYPE,FEDERALAIDROUTENUMBER,URBANIZEDAREA,URBANTYPE/?frommp=8.28489&tomp=10.30031
I’ve tried bumping my maxrequestlength up in the web.config:
Is there another obstruction to the URL size???
Based on this article, it seems that if the URL was too long you would receive a 404 error, not a 400. I would make sure that the requests are the same other than the url length.
You could check the IIS log on the server to make sure that the url (when it reaches the server) is what you are expecting.
It seems there might be a 260 character limit for urls in the .NET framework, but I would think that this would fail in the VS web server as well.