url has /errorpath - asp.net

I have an issue when I try to access an ASPX page. This aspx page has nothing but the page attribute with codeFile and inherits. Its corresponding aspx.cs file has the code that writes to the aspx file. Everything works fine in my Dev enviornment. When I try to deploy the same in test server and access the page by clicking an hyperlink, I get the foll url
http://tb..hosting.net/review/Search.aspx?aspxerrorpath=/review/Create-xml-writer.aspx
and lands in search.aspx instead of Create-xml-writer.aspx
But the url should be,
http://tb.hosting.net/review/Create-xml-writer.aspx
I did a couple of build and deployed. Still i get the same issue. What does this errorpath=/ mean?

The errorpath part is something that gets passed into a custom error page when an error occurs in ASP.Net, it contains the path of the page that has the problem.
Is search.aspx defined as a custom error page in your web.config file? Turn custom errors off in your web.config file and you should see the actual error message.

Related

Page rendering differently when default.aspx was modified

I have code deployed on IIS server, i just tried to modify some html content in Default.aspx page to show site was in "under construction" mode then later i brought back Default.aspx page as it was in original stage (i had copy of original Default.aspx).
I also added app_offline.html file to root directory to bring site to offline, now removed this file from root.
But now when we access the website IIS renders differently and give actual result only after 6-7 refreshes.
I tried to restart IIS server as i read that iis server is rendering new change structure and forgotten old rendering pattern. But this did not work.
Note: I do not have source code to debug i have only files .aspx files and dll files which are deployed at server.
The content to show that the site was "under construction" should have been placed in the app_offline.html file. I don't understand why you even touched the Default.aspx page. Either way the Default page may now be out of synch with its code-behind file. You don't say how much code, if any, is in the code-behind file. So an option for you now would be to create a new Default.aspx and copy/paste and markup and code involved.
Try fiddler to find out the navigation path. This will help you understand where your request is going.

How to open specific web page in ASP.net that I'm working on or find pages that referring it in Visual Studio 2017

I've edited an ascx.cs page which I thought was relevant. When I ran the service to debug that code it wasn't the right place - The breakpoint didn't stop the service.
I know how to find the right page to edit but now I want to see what did I edit.
How can I open the page or find which pages are referring to it so I could check it also?
Have you "set as startup" that project already ? then try setting that page aspx.cs as "startup page".
After setting above both , your project will start that same projects same page that you have set up as startup.
Alternatively you can type link to that manually in address bar to get there.
While trying to set it as startup page I've found out it ascx and not aspx file. So if You want I wanted to see the edits I would need to load that page as asp controller.

ASP.Net 4.0 Error Message - BC30456: 'Title' is not a member of

I have a ASP.Net 4.0 Web forms page that is giving me the following error on our web server
This page runs correctly on my localhost computer. This is the only page in the web app that has this issue. I've tried coping the contents of the \bin directory to the web server and copying the ASPX web page from my localhost to the web server.
Any thoughts as to what I would try next?
This happened to me when I had two pages with the same "inherits" name.
I copied a "search" page, and renamed it "search2". It worked great "on my machine". :)
Next, I deployed... and got the "'Title' is not a member of" error. My html page had Inherits="Private_Search", the exact same as the page I copied it from! Also, the code behind was the same.
I changed that to Inherits="Private_Search2", and then in the code behind, renamed my class to Private_Search2, and now, no more errors!
If you recently copied a module, renamed it, and ran with it... check the inherits and the code behind class name.
happy coding!
From this thread of ASP.NET forums, it is concluded that you first need to delete all the pages from the bin directory and then copy it again. It might be an issue of caching here! A full refresh might be required to handle this case.

Grid view row command in asp.net?

In web application, in asp.net i am using one grid view, in that i have one link button, in row command event i am binding the url to that link, when i am clicking on that it is logging out, it is coming to login page. In row command i am writing the code like this
Response.Redirect(s, false);
where s containt the url like abc/abc_approval/xyz.aspx. it is giving particularly that url only remaing urls redirecting to their destinations.
when it comes to login page the url like this
Login.aspx?ReturnUrl=%2fabc%2fabc_Approval%2fxyz.aspx
help me please.
This does not seem the problem of redirect, you may have authentication failed on abc/abc_approval/xyz.aspx or any error could cause the redirect to login page. In web.config check the customErrors tag, Login page might be the default for unhandled errors. Put debugger on the suspected page to see if any error occurs.

Link in HTML to go to .aspx page

I have a html page index.html that link to a page default.aspx, both are in my root directory and working fine. The index.html contains a flash object that contains the link to default.aspx. However I want to replace the index page to a normal html page with no flash and I want to move the location of default.aspx to a secure directory. When I do this the default.aspx page does not load, instead I get an error message:
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Only Content controls are allowed directly in a content page that contains Content controls.
Source Error:
Line 224:
Line 225:
Line 226:
Source File: /mcc/default.aspx Line: 226
Does anyone know what I have to do to resolve this
As per my guess, you might be using a "Master Page" and you have given "html/body" tags in the aspx page which is not allowed. So, either use a master page and have a ContentPlaceHolder in the aspx page or remove the master page and have everything in you aspx page directly. My suggestion would be to go with a master page.
Hope this Helps!!

Resources