برگزیده های پرشین تولز

مشکل در کجاست؟؟!

ma_christian

Registered User
تاریخ عضویت
25 ژانویه 2007
نوشته‌ها
368
لایک‌ها
2
محل سکونت
Tehran
سلام ؛ من یک آدرس دارم به شکل: post/65.aspx و محتوای اون رو از آدرس post.aspx?id=65 می خوانم (65 برای مثال هست البته). اولین بار که پروژه رو آپلود کردم debug - on بود و تمامی آدرس صفحات رو بازنویسی می کرد. من در فایل web.config ، debug رو Off کردم و اون رو دوباره آپلود کردم حالا دیگه کار نمی کنه. البته این رو بگم که من صفحات دیگه ای رو هم بازنویسی کردم ولی فقط همین یکی به اینصورت درمیاد.

حالا دوباره رو کردم می بینم که این خطا رو میده:
کد:
Compiler Error Message: BC30456: 'InitializeCulture' is not a member of 'ASP.post_aspx'.

Source Error:

 

Line 1:  <%@ page language="VB" enableviewstate="false" inherits="defaultt, App_Web_mbdtcq6j" %>

نمی دانم مشکل کجاست. ممنون میشم اگه کمک کنید.
 

H_R

مدیر بازنشسته
تاریخ عضویت
30 مارس 2005
نوشته‌ها
3,298
لایک‌ها
17
سن
42
محل سکونت
North Pole
خوب فقط 65 کار نمیکنه ؟
در این صورت باید post.aspx?id=65 هم کار نکنه ؟ کار میکنه ؟
 

ma_christian

Registered User
تاریخ عضویت
25 ژانویه 2007
نوشته‌ها
368
لایک‌ها
2
محل سکونت
Tehran
سلام / نه این 65 فقط یک مثال برای کوئری آی دی بود. کلا هر عددی که می ذاریم در همان صفحه ی اصلی کار نمی کند.
 

ma_christian

Registered User
تاریخ عضویت
25 ژانویه 2007
نوشته‌ها
368
لایک‌ها
2
محل سکونت
Tehran
در گوگل که جستجو کردم این را یافتم: از سایت مایکروسافت

کد:
1. If you use Visual studio to publish your site, during the publishing stage on framework 2.0 uncheck the "allow this precompiled site to be updatable".

2. Ensure ASP.Net is installed correctly, I found that my Web Server root was configured to use ASP.Net 1.1 by default so ran the following line to fix it to 2.0 even though my site was configured for 2.0 at site level, eliminating this glitch seems logical.

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i

This will also fix any mapping/installation problems.

Also ran aspnet_regiis -r

This will replace all mappings recursively to 2.0 regardless.

3. Make sure page directives at the top of aspx files are correct and ‘inherits’ is pointing to your class correctly. I could not see any problems with mine, so did not explore down this path to thoroughly, but noted others saying issues with ambiguous inheritance maybe related.

4. Declare culture in your web.config, example

<globalization uiCulture="en" culture="en-NZ" />

OR

<globalization uiCulture="auto" culture="auto" />

5. Change debug="true" to "false" in web.config and any pages which have it set (I recommend removing it entirely from pages and just using web.config)

* This final step eliminated the problem for me, very weird.

Now if this last step eliminates the problem, and later on down the track you get an error in your codebehind file while coding or debugging, you will no longer be pointed directly to the line in your codebehind file when an exception occurs, asp.net will just show you the line in the aspx file you called from. Temporarily switch debug back to true in web.config if you can't figure out the problem and then you can see it, if InitializeCulture crops back up instead, mash refresh a few times like you used to do! Then turn debug back off.
link: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=823980&SiteID=1
 

H_R

مدیر بازنشسته
تاریخ عضویت
30 مارس 2005
نوشته‌ها
3,298
لایک‌ها
17
سن
42
محل سکونت
North Pole
الان حل شده مشکلت ؟
 

ma_christian

Registered User
تاریخ عضویت
25 ژانویه 2007
نوشته‌ها
368
لایک‌ها
2
محل سکونت
Tehran
خیلی جالب شده :)
من اول اسم صفحه رو از post.aspx به show.aspx تغییر دادم درست شد.
دیشب رفتم دیدم بازم مشکل داره. یکدفعه یک مشکلی پیش اومد و کانکشنم رو عوض کردم صفحه رو دوباره باز کردم دیدم درست کار می کنه.

امروز با همون کانکشن قبلی رفتم و صفحه رو باز کردم دیدم درست کار می کنه. :blink:
نمیدانم ... مشکل چی هست؟
فعلا که داره درست کار می کنه. تا حالا ببینم چی میشه

البته من سایت رو با حالت debug=true آپلود کردم. حالا که میخوام عوضش کنم میترسم دوباره همون مشکل پیش بیاد. آخه یکبار هم این صفحه درست کار می کرد وقتی وضعیت دیباگ رو به false تغییر دادم دوباره مشکل ساز شد.
 
بالا