Can't run it live

liunx

Guest
I have started learning ASP.NET 2.0 and managed to try out a few stuff like masterpages and sitemap navigation. All this I can do it locally but when I upload my code to my web hosting provider, I got this error mesg


Server Error in '/' Application.
--------------------------------------------------------------------------------

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>


I tried some search like ask my to delete web.config file and I did but stil same error mesg. What should I do now? Thanks.I realize that I need to put

<customErrors mode="Off"/>

to see the specific error. I did and after that I got this error mesg.


Cannot find ContentPlaceHolder 'ContentPlaceHolder1' in the master page '/MasterPage.master', verify content control's ContentPlaceHolderID attribute in the content page.
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: Cannot find ContentPlaceHolder 'ContentPlaceHolder1' in the master page '/MasterPage.master', verify content control's ContentPlaceHolderID attribute in the content page.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): Cannot find ContentPlaceHolder 'ContentPlaceHolder1' in the master page '/MasterPage.master', verify content control's ContentPlaceHolderID attribute in the content page.]
System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +814
System.Web.UI.Page.get_Master() +48
System.Web.UI.Page.ApplyMasterPage() +18
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +543


How do I fix this problem? What it means? ThanksIt means the page MasterPage.master doesn't have a container named "ContentPlaceHolder1", however the page the is referencing the master page says it should be there.Oh, I'm so silly. I realize that my masterpage.master has nothing! The file is there but nothing inside. Not sure why. Anyway, after I upload this file again, it works. Anyway, thanks afterburn.
 
Back
Top