Why maxRequestLength set is invalid in MVC 3? - asp.net-mvc-3

In the web.config, I've set maxRequestLength to 102400. When I upload a 65M file, it redirects me to a 404 error page, but it is normal in asp.net. This is the current setting:
<httpRuntime requestValidationMode="2.0" maxRequestLength="102400"/>

If you try to upload a small file, its work? I think this kind of error isn't related with maxRequestLength. Verify your Upload Action, or write here for us.

Related

WSDL has the wrong URL in the soap:address location Magento

I am working on Magento Soap API version 2. but During login call I am getting site complete index page HTML instead of valid data.
After Debug using Soap UI I have found that soap:address location URL is incorrect.
URL Coming: http://SITENAME/index.php/?type=v2_soap
Correct URL: http://SITENAME/api/v2_soap/?wsdl=1
I have checked in wsdl xml as well. It have default values there.
Anyone face the same issue ? Please Help !!
If you didn't change anything in Magento's code you should use this URL:
https://yourmagentosite.com/index.php/api/v2_soap/index/
if it will not work, try to use: https://yourmagentosite.com/index.php/api/v2_soap/
Also, keep in mind that some url may not work due to incorrect web server configuration, in this way you should look into web server config.

Error: Permission denied to access property 'CKEDITOR'

I have integrated browse button in ckeditor. The file is uploading but it gives "Image souce URL is missing" and not showing the image.
How can I solve this problem?
Regarding your question, most likely you're executing a cross-domain request, which is disallowed with a regular browser configuration due to several security concerns.
I solved this problem by moving the CKEditor folder to the webroot of cakephp from the js folder inside the webroot and giving the full URL in CKEditor.replace function of the view file.

Razor file loads in on application but not in the other on same server

I have two applications setup in IIS7.5. MVC 3 is installed. One application serves Razor files fine. A separate application was recently created that will not serve Razor files. I get the following error when accessing the file using the full filename (file.cshtml):
This type of page is not served.
Description: The type of page you have requested is not served because it has been explicitly forbidden. The extension '.cshtml' may be incorrect. Please review the URL below and make sure that it is spelled correctly.
When trying to access the file without an extension (/path/file/) I get a 404 error.
I have searched for this problem but haven't found a solution where it works with one application but not another on the same server.
Both applications are using the same App Pool.
Web.Config files are identical.
Do both sites have a CSHTML file in the root of the application? Since the WebPages framework (which is what is used when you request a CSHTML file directly) has a significant impact on your site's performance if you aren't using it, we only start it if there's a CSHTML file in the root folder of your site (i.e. ~/Foo.cshtml). If you don't have any CSHTML files in your root, you can also add a web.config entry to set an appSetting:
<configuration>
<appSettings>
<add key="webpages:Enabled" value="true" />
</appSettings>
</configuration>
If you're confused by my answer, it would help if you edited your question to add information about the file layout of the two apps. Then I can add some concrete examples to try and clarify things :).
Hope that helps!

Resource cannot be found for content inside of theme folders

My project has a feature to override views and content, if they exist, from a themes folder. The path to the themes folder will vary by site, so my folder structure looks like this:
Themes\
SiteA\
Content\
Images\
logo.png
screen.css
Views\
Home\
Index.cshtml
I am able to successfully override the default view with the site's custom one. However I am unable to access anything in the Content folder for the theme. If I access the file directly at http://localhost:port/Themes/SiteA/Content/screen.css, the resource cannot be found. I also get this error when I try to access anything in the images folder. A co-worker was able to do this for a separate project last year, but I cannot find any notable changes to web.config or other files that would make it work. Any help is appreciated!
A co-worker found the problem. When I setup the Themes folders, I copied web.config from Views, which has this option:
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
We changed the path attribute's value from * to *.cshtml and the files are now accessible.
I'm not able to comment so I'm posting here. Do you have a route that matches the url? Try the RouteDebuger to see what route is hit.
Have you checked the permissions on the underlying folder in the file system? In my experience that's often the cause of being unable to access a resource through a URL - the credentials used by the web site may not be granted access to the underlying resource

Getting 401 error in Joomla backend when trying to login\logout or edit anything

I have a website built on Joomla.Everything seemed to be going fine when all of a sudden I am noticing the following.
When I go to the administrator login page, once I fill my details and press login, I am getting a 401.shtml page with following message -
"Not Found
The requested URL /401.shtml was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_perl/2.0.5 Perl/v5.8.8 Server at www.shillingstudios.com Port 80"
Now as per my understanding the 401 error would mean that I do not have the authorization to visit that page or do what I am trying to do.Maybe I am not entering the correct username or password.
However,my username and password are correct.Moreover if I go back to the admin login page I find that I am logged into the administrator panel, which means that my login attempt was successful even though I was directed to 401.shtml page.
The same thing happens when I try to logout(on refresh I find that I had successfully logged out)
When I try to Save/Edit/Close an Article/Category/Section I am redirected to the same page.But in each instance I am actually able to successfully do what I was trying to do.
The only change that I made prior to this issue was installing following plug-ins:
Set Generator tag plug-in
Title Manager plug-in
I installed both plug-ins for SEO purpose from http://extensions.joomla.org/extensions/site-management/seo-a-metadata
I thought that the issue might have caused due to installing these plug-ins so I disabled them, but the problem is still there.
I am trying to setup a website for an Android game that I am developing and Joomla seemed a good option for creating my own website. However I do not have much idea about PHP or MySQL or how Apache server works.So I am not able to determine why this is happening and what can possibly fix this, so any help will be appreciated.
You could try making sure that your website URL is in the 'live site' field in the config.php file. That can sometimes help.
First you should create your custom error pages – you can use a text/HTML editor of your choice (for example Dreamweaver). Once you are ready with the pages, upload them into a subdirectory of your public_html called errors. Then open your main .htaccess file and add the following lines in it:
serve custom error pages
ErrorDocument 400 /errors/400.html
ErrorDocument 401 /errors/401.html
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
ErrorDocument 500 /errors/500.html
Important settings:
Search Engine Friendly URLs: Yes
Use Apache mod_rewrite: Yes
Mod_login settings: All defaults from installation
edit:
I did rename htaccess.txt into .htaccess

Resources