-
Dec 11th, 2010, 09:58 PM
#1
Thread Starter
Fanatic Member
avoid generic error
how can avoid error
Not Found
The requested document was not found on this server.
--------------------------------------------------------------------------------
Web Server at gfln.org
There is no achievement without goals
-
Dec 12th, 2010, 09:05 AM
#2
Thread Starter
Fanatic Member
Re: avoid generic error
i have page in asp.net 3.5 i have certain paging in applciation in gridview ,
initially it workis fine but after some time when i click on select button in row of grid to show records it says me
page not found /REsource not found server error
Code:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ViewCompany1.aspx.vb" Inherits="gfln1.ViewCompany1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
<style>
</style>
<script runat=server>
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
<div>
<div class="right_txt_space_accm">
<asp:SqlDataSource ID="SqlDataSource3" ConnectionString="<%$ ConnectionStrings:reniConnectionString %>"
runat="server" SelectCommand="select * from user_company where userid=@userid" runat="server"></asp:SqlDataSource>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align=left width="100%">
<asp:GridView AllowPaging=True ID="GridView1" runat="server"
DataSourceID=SqlDataSource1 DataKeyNames=userid
AutoGenerateColumns="False" BackColor="White"
BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3"
Width="449px" style="margin-right: 0px" PageSize="10">
<RowStyle ForeColor="#000066" />
<Columns>
<asp:BoundField DataField="userid" HeaderText="ID" ReadOnly="True"
SortExpression="userid" />
<asp:BoundField DataField="Name" HeaderText="Name" ReadOnly="True"
SortExpression="Name" />
<asp:BoundField DataField="Email" HeaderText="email" ReadOnly="True"
SortExpression="email" />
<asp:BoundField DataField="Position" HeaderText="Position" ReadOnly="True"
SortExpression="Position" />
<asp:CommandField HeaderText="Select User" ShowHeader="True"
ShowSelectButton="True" />
<asp:TemplateField HeaderText="GFLN MemberShip">
<ItemTemplate>
<asp:CheckBox ID="chkgfln" Enabled=false runat="server" Checked='<%# Bind("GFLN_Membership") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Company details">
<ItemTemplate>
<asp:Button ID="btnViewDetails" runat="server" Text="Details" OnClick="BtnViewDetails_Click" OnClientClick=true />
<asp:ModalPopupExtender ID="mdlPopup" runat="server" TargetControlID="btnViewDetails" PopupControlID="pnlPopup"
CancelControlID="btnClose" BackgroundCssClass="modalBackground" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Want Visa">
<ItemTemplate>
<asp:CheckBox ID="chkvisa" Enabled=false runat="server" Checked='<%# Bind("want_visa") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Approve">
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" Enabled=true runat="server" Checked=false />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="White" ForeColor="#000066" />
<PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
<HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:reniConnectionString %>"
SelectCommand="SELECT * FROM [Users]" ></asp:SqlDataSource>
</td>
</tr>
<tr>
<td align=center>
<asp:Button ID="Button1" runat="server" Text="Approve" /></td>
</tr>
</table>
</div>
<div visible=true runat=server id=details class="right_txt_space_accm">
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode=conditional>
<ContentTemplate>
<asp:PlaceHolder ID="PlaceHolder1" Visible =false runat="server">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><strong>Companies </strong></td>
</tr>
<tr>
<td align=left width="100%">
<asp:GridView ID="GridView2" runat="server" Width="286px">
</asp:GridView>
</td> </tr>
<tr>
<td><strong>Attendenes </strong></td>
</tr>
<tr> <td align=left width="100%">
<asp:GridView ID="GridView3" runat="server" Width="286px">
</asp:GridView>
</td> </tr>
</table>
</asp:PlaceHolder>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="GridView1" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
</div>
<asp:Panel ID="pnlPopup" runat="server" Width="500px" style="display:none">
<asp:UpdatePanel ID="updPnlCustomerDetail" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:DetailsView ID="dvCustomerDetail" AutoGenerateRows=true runat="server" DefaultMode="Edit" Width="95%" BackColor="white"></asp:DetailsView>
</ContentTemplate>
</asp:UpdatePanel>
<div align="right" style="width:95%">
<asp:Button
ID="btnSave" runat="server" Text="Save"
OnClientClick="alert('Sorry, but I didnt implement save because I dont want my northwind database getting messed up.'); return false;"
Width="50px" />
<asp:Button ID="btnClose" runat="server" Text="Close" Width="50px" />
</div>
</asp:Panel>
</div>
</form>
</body>
</html>
please reply me if need code behind too !
There is no achievement without goals
-
Dec 12th, 2010, 09:12 AM
#3
Re: avoid generic error
Hey,
You can add error handling at the application level, to trap unhandled errors, and show a more informative error. However, the best approach would be to figure out what the actual problem is. I am on my phone just now, but i will take a proper look at your code later.
Gary
-
Jan 5th, 2011, 09:37 PM
#4
Thread Starter
Fanatic Member
Re: avoid generic error
well gep it is basically exception that should throw when i uplaod my applciation on server
but it gives me generalized kind of error
Server Error in '/' Application.
--------------------------------------------------------------------------------
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /ErrorPage.aspx
There is no achievement without goals
-
Jan 5th, 2011, 11:56 PM
#5
Re: avoid generic error
It looks to me that you are getting an unhandled error on the page and in your web.config you have set "/ErrorPage.aspx" as the default or other page to go to in this event. The problem is /ErrorPage.aspx does not exist... and so you are getting a second error (404 not found).
Check your web.config and that errorPage.aspx exists where you specify.
The problem with computers is their nature is pure logic. Just once I'd like my computer to do something deluded.
-
Jan 6th, 2011, 01:17 AM
#6
Thread Starter
Fanatic Member
Re: avoid generic error
i have config like this
Code:
<customErrors defaultRedirect="ErrorPage.aspx" mode="RemoteOnly">
<error statusCode="404" redirect="filenotfound.aspx" />
</customErrors>
There is no achievement without goals
-
Jan 6th, 2011, 02:45 AM
#7
Re: avoid generic error
Ok, so that is the first part of what brin was asking. Does that file exist on the server?
Gary
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|