i have an issue with url lengths in iis7. If you go to:
http://www.somesite.com/myaccount/login.htm?ReturnUrl=aa2Fmyaccounta2FdefaultaaspxadnoaauserSuppliedIdentifierahttpa3Aa2Fa2Faaaaaaamaapenidacoma2Fadnoaareturnatoasigahandleaa7B633942228855348748a7Da7BaRINLQa3Da3Da7DadnoaareturnatoasigaxSa2FFPGusD7UvskGqfkJq4QtEYjc4fSVFoa2F3sXNwCBteGOBJ8mipo7yLsuSk2hEgLogbzn6SthYb0wY3pBQM1OQa3Da3Daopenidaassocahandleaa7BHMACaSHA256a7Da7B4b051c2ba7Da7ddufPa2BAa3Da3Da7Daopenidaclaimedaidahttpa3Aa2Fa2Faaaaaaaaaopbnidacoma2Faopenidaidentityahttpa3Aa2Fa2Faaaaaaaabcpenidacoma2Faopenidamodeaidaresaopenidansahttpa3Aa2Fa2Fspec
The page will load fine but if you add one more character to the end it will throw an error. This might seem abit picky to you but it's stopping me from using open id on my login form since it returns a long url. One option i did consider was changing the requestFiltering, therefore in my web.config i have the following:
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxQueryString="999999999" maxUrl="999999999" />
</requestFiltering>
</security>
</system.webServer>
But this did not resolve the issue. I'd appreciate it if someone could help. Thanks
nfplee - Are you using Ionics Isapi Rewrite Filter (IIRF) by any chance? I just ran into the same issue where long urls always returns a 404.
If I disable IIRF everything works fine.
This is a limitation of Windows and there is currently no workaround
See this StackOverflow article for more information:
ASP.NET url MAX_PATH limit
You may do something in web.config as follows.
<system.web>
<httpRuntime maxUrlLength="4000"/>
</system.web>
Related
After moving a EPI6 site to my local machine and reconfiguring it for IIS7.5 (instead of IIS6) i have a problem.
The UI Admin/Edit backend has no CSS. I suspected this was due to the virtual path mapping and i found that they where all mapped to %ProgramFiles% but on my local machine EPI is installed on %ProgramFiles(86)%. So i changed it and made sure all physical paths worked. They did.
So i felt smart and expected the CSS to load properly but no change happened.
I have tried ctrl F5 to see if its a caching problem, i have restarted the IISExpress. But still no CSS.
Any tips on something i might have forgotten?
Check using Firebug Net-tab or equivalent F12 web browser tool to see exactly which paths don't respond correctly.
Check permissions on disk for the Program Files directories in questions.
Compare Web.config to a default EPiServer IIS7 web.config to see that you have all handlers in the correct place.
I solved this.
It was not a problem of rights, but rather a configuration error. When uppgrading fom using IIS6 to IIS7.5 i forgot changing in the Web.Config:
IIS6 version
<location path="App_Themes/Default" />
to:
IIS7.5 version
<location path="App_Themes/Default">
<system.webServer>
<handlers>
<clear />
<add name="wildcard" path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" />
</handlers>
</system.webServer>
</location>
We had some content restructure recently and I'd like to put in some redirect rules into web.config so bookmarks to the old pages can get routed to their new locations/pages.
I tried using this approach:
<location path="~/product/productA.aspx">
<system.webServer>
<httpRedirect enabled="true" destination="~/product/category/productA.aspx" exactDestination="false" childOnly="true" httpResponseStatus="Permanent" />
</system.webServer>
</location>
But all I'm getting when I go to "http://www.oursite.com/product/productA.aspx" is our http 404 page.
Am I doing something wrong, or is the httpRedirect tag in web.config not supported in mono?
Thank you :)
is an IIS 7 specific tag, so you should not expect it work for any other platforms. No IIS 5/6, and no Mono.
I am testing a HttpHandler that accepts XML. It works fine when a small amount of data is posted but if I post data larger then approx 29mb, I get a asp.net 404 Error.
I am posting to the handler from another handler in the same project and I have tried 2 methods -
1. HttpWebRequest with "POST"
2. WebClient with UploadFile() and UploadData()
I get the same 404 error when the posted data is above 28.6 MB.
I also tried putting a breakpoint right in the beginning of the receiving handler and debugging. It is never hit. Appears like the handler was never called. Works ok for smaller sized data.
I already have the following setting. What am I doing Wrong?
<httpRuntime maxRequestLength="1048576" />
EDIT: I have also tried posting to a different handler that doesnt not consume posted data, just to test, but the results are the same.
Environment: Win 7, IIS 7.5, .net 3.5, VS 2008
alt text http://img401.imageshack.us/img401/4099/errormr.png
I discovered that the problem is with IIS 7 and above. It requires the max request length to be set in a different place.
See the following links -
http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_22943810.html
http://msdn.microsoft.com/en-us/library/ms689462%28VS.90%29.aspx
The default value is 30000000. which is 28.6mb. The correct way to set in web.config is -
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824"></requestLimits>
</requestFiltering>
</security>
</system.webServer>
This config cleared the error I was getting. I wish the errors reported were more descriptive, at least on local machines
Does this mean that setting <httpRuntime maxRequestLength="1048576" /> is enough for IIS 6 ? (the live server is win2003)
Try to add this section to the web.config file:
<location path="YourHandler.aspx">
<system.web>
<httpRuntime maxRequestLength="1048576" executionTimeout="3600" />
</system.web>
</location>
assuming you handler path is YourHandler.aspx.
For anything under the Scripts or Content folders in my ASP.NET MVC application, I am getting the following error:
The page cannot be displayed because an internal server error has occurred
That's the response in its entirety (excepting the headers) - nothing else. I am hosting this on GoDaddy, and have not had problems with this application before. What did I do to screw this up?! Working on 4 hours of sleep isn't helping matters...
This would be appropriate here:
"It takes considerable knowledge just to realize the extent of your own ignorance."
-Thomas Sowell
So, when struggling to get a Flash-based, JavaScript-configured component to work in my web app, I added a staticContent node to my web.config, with a mimeMap node as a child:
<configuration>
...
<system.webServer>
...
<staticContent>
<mimeMap fileExtension=".mp4" mimeType="video/mpeg" />
</staticContent>
</system.webServer>
</configuration>
When I commented-out the entire staticContent node, everything worked just fine. I didn't know that adding a mimeMap here would cause all of the default mimeMaps (specified within the server's ApplicationHost.config) to be overridden, because that seems to be exactly what is going on...Then again, I am merely guessing - either way, not very easy to figure out.
Thank you to everyone that responded, I appreciate it!
In your web.config file, find the customErrors section and change mode to Off.
<customErrors mode="Off">
</customErrors>
Changing that will give you a more descriptive error.
I had the same issue when upgrading to a newer version of IIS, though with a different mime type. As you also surmised, I believe the new version must already have the type registered (or the host did it at the machine level). I solved it by putting "remove" before the "add" - all my content started showing up again. I would think this would prevent having to modify the config between dev and prod.
<staticContent>
<remove fileExtensions=".mp4" />
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
</staticContent>
This has been edited to replace video/mpeg with video/mp4. /mpeg still worked for me, but apparently mp4 is recommended.
Can you turn off Simple error messages?
Perhaps you could try putting
routes.IgnoreRoute("Scripts");
routes.IgnoreRoute("Content");
in your route register?
Also make sure that if you are using the built-in authentication, you have this bit in your web.config, though I think it isn't your problem:
<location path="public">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
Hmm, do you have any control of IIS on that hosting? Maybe they have a wildcard mapping interfering. That's happened to us before with site minder.
Download Phil Haack's Route Debugger, then try navigating to one of the Scripts. You might be catching them in your routes.
We have an ASP.NET 3.5 app running in IIS6 we're migrating to IIS7 & the integrated pipeline. Our app does some very simple URL rewriting to examine a URL like this:
website.com/dealer/page.aspx
stripping 'dealer' out, looking it up in the DB for context and going to page.aspx.
In IIS6 this was a wildcard map. I moved the module to the right place in web.config for IIS7:
<system.webServer>
<modules>
<add name="ModuleRewriter"
type="Insignia.Catalog2.ModuleRewriter, Insignia.Catalog2"
preCondition="" />
And it works - almost. Paths like these work:
website.com/dealer/page.aspx
website.com/dealer/
The latter defaults to the index.aspx page. My problem is, this one doesn't:
website.com/dealer
note the missing slash at the end. I get a 404. What am I missing?
UPDATE:
It has something to do with the Static file handler - if I disable that, the URL maps correctly, but then static stuff doesn't work...
Well, I got it to work by modifying the modules tag:
<modules runAllManagedModulesForAllRequests="True">
but this is definately cargo-cult-ish because i don't know what it's doing yet.