PDA

View Full Version : اشکال بعد از آپلود اولین سایت! نمایش نمیده



مهدی رحیم زاده
چهارشنبه 05 خرداد 1389, 19:56 عصر
سلام
این اشکال رو میگیره :


It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
رو این خط :

<authentication mode="Windows"/>

چکار کنم ؟
دلیلش چیه؟
با تشکر

hamedsabzian
چهارشنبه 05 خرداد 1389, 21:15 عصر
<authentication mode="Windows"/>



فکر می کنم اگه به جای اون خط توی web.config کد زیر رو بنویسی درست شه!

<authentication mode="Forms"/>

<برنامه نویس>
چهارشنبه 05 خرداد 1389, 21:34 عصر
منم همین مشکل را دارم واین کار رو کردم اما مشکل حل نشد

Peyman.Gh
چهارشنبه 05 خرداد 1389, 21:55 عصر
این خط را پاک کنید
<authentication mode="Forms"/>

hamedsabzian
چهارشنبه 05 خرداد 1389, 22:01 عصر
این خط را پاک کنید
<authentication mode="Forms"/>
درسته!
این رو هم تست کنید.

<identity impersonate="true"/>
<authentication mode="Forms" />
یه سری هم به صفحات زیر بزنید!
http://msdn.microsoft.com/en-us/library/eeyk640h.aspx
http://msdn.microsoft.com/en-us/library/ff649264.aspx

مهدی رحیم زاده
چهارشنبه 05 خرداد 1389, 22:52 عصر
حالا این اشکال رو میگیره :


System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
کانکشن رو چطوری باید ایجاد کنم که اینجا بشناسدش؟
با تشکر

PhoenixNet
چهارشنبه 05 خرداد 1389, 22:53 عصر
سلام

این خطا هنگامی روی میده که Web.config اصلی در Root سایت نیست یا یک کپی از آن (بعضی پارامترها درWeb.config فقط در شاخه اصلی باید باشند)در فولدرهای داخلی است.

یا فولدری که سایت در آن قرار گرفته به عنوان an application in IIS تعریف نشده است.اگه مشکل Web.Config ندارید یه تماس با پشتیبانی هاستتون بد نیست.

<برنامه نویس>
پنج شنبه 06 خرداد 1389, 02:07 صبح
من همین کاری که شما گفتید کردم حالا این پیغام رو میده



Server Error in '/naeim' Application.

The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the <compilation> element of the Web.config file.

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.Configuration.ConfigurationErrorsException: The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the <compilation> element of the Web.config file.

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:

[ConfigurationErrorsException: The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the <compilation> element of the Web.config file.] System.Web.Compilation.MultiTargetingUtil.Validate CompilerVersionFor40AndAbove(String compilerVersion) +235 System.Web.Compilation.MultiTargetingUtil.Validate CompilerVersionFor40AndAbove() +76 System.Web.Compilation.MultiTargetingUtil.Initiali zeTargetFrameworkName() +101 System.Web.Compilation.MultiTargetingUtil.EnsureFr ameworkNamesInitialized() +149 System.Web.Compilation.BuildManager.Initialize() +204 System.Web.Compilation.BuildManager.InitializeBuil dManager() +246 System.Web.HttpRuntime.HostingInit(HostingEnvironm entFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +338[HttpException (0x80004005): The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the <compilation> element of the Web.config file.] System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +8807004 System.Web.HttpRuntime.EnsureFirstRequestInit(Http Context context) +97 System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +258

مهدی رحیم زاده
پنج شنبه 06 خرداد 1389, 08:34 صبح
من همین کاری که شما گفتید کردم حالا این پیغام رو میده
دوست من
نسخه دات نت پنل شما با نسخه دات نت برنامتون همخوانی داره؟

<برنامه نویس>
پنج شنبه 06 خرداد 1389, 09:32 صبح
دوست من
نسخه دات نت پنل شما با نسخه دات نت برنامتون همخوانی داره؟

خوب باید چی کارکنم یعنی راهی نیست

mohsen.nsb44
پنج شنبه 06 خرداد 1389, 09:37 صبح
خوب باید چی کارکنم یعنی راهی نیست
دوست عزيز اگه پنل شما از نسخه دات نت شما پشتيباني نكنه شما بايد هاستي رو انتخاب كنيد كه از ورژن دات نت شما پشتيباني بكنه موقع اجاره فضا مشخصات هاست و پشتيباني از نرم افزار ها نوشته شده

مهدی رحیم زاده
پنج شنبه 06 خرداد 1389, 16:47 عصر
دوست من شما دو تا راه دارین :
1- برنامتون رو با نسخه ای که هاست پشتبانی می کنه هماهنگ کنید.
2- از هاستی استفاده کنید که این نسخه از دات نت رو پشتیبانی می کنه .
من خودم روش اول رو انتخاب کردم و برنامه رو از دات نت 3.5 به 2.0 تغییر دادم .
موفق باشید

<برنامه نویس>
پنج شنبه 06 خرداد 1389, 20:13 عصر
دوست من شما دو تا راه دارین :
1- برنامتون رو با نسخه ای که هاست پشتبانی می کنه هماهنگ کنید.
2- از هاستی استفاده کنید که این نسخه از دات نت رو پشتیبانی می کنه .
من خودم روش اول رو انتخاب کردم و برنامه رو از دات نت 3.5 به 2.0 تغییر دادم .
موفق باشید

ببینید برنامه من از با .net 3.5 نوشته شده است . اما هاست net 4 رو پشتیبانی میکنه مگه همیشه وزژن بالاتر پاببن تر رو پشیتبانی نمیکنه

Vahid_moghaddam
پنج شنبه 06 خرداد 1389, 20:51 عصر
توی تنظیمات سایت در کنترل پنل هاست اگه برای ورژن دات نت به شما امکان انتخاب 2 و 4 رو داده، 2 رو انتخاب کنید. می تونید با 3.5 کار کنید

<برنامه نویس>
پنج شنبه 06 خرداد 1389, 23:12 عصر
نه من نیمتونم انتخاب کنم چطوری میتونم برنامه رو با net 4 تغییر بدم

مهدی رحیم زاده
جمعه 07 خرداد 1389, 11:46 صبح
دوست من
احتمالا شما از هاست های رایگان احتمالا AspSpider استفاده می کنید، درسته؟
اگه اینه میتونید توی Web.Config تمام 3.5 ها رو به 4.0 تغییر بدین ، برنامه اجرا میشه ، اما احتمالا به مشکلات بعدی بر می خورید .
بهترین راه حل استفاده از هاست هایی که خودت میگیری یا میتونی از دوستانی که میتونن یک فضا برای چند روز و تست وب سایتت بگیری . البته اگر حدسیات من درست باشه.
موفق باشید

<برنامه نویس>
جمعه 07 خرداد 1389, 16:46 عصر
دقیقا حدسیات شما درسته . مرسی یک هاست خریدم مشکلم حل شد .

فقط چطوری میشه با net 4 برنامه نوشت برنامه خاصی باید دانلود کنیم

مهدی رحیم زاده
شنبه 08 خرداد 1389, 08:29 صبح
دقیقا حدسیات شما درسته . مرسی یک هاست خریدم مشکلم حل شد .
خوب خدا رو شکر که حل شد

فقط چطوری میشه با net 4 برنامه نوشت برنامه خاصی باید دانلود کنیم
دوست من برای این کار میتونی از VS2010 استفاده کنی.
موفق باشید