J
Jonas Auken
hi,
I have a repeater which dynamically loads another usercontrol throught
databinding:
OnClick: DataBind()
rptProduct_ItemDataBound: ViewSmall _viewSmall = (ViewSmall)
LoadControl("ViewSmall.ascx");
The two UserControls are in the same directory on the server.
The webroot for this application is c:\inetpub\wwwroot\joa\InfoCenter\Test
and the usercontrols are placed in
c:\inetpub\wwwroot\joa\InfoCenter\Test\DesktopModules\Csite.Product\ViewSmal
l.ascx
I get this error the first time I click this button after recompiling my
project - but only the first; all subsequent clicks, reload or whatever,
finds the UserControl and displays everything correctly:
Failed to map the path
'/InfoCenter/Test/DesktopModules/Csite.Product/ViewSmall.ascx'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Failed to map the path
'/InfoCenter/Test/DesktopModules/Csite.Product/ViewSmall.ascx'.
Source Error:
Line 265: {
Line 266: PlaceHolder phProduct =
(PlaceHolder)e.Item.FindControl("phProduct");
Line 267: ViewSmall _viewSmall = (ViewSmall)
LoadControl("ViewSmall.ascx");
Line 268: InfoProductRow product = (InfoProductRow)e.Item.DataItem;
Line 269: _viewSmall.Product = product;
Source File:
c:\inetpub\wwwroot\joa\infocenter\test\desktopmodules\csite.product\viewlist
..ascx.cs Line: 267
Stack Trace:
[HttpException (0x80004005): Failed to map the path
'/InfoCenter/Test/DesktopModules/Csite.Product/ViewSmall.ascx'.]
System.Web.Hosting.ISAPIWorkerRequestInProcForIIS6.MapPathSlowUsingIISCore(S
tring path) +197
System.Web.Hosting.ISAPIWorkerRequest.MapPath(String path) +419
System.Web.HttpRequest.MapPath(String virtualPath, String baseVirtualDir,
Boolean allowCrossAppMapping) +254
System.Web.UI.TemplateControlParser.CompileAndGetParserCacheItem(String
virtualPath, String inputFile, HttpContext context) +99
System.Web.UI.TemplateControlParser.GetCompiledType(String virtualPath,
String inputFile, HttpContext context) +12
System.Web.UI.UserControlParser.GetCompiledUserControlType(String
virtualPath, String inputFile, HttpContext context) +176
System.Web.UI.TemplateControl.LoadControl(String virtualPath) +41
Csite.InfoCenter.Product.List.rptProduct_ItemDataBound(Object sender,
RepeaterItemEventArgs e) in
c:\inetpub\wwwroot\joa\infocenter\test\desktopmodules\csite.product\viewlist
..ascx.cs:267
System.Web.UI.WebControls.Repeater.OnItemDataBound(RepeaterItemEventArgs
e) +110
System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex,
ListItemType itemType, Boolean dataBind, Object dataItem) +139
System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean
useDataSource) +475
System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +49
System.Web.UI.WebControls.Repeater.DataBind() +23
Csite.InfoCenter.Product.List.rptProducts_ItemDataBound(Object sender,
RepeaterItemEventArgs e) in
c:\inetpub\wwwroot\joa\infocenter\test\desktopmodules\csite.product\viewlist
..ascx.cs:260
System.Web.UI.WebControls.Repeater.OnItemDataBound(RepeaterItemEventArgs
e) +110
System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex,
ListItemType itemType, Boolean dataBind, Object dataItem) +139
System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean
useDataSource) +475
System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +49
System.Web.UI.WebControls.Repeater.DataBind() +23
Csite.InfoCenter.Product.List.DataBind(Object[] objectArray) in
c:\inetpub\wwwroot\joa\infocenter\test\desktopmodules\csite.product\viewlist
..ascx.cs:190
Csite.InfoCenter.Product.List.GetSearchData(InfoCenterDB db, Guid
guidSortiment, Guid guidManufacturer, SearchType searchType, String
searchData, Int32 pageIndex) in
c:\inetpub\wwwroot\joa\infocenter\test\desktopmodules\csite.product\viewlist
..ascx.cs:135
Csite.InfoCenter.Product.List.InitProductList() in
c:\inetpub\wwwroot\joa\infocenter\test\desktopmodules\csite.product\viewlist
..ascx.cs:47
Csite.InfoCenter.Product.List.OnProductSearch(Object sender, Sortiment
sortiment, SearchType searchType, String searchData) in
c:\inetpub\wwwroot\joa\infocenter\test\desktopmodules\csite.product\viewlist
..ascx.cs:277
Csite.InfoCenter.ProductHandler.OnSearchEventHandler.Invoke(Object
sender, Sortiment sortiment, SearchType searchType, String searchData) +0
Csite.InfoCenter.ProductHandler.SearchEvents.OnSearch(Object sender,
Sortiment sortiment, SearchType searchType, String searchData) in
C:\Inetpub\wwwroot\joa\InfoCenter\InfoCenter\Csite.EventHandler\Events.cs:12
8
Csite.InfoCenter.Product.Search_postback.Search(Object sender,
CommandEventArgs e) in
c:\inetpub\wwwroot\joa\infocenter\Test\DesktopModules\Csite.Product\Search_p
ostback.ascx.cs:71
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePo
stBackEvent(String eventArgument) +115
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
Can you help me?
regards,
Jonas
I have a repeater which dynamically loads another usercontrol throught
databinding:
OnClick: DataBind()
rptProduct_ItemDataBound: ViewSmall _viewSmall = (ViewSmall)
LoadControl("ViewSmall.ascx");
The two UserControls are in the same directory on the server.
The webroot for this application is c:\inetpub\wwwroot\joa\InfoCenter\Test
and the usercontrols are placed in
c:\inetpub\wwwroot\joa\InfoCenter\Test\DesktopModules\Csite.Product\ViewSmal
l.ascx
I get this error the first time I click this button after recompiling my
project - but only the first; all subsequent clicks, reload or whatever,
finds the UserControl and displays everything correctly:
Failed to map the path
'/InfoCenter/Test/DesktopModules/Csite.Product/ViewSmall.ascx'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Failed to map the path
'/InfoCenter/Test/DesktopModules/Csite.Product/ViewSmall.ascx'.
Source Error:
Line 265: {
Line 266: PlaceHolder phProduct =
(PlaceHolder)e.Item.FindControl("phProduct");
Line 267: ViewSmall _viewSmall = (ViewSmall)
LoadControl("ViewSmall.ascx");
Line 268: InfoProductRow product = (InfoProductRow)e.Item.DataItem;
Line 269: _viewSmall.Product = product;
Source File:
c:\inetpub\wwwroot\joa\infocenter\test\desktopmodules\csite.product\viewlist
..ascx.cs Line: 267
Stack Trace:
[HttpException (0x80004005): Failed to map the path
'/InfoCenter/Test/DesktopModules/Csite.Product/ViewSmall.ascx'.]
System.Web.Hosting.ISAPIWorkerRequestInProcForIIS6.MapPathSlowUsingIISCore(S
tring path) +197
System.Web.Hosting.ISAPIWorkerRequest.MapPath(String path) +419
System.Web.HttpRequest.MapPath(String virtualPath, String baseVirtualDir,
Boolean allowCrossAppMapping) +254
System.Web.UI.TemplateControlParser.CompileAndGetParserCacheItem(String
virtualPath, String inputFile, HttpContext context) +99
System.Web.UI.TemplateControlParser.GetCompiledType(String virtualPath,
String inputFile, HttpContext context) +12
System.Web.UI.UserControlParser.GetCompiledUserControlType(String
virtualPath, String inputFile, HttpContext context) +176
System.Web.UI.TemplateControl.LoadControl(String virtualPath) +41
Csite.InfoCenter.Product.List.rptProduct_ItemDataBound(Object sender,
RepeaterItemEventArgs e) in
c:\inetpub\wwwroot\joa\infocenter\test\desktopmodules\csite.product\viewlist
..ascx.cs:267
System.Web.UI.WebControls.Repeater.OnItemDataBound(RepeaterItemEventArgs
e) +110
System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex,
ListItemType itemType, Boolean dataBind, Object dataItem) +139
System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean
useDataSource) +475
System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +49
System.Web.UI.WebControls.Repeater.DataBind() +23
Csite.InfoCenter.Product.List.rptProducts_ItemDataBound(Object sender,
RepeaterItemEventArgs e) in
c:\inetpub\wwwroot\joa\infocenter\test\desktopmodules\csite.product\viewlist
..ascx.cs:260
System.Web.UI.WebControls.Repeater.OnItemDataBound(RepeaterItemEventArgs
e) +110
System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex,
ListItemType itemType, Boolean dataBind, Object dataItem) +139
System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean
useDataSource) +475
System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +49
System.Web.UI.WebControls.Repeater.DataBind() +23
Csite.InfoCenter.Product.List.DataBind(Object[] objectArray) in
c:\inetpub\wwwroot\joa\infocenter\test\desktopmodules\csite.product\viewlist
..ascx.cs:190
Csite.InfoCenter.Product.List.GetSearchData(InfoCenterDB db, Guid
guidSortiment, Guid guidManufacturer, SearchType searchType, String
searchData, Int32 pageIndex) in
c:\inetpub\wwwroot\joa\infocenter\test\desktopmodules\csite.product\viewlist
..ascx.cs:135
Csite.InfoCenter.Product.List.InitProductList() in
c:\inetpub\wwwroot\joa\infocenter\test\desktopmodules\csite.product\viewlist
..ascx.cs:47
Csite.InfoCenter.Product.List.OnProductSearch(Object sender, Sortiment
sortiment, SearchType searchType, String searchData) in
c:\inetpub\wwwroot\joa\infocenter\test\desktopmodules\csite.product\viewlist
..ascx.cs:277
Csite.InfoCenter.ProductHandler.OnSearchEventHandler.Invoke(Object
sender, Sortiment sortiment, SearchType searchType, String searchData) +0
Csite.InfoCenter.ProductHandler.SearchEvents.OnSearch(Object sender,
Sortiment sortiment, SearchType searchType, String searchData) in
C:\Inetpub\wwwroot\joa\InfoCenter\InfoCenter\Csite.EventHandler\Events.cs:12
8
Csite.InfoCenter.Product.Search_postback.Search(Object sender,
CommandEventArgs e) in
c:\inetpub\wwwroot\joa\infocenter\Test\DesktopModules\Csite.Product\Search_p
ostback.ascx.cs:71
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePo
stBackEvent(String eventArgument) +115
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
Can you help me?
regards,
Jonas