|
Hi,
i designed an asp.net site and uploaded it to www.somee.com[^]
but when i run my site
this error appear to me
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
please help me
thx
BESHOY
FACULTY OF COMPUTER AND INFORMATION
COMPUTER SCINCE DEPARTMENT
|
|
|
|
|
BESHOY MARKO wrote: FACULTY OF COMPUTER AND INFORMATION
COMPUTER SCINCE DEPARTMENT
FACULTY?? And you have to ask how to solve this problem
We see far too many of your students here.
only two letters away from being an asset
|
|
|
|
|
This may occur for anything.
I think there must be some permission issue with the website. You can also check if the path of the virtual directory is correct. Means it should point to the location where it finds Web.config.
You can also debug your application to see what exactly the error occurring.
It is very hard to tell you the error as this page comes everytime when a call is made remotely and error is produced while processing child request.
|
|
|
|
|
i think ur web.config is not properly uploaded or some file data missing while uploading ur website
|
|
|
|
|
Hi,
I have a user control housing a datalist displaying products.
The idea is to have a link on each of the products that takes you to an exploded view of the product.
If I drag the user control to a page and set a DisplayedProducts property the products are displayed, and the ItemCommand fires fine.
However, if I create the user control through code and add it to a ContentPlaceHolder the ItemCommand does not fire...
heres the code that adds the control...
Control productListViewerLoad = LoadControl("Controls/ProductListViewier.ascx");
Controls_ProductListViewier productListViewer = (Controls_ProductListViewier)productListViewerLoad;
_Products = BLL.ProductBLL.GetByCategory(categoryID, false);
productListViewer.DisplayedProducts = _Products;
productHolder.Controls.Clear();
productHolder.Controls.Add(productListViewer);
Any ideas as to how I can get the ItemCommand to fire??
Thanks,
Chas
|
|
|
|
|
where is the Handler added in your page ?
like
productListViewer.ItemCommand += new ...
The line should be specified, I think.
|
|
|
|
|
This is specified in the control
<asp:DataList ID="dlProducts" runat="server" RepeatColumns="2" OnItemCommand="dlProducts_ItemCommand2">
(Its the control I add to the holder, not the datalist itself)
|
|
|
|
|
you mean even you declared dlProducts_ItemCommand2 in your code behind, it is not calling properly. This is weird.
It should be calling when event is generated in the client and which results in postback..
Check your code thoroughly, I think there must be some very trivial mistaken made in your code. Or you can show us the Code you wrote....
|
|
|
|
|
heres the control ascx:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ProductListViewier.ascx.cs" Inherits="Controls_ProductListViewier" %>
<asp:DataList ID="dlProducts" runat="server" RepeatColumns="2" OnItemCommand="dlProducts_ItemCommand2">
<ItemTemplate>
<table style="padding:12px">
<tr>
<td>
<table>
<tr>
<td class="productdetail" colspan="2">
<%#DataBinder.Eval(Container.DataItem,"Name")%>
</td>
</tr>
<tr>
<td class="productdetailheading">
PRODUCT CODE:
</td>
<td class="productdetail">
<%#DataBinder.Eval(Container.DataItem, "ProductCode")%>
</td>
</tr>
<tr>
<td class="productdetailheading">
DISPOSE/ REUSE:
</td>
<td class="productdetail">
<%#DataBinder.Eval(Container.DataItem, "DisposeReuse")%>
</td>
</tr>
<tr>
<td class="productdetaillink" colspan="2">
<asp:LinkButton ID="btnShowProduct" runat="server" Text="Show Product Details" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "ProductID")%>' CommandName="ShowProductDetails" />
</td>
</tr>
</table>
</td>
<td>
<img alt="Image" style="height:100px; width:100px;" src="HttpHandlers/ImageHandler.ashx?productid=<%#DataBinder.Eval(Container.DataItem,"ProductID") %>"/>
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
and the code behind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataLinq;
using BLL = BusinesLogic;
public partial class Controls_ProductListViewier : System.Web.UI.UserControl
{
private List<Product> _DisplayedProducts;
public List<Product> DisplayedProducts
{
get
{
return _DisplayedProducts;
}
set
{
_DisplayedProducts = value;
dlProducts.DataSource = _DisplayedProducts;
dlProducts.DataBind();
}
}
public delegate void ProductSelectHandler(Product product);
public event ProductSelectHandler ProductSelected;
private void OnProductSelected(Product product)
{
if (ProductSelected != null)
{
ProductSelected(product);
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
protected void dlProducts_ItemCommand2(object source, DataListCommandEventArgs e)
{
if (e.CommandName == "ShowProductDetails")
{
int selectedProductID = 0;
if (Int32.TryParse(e.CommandArgument.ToString(), out selectedProductID))
{
Product selectedProduct =
(from product in DisplayedProducts
where product.ProductID == selectedProductID
select product).Single();
OnProductSelected(selectedProduct);
}
}
}
}
The point is this works fine until i load the control dynamically into a place holder.
I want to use the same page (thats within a master page) to display the product listing, then when a product is selected the control publishes an event - the page receives this event, clears the place holder then displays the product details (loads a product display control into the holder)...
modified on Saturday, August 29, 2009 7:24 PM
|
|
|
|
|
Ok managed to find a fix...
The problem was that as the control was generated dynamically, on clicking on the link button the page would refresh, on its refresh the control was not created, so the link button didnt exist. I googled this for hours and the more I read about it the more I was told that its an EnableViewState issue (assuming enable view state would ensure the control exists after refreshes) - I enabled view state on the master page, the place holder on the master page, the page directive, the content holder on the page, the content holder that i populate dynamically, the user control, the data list within the control... still when the page refreshed the dynamically loaded content was always lost... any ideas on this?
Anyway to hack around this - when i set the datasource for the datalist i store it in a session parameter.
Then override OnInit on the page - and if the session parameter exists then recreate the control first. This has got it working but its a hack that I dont like.
|
|
|
|
|
I have already saw your code and it seemed to me fine. Yes, you need to EnableViewState when you want the control to appear during postbacks.
Chazzysb wrote: when i set the datasource for the datalist i store it in a session parameter
I suggest you to dont do that. Dont use Session to store datasource, as heavy data will eat up application pool memory. Rather
Use Fiddler to check what exactly the response generated. Check what exactly the problem is during the postbacks.
|
|
|
|
|
I have a site with fileupload control and some textboxes.
I want to collect data from these controls to a sql server(2005) connection.
Please Help me.
If anyone has an article please type that link.
|
|
|
|
|
Step One[^]
Step Two[^]
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
hey
i have a client that want me to show all his you tube movies on his personal site.
i need to get all the movies and display on a list .
when i user click a movie i need to display the movie on the client site.
maybe someone have a reference to guide ,how to do it ,or how to work with you tube...
|
|
|
|
|
This [^]can be a good place to start looking for some available API
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
|
thanx , will use the api!
|
|
|
|
|
That you have a 'client', and don't know how to use google, or search the site, is a disgrace.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I found that some javascript functions are requied to register first by using RegisterStartupScript in order to be used in ASP.net, however, some functions are not required for registration.
anyone can help me clarify what kind of javascript funcitons have to be registered?
|
|
|
|
|
Use RegisterStartupScript method to register the client script which needs to placed at the bottom of page. If you have events of controls are tied to client side scripts, then this could be useful.
As the control will not be availble at the page strtup, it's good to register them at the bottom.
Let me know if this helps you.
|
|
|
|
|
thanks, what do you mean the "bottom"?
|
|
|
|
|
Bottom means the lower section of the page.
Write some page, execute in borwser (e.g. IE) and try to check the view source.
|
|
|
|
|
Generally, before calling any javascript function, you need to add the source to the head element of the page using script tag. RegisterStartupScript just does this. It adds the script src to the page so that you can call it later.
Generally, Startup scripts which are added by ScriptManager is not required to be registered by yourself. As ASP.NET controls adds up those for you. But if you need some custom script to be added to your page, you can use this function.
|
|
|
|
|
In a web project under VS2008 team with some CSS file:
1) If the style is changed or another one applied the changes are visible from design view in VS2008
2) If the project gets published and you access it from IE as it is linked from IIS like http://localhost/WierdCSS[^] it is valid also
3) But when the project is being run from VS (using its ASP.NET Development Server http://localhost:29321/WierdCSS[^]) the styles become as they were from the very onset you created the style sheet file and once assigned its styles to web controls. Any following changes in the CSS do not take place in that case.
What is the problem with ASP.NET Development Server????
Чесноков
|
|
|
|
|
Are your CSS is within the App_THEME folder...
If so, you need to apply the Theme to the Site.
Another reason that might come in place, always add your files from root path specify like
~/css/myfile.css
not like
myfile.css (even if both are in same folder)
|
|
|
|