Saturday, March 31, 2012
strange 404 in ASP.NET IIS5
if anyone else out there has had a similar problem. For some reason
when users receive this error and they hit refresh the error goes
away. Seems like a IE or ASP.NET cache problem, but can not find any
articles on it.
404 not found C:\inetpub\mySite\mySite_com_files\pictures.aspx
StackTrace
System.Web.UI.TemplateParser.GetParserCacheItem() at
System.Web.UI.TemplateControlParser.CompileAndGetP arserCacheItem(String
virtualPath, String inputFile, HttpContext context) at
System.Web.UI.TemplateControlParser.GetCompiledIns tance(String
virtualPath, String inputFile, HttpContext context) at
System.Web.UI.PageParser.GetCompiledPageInstanceIn ternal(String
virtualPath, String inputFile, HttpContext context) at
System.Web.UI.PageHandlerFactory.GetHandler(HttpCo ntext context,
String requestType, String url, String path) at
System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String
requestType, String path, String pathTranslated, Boolean useAppConfig)
-MikeOh yeah, sometimes instead of mySite_com_files it will be a username_com_files or username_files. _files is on all these 404's no matter what was before it.
-Mike
-- Mike wrote: --
I have been receiving this very strange 404 lately and was wondering
if anyone else out there has had a similar problem. For some reason
when users receive this error and they hit refresh the error goes
away. Seems like a IE or ASP.NET cache problem, but can not find any
articles on it.
404 not found C:\inetpub\mySite\mySite_com_files\pictures.aspx
StackTrace
System.Web.UI.TemplateParser.GetParserCacheItem() at
System.Web.UI.TemplateControlParser.CompileAndGetP arserCacheItem(String
virtualPath, String inputFile, HttpContext context) at
System.Web.UI.TemplateControlParser.GetCompiledIns tance(String
virtualPath, String inputFile, HttpContext context) at
System.Web.UI.PageParser.GetCompiledPageInstanceIn ternal(String
virtualPath, String inputFile, HttpContext context) at
System.Web.UI.PageHandlerFactory.GetHandler(HttpCo ntext context,
String requestType, String url, String path) at
System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String
requestType, String path, String pathTranslated, Boolean useAppConfig)
-Mike
Monday, March 26, 2012
Strange Error
"An error has occurred because a control with auto-generated id '_ctl0' could not be located to raise a postback event. To avoid this error, explicitly set the ID property of controls that raise postback events. "
The page consists of a dynamically created table web control in codebehind - that's it.
Instead of posting code and seeing what's wrong with it (if anything), I'm just curious if anyone has ever had experience with this message. I googled and found very little, and the one guy who resolved his issue said "Ah, the error message had nothing to do with the real problem..." but doesn't explain what he did to correct it.I managed to find a way around my problem. Due to the architecture of this project, I have to avoid some of the things that make .NET easier for everyone - viewstate and querystrings. The page prior to this one submitted to it via Javascript, so when my page loaded, I would Request.Form() on any of the items that I needed.
Solution:
I ditched the Javascript part of it, by implementing ASP.NET's button web control, and redirected to the page using a querystring instead. Then on the Page_Load, I just retrieved the querystring values, and populated the necessary variables.