PDA

View Full Version : علت این خطا:Using themed css files requires a header control on the page.



Alireza_Salehi
شنبه 09 مرداد 1389, 09:32 صبح
وب سایت داشتیم که بخوبی در حال کار بود ، وب سایت به هاستینگ جدید منتقل شد و باز هم همه چیز به خوبی کار می کرد.
اما یکدفعه بدون این که تغییری در وب سایت داده شده باشد این پیام خطا نمایش داده می شود:

Server Error in '/' Application.

Using themed css files requires a header control on the page. (e.g. <head runat="server" />).

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.InvalidOperationException: Using themed css files requires a header control on the page. (e.g. <head runat="server" />).

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:

[InvalidOperationException: Using themed css files requires a header control on the page. (e.g. <head runat="server" />).]
System.Web.UI.PageTheme.SetStyleSheet() +2458406
System.Web.UI.Page.OnInit(EventArgs e) +8699420
System.Web.UI.Control.InitRecursive(Control namingContainer) +333
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378

Version Information: Microsoft .NET Framework Version:2.0.50727.4016; ASP.NET Version:2.0.50727.4016 در ضمن طبق بررسی هایی که انجام دادم تمام صفحات head با خصوصیت runat="server" را دارندو و theme نیز در wen.config ست شده است.

eyes_shut_number1
شنبه 09 مرداد 1389, 09:38 صبح
شما فایل رو در شاخه App_Themes قرار دادید درسته؟اگه اینطوره وارد صفحه و یا مسترپیجی که از اون استفاده کردید بشید و چک کنید که تگ Head ایا runat="server" داره یا نه

<head runat="server" >
اگه نداشت اضافه کنید

Alireza_Salehi
شنبه 09 مرداد 1389, 09:40 صبح
تگ head داره از این لحاظ مشکلی نیست. در هاستینگ قبلی چنین خطایی نداشت . در هاستینگ جدید اینطوری شده!

eyes_shut_number1
شنبه 09 مرداد 1389, 09:46 صبح
بله.چک کنید ببینید runat="Server" داره یا نه؟

Alireza_Salehi
شنبه 09 مرداد 1389, 10:08 صبح
MasterPage اصلی یک تگ Head با مشخصه RunAt="Server" دارد، همه صفحات هم از این مستر استفاده می کنند.
مشکل از جای دیگری است. یکدفعه بدون هیچ تغییری این طوری شده قبلا درست کار میکرده!