Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error 404.0 when trying to access added static file type (*.mem) #385

Closed
rkuerbitz opened this issue Apr 17, 2019 · 3 comments
Closed

error 404.0 when trying to access added static file type (*.mem) #385

rkuerbitz opened this issue Apr 17, 2019 · 3 comments

Comments

@rkuerbitz
Copy link
Contributor

rkuerbitz commented Apr 17, 2019

I have the problem that after adding i18n to my project, IIS will not serve additional static file types added via web.config:

<system.webServer>
<staticContent>
<mimeMap fileExtension=".mem" mimeType="application/octet-stream" />
</staticContent>

Browsers will not download .mem files - I get an 404 error. I tried

i18n.LocalizedApplication.Current.UrlsToExcludeFromProcessing = New System.Text.RegularExpressions.Regex("(.mem)$")

but this doesn't help. I also tried setting i18n.UrlLocalizer.UrlLocalizationScheme = i18n.UrlLocalizationScheme.Void - this helps and shows me that the cause must be somewhere in i18n. It seems to me that somehow, when using i18n, the added fileTypes in staticContent are ignored. Could this be the case? If so, what can I do to make this work again?

Any help would be greatly appreciated, because i18n has been a blessing for me so far.

@turquoiseowl
Copy link
Owner

turquoiseowl commented Apr 18, 2019

Are you saying the problem is URL-related?

Please provide details of what URLs work (after setting tweaks etc.) and what URLs don't along with response status.

Static content has popped up here often in the past so suggest you search though all past issues if you haven't already done so.

Browser caching of static content complicates the matter, so helps to have caching disabled in your browser when diagnosing.

Other refs:
#109 (comment)
https://github.com/turquoiseowl/i18n#static-file-compression-and-i18n
#163 (comment)

@rkuerbitz
Copy link
Contributor Author

rkuerbitz commented Apr 20, 2019

Hi Martin, thanks for responding so quickly. I already had checked the refs you mentioned and browsed all relavant issues. Anyway, I decided to change my app to the Void scheme - so now it works and I got rid of all the exclusions associated with URL Localization. If I may suggest something: could you add to the doc a little explanation that the Void scheme will work just fine as "cookie-based" mode. For me, using the Void scheme at first seemed risky (just because it wasn't explained more).
That said, I really enjoy i18n and have a really smooth translation workflow using POEdit. Great work!

@turquoiseowl
Copy link
Owner

Thanks for the feedback and I'm pleased you've got a solution.

WRT the docs, I always think README contributions from users is the best sort, so would be pleased to receive some text from you which I can add, or even better a Pull Request with the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants