Error executing child request for - asp.net-mvc-3

In my MVC3 application I'm getting the above mention error when I try to handle a maximum request exceeded error.
I'm handling the exception at the application level. I'm trying to redirect to an error page that's located in the Shared folder of the views.
I'm using the code below to redirect to an error page if the request size is over the limit.
this.Server.ClearError();
this.Server.Transfer("~/Views/Shared/NotAuthorised.cshtml");
This is the error im getting.
Error executing child request for /SiteName/Views/Shared/NotAuthorised.cshtml

According to the Microsoft documentation (Error Executing Child Request" Error Message When You Use Server.Transfer or Server.Execute in ASP.NET Page) you cannot use Server.Transfer after an application level error.
Microsoft Internet Information Services (IIS) dispatches the
Server.Transfer or the Server.Execute request to the appropriate
Internet Server Application Programming Interface (ISAPI) extension
based on the extension of the requesting file. For example, a request
for an .aspx page is dispatched to the Aspnet_isapi.dll ISAPI
extension.
After the request is dispatched to appropriate ISAPI extension, the
ISAPI extension cannot call another ISAPI extension. You receive the
error message that is listed in the "Symptoms" section because the
Aspnet_isapi.dll file, which handles requests to ASP.NET pages, cannot
forward the request to the Asp.dll file, which handles requests to ASP
pages.
You can however use Response.Redirect(path) like this:
Response.Redirect("Home/About");

Related

ASP.NET Core MVC : catch 503 error and redirect to view

In my ASP.NET Core MVC application, I'm trying to catch and isolate 503 error which is coming from the API project, we are intentionally stopping the app pool for the API in order to get the error and instead of this screen:
I want to redirect to a specific view, for example /Home/Error, is there an option to do that in the configuration of the ASP.NET Core MVC project?
Your application running in (or being accessed through) the ASP.NET Core Module is the service that is reported to be unavailable by this error page.
The 503 is returned by IIS, not by your application. The whole reason the 503 is returned, is because your application doesn't respond to IIS, so even if you wanted to, you can't return it from your application.
See Custom Error Page for Http Error 503 to change the IIS 503 error page.

JMeter & Salesforce : Facing an error as 'Error occurred while loading a Visualforce page. Attempt to de-reference a null object'

I am creating script in JMeter for a Salesforce application but I am Facing an error as
Error occurred while loading a Visualforce page. Attempt to de-reference a null object' for one of my POST request.
Response code received is 500 with message 'Server Error'
HTTP Status 500 stands for Internal Server Error, you should look into your server logs in order to get to the bottom of the issue.
If you don't have access to your application logs - you can perform some client-side troubleshooting, the common way is to capture the request which is being sent by JMeter and the real browser using a sniffer tool like Wireshark or Fiddler and compare them. The requests should look exactly the same (apart from dynamic values which need to be correlated)
You should pay attention not only to the request body, but also HTTP Headers (including Cookies) as everything matters.
You might also want to check out JMeter – Logging Into Salesforce for Automated Testing article

Issues accessing socialauth via ajax

I am developing a server side web app using spring socialauth library by 3 pillars lab.
When accessing this web app using href in an anchor tag, I am able to invoke the 3rd party application (in my case, facebook) page.
But when i tried calling it using jquery ajax I got "Allow origin header error". On searching for this error, I found out that this error is due to the ajax calling page and the URL, it is trying to call, being on different domains. I have changed the headers in my webapp as: "allow origin to *". After this, my webapp does not throw this "allow origin header" error but now 3rd party app is throwing this error.
I have tried two types of Cross domain ajax method :
JSONP: with this i am able to hit even 3rd party url via ajax but it is throwing an error
"Resource interpreted as Script but transferred with MIME type text/html"
As per my understanding, it is throwing error because this method expects JSONP as response instead getting text/html in response.
CORS (Cross-Origin Resource Sharing):
In this also, facebook is throwing allow origin header.
I want to make ajax call to facebook using my webapp that uses socialauth library and it should display facebook page. Plus i dont want to redirect it.
I am stuck at this. Please help.

JMeter - Error in URL Redirection

I was trying to issue a https request through jmeter and observed am getting Error Page response data for login page (Post Method).
login page url redirecting to different url (i.e. Application Home Page) but my login page redirect to the Error page.
And for Post req sampler i got error code 302 - Object moved to here.
Any help in resolving this issue would be a great help.
Probable https server that does not give a certificate or certificate must specify clearly in jmeter
This sounds like you're not handling some dynamic authentication token which is required in the post data or in the HTTP header.
There is probably a dynamically generated auth token on the page of the form itself (or the HTTP header) which you need to use instead of a static value.
You can capture the dynamic value with a post processor regular expression and then pass it in to the next request with the updated value.
There is a JMeter webinar which also covers exactly this scenario and how to solve it:
https://www.youtube.com/watch?v=cv7KqxaLZd8
UPDATE 1:
Sound like you're testing an asp.net application. They can be very finicky with JMeter. Check out these articles and other SO solutions:
asp.net login testing with jmeter
http://wiki.apache.org/jmeter/JMeterTesting/ASPNETViewState
How to use JMeter for load testing ASP.net web applications implementing viewstate

500 internal server error while trying to use the registration form

I am using the registration form that is already available in the user manager option in my website.
But once I click on the register button I get this message:
Server error The website encountered an error while retrieving
http://prachi.matrimony4me.in/index.php/sample-sites-2?task=registration.register.
It may be down for maintenance or configured incorrectly. Here are
some suggestions: Reload this webpage later. HTTP Error 500 (Internal
Server Error): An unexpected condition was encountered while the
server was attempting to fulfill the request.
Try turing off SEF in the main joomla configuration.
refresh the page and try agian?
are you using
JRoute:_('index.php') or JRoute:_('index.php?option=com_users')
in your form action?
the link just looks wrong.
Is that the default registration form ? there shouldnt be any task in the url.

Resources