我在 IIS7 中使用以下 URL 运行 WCF 服务 (.NET 3.5) 时遇到 400 错误:
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
在 Visual Studio 中调试时,该 url 将正常工作(当然指定不同的端口)
如果我缩短 URL,它在 VS 和 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
我尝试在 web.config 中增加我的 maxrequestlength:
URL大小是否有其他障碍???