c# - System.IO.PathTooLongException On A URL -


i running issue long url throw system.io.pathtoolongexception. strange because system.io.pathtoolongexception physical files, not related url's.

as example, have url looks following :

products-for-sale.mvc/searchterm1-something/price-1000-1500/searchterm3-etcetc/  

basically search terms bloating out url. allow keyword search can kinda big if user looking specific. side note, .mvc on url hangover of application when ran on iis6 , extensionless url's not supported, shouldn't issue here.

what believe issue is, looks physical file using url. wrong, think issue. every article pathtoolongexception's revolve around actual files, not url's being long.

i had inkling within iis handler mappings, switch off check if physical file exists (i think setting in iis6?), in iis7 under request restrictions of handler mapping, has "invoke handler if request mapped to" , file/folder/file or folder. not ticked .mvc in iis, , there no else have found try , "please don't physical file if using extension".

i way off base guesses on how fix issue.

in .net 4.0 need set httpruntimesection.maxurllength greater 260.

<httpruntime maxurllength="260" /> 

using maxrequestpathlength worked previous .net versions.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -