PDA

View Full Version : خطا بعد از publish سایت



alicomputer
یک شنبه 15 دی 1392, 11:13 صبح
وقتی می خوام سایت را publish کنم پیغام خطا می دهد

Error 5 Web deployment task failed.(Remote agent (URL http://spadanadsl.ir//MSDEPLOYAGENTSERVICE) could not be contacted. Make sure the remote agent service is installed and started on the target computer.)
Make sure the site name, user name, and password are correct. If the issue is not resolved, please contact your local or server administrator.
Error details:
Remote agent (URL http://spadanadsl.ir//MSDEPLOYAGENTSERVICE) could not be contacted. Make sure the remote agent service is installed and started on the target computer.
An unsupported response was received. The response header 'MSDeploy.Response' was '' but 'v1' was expected.
The remote server returned an error: (401) Unauthorized. 0 0 SpadanADSL


خود پروژه را آپلود کردم سایت پسغام می دهد

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>

Alfred188
یک شنبه 15 دی 1392, 11:47 صبح
سلام، شما می خواهید سایت رو مستقیم روی هاس پابلیش کنید؟
_اول سایت رو روی سیستم خودتون پابلیش کنید و بعد فایل هاش رو بفرستید روی هاست و بعد سایت رو تست کنید.
_در مورد دوم هم یه مشکلی پیدا کرده که برای نمایش ایراد به شما لازم میدونه که mode در قسمت customErrors در وب کانفیگ رو off کنید و احتمالا بخواد که دیباگ رو هم true کنید.

alicomputer
دوشنبه 16 دی 1392, 17:27 عصر
سلام، شما می خواهید سایت رو مستقیم روی هاس پابلیش کنید؟
_اول سایت رو روی سیستم خودتون پابلیش کنید و بعد فایل هاش رو بفرستید روی هاست و بعد سایت رو تست کنید.
_در مورد دوم هم یه مشکلی پیدا کرده که برای نمایش ایراد به شما لازم میدونه که mode در قسمت customErrors در وب کانفیگ رو off کنید و احتمالا بخواد که دیباگ رو هم true کنید.

اینکار را انجام دادم و دوباره فایل ها را آپلود کردم باز م ارور می ده

اطلاعات کانفیگ

<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>

<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="SpadanADSL.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>

<appSettings>

<add key="PgwSite" value="https://pgw.bpm.bankmellat.ir/pgwchannel/startpay.mellat"/>
<add key="TerminalId" value="968019"/>
<add key="UserName" value="espadansh"/>
<add key="UserPassword" value="es26pa"/>
<add key="CallBackUrl" value=""/>
<add key="BPService.Reference" value="https://pgws.bpm.bankmellat.ir/pgwchannel/services/pgw"/>
<!-- <add key="BPService.Reference" value="https://pgwstest.bpm.bankmellat.ir/pgwchannel/services/pgw?wsdl"/>-->

</appSettings>


<connectionStrings>

<!-- <add name="MainDBConnectionString" connectionString="server=localhost;Database=SpadanMainDB;User Id=alishah;Password=!@#ali123;" providerName="System.Data.SqlClient"/>-->

<add name="MainDBConnectionString" connectionString="$(ReplacableToken_MainDBConnectionString-Web.config Connection String_0)" providerName="System.Data.SqlClient"/>

</connectionStrings>
<system.web>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>
</system.web>



<applicationSettings>
<SpadanADSL.My.MySettings>
<setting name="SpadanADSL_ir_bankmellat_bpm_pgws_PaymentGatewayIm plService"
serializeAs="String">
<value>https://pgws.bpm.bankmellat.ir/pgwchannel/services/pgw</value>
</setting>
<setting name="SpadanADSL_ir_bankmellat_bpm_pgwstest_PaymentGatew ayImplService"
serializeAs="String">
<value>https://pgwstest.bpm.bankmellat.ir/pgwchannel/services/pgw</value>
</setting>
</SpadanADSL.My.MySettings>
</applicationSettings>
</configuration>

Alfred188
دوشنبه 16 دی 1392, 18:13 عصر
سلام، هنوز همون ارور قبلی رو میده؟
از صفحه ی خطا یه عکس بگیرید و بزارید

alicomputer
دوشنبه 16 دی 1392, 20:40 عصر
این هم صفحه خطا

saeideh_sadat
سه شنبه 17 دی 1392, 00:42 صبح
خطا می گوید که شما تنها یک بخش configSections می توانید داشته باشید و باید configSections اولین فرزندconfiguration باشد پس شما عبارت زیر را پایین تر از configSections قرار دهید
<system.web> <customErrors mode="Off"/>
</system.web>

alicomputer
سه شنبه 17 دی 1392, 09:47 صبح
خطا می گوید که شما تنها یک بخش configSections می توانید داشته باشید و باید configSections اولین فرزندconfiguration باشد پس شما عبارت زیر را پایین تر از configSections قرار دهید
<system.web> <customErrors mode="Off"/>
</system.web>


میشه کد را کامل بزارید

nassim0
سه شنبه 17 دی 1392, 12:18 عصر
در تنظيمات هاست گزينه ايي مربوط به انتخاب customErrors و customErrors mode="RemoteOnly" وجود داره . تيك مربوط به اونها رو چك كن . در ضمن اين تنظيمات رو توي وب كانفيگ پروژه لحاظ كردي ؟

alicomputer
سه شنبه 17 دی 1392, 16:28 عصر
در تنظيمات هاست گزينه ايي مربوط به انتخاب customErrors و customErrors mode="RemoteOnly" وجود داره . تيك مربوط به اونها رو چك كن . در ضمن اين تنظيمات رو توي وب كانفيگ پروژه لحاظ كردي ؟

من از ایران هاست فضا گرفتم و همچین گزینه ای ندیدم و در تنظیمات وب کانفیگ هم چون تسلط ندارم چیزی اضافه نکردم

demolition
سه شنبه 17 دی 1392, 18:28 عصر
اینکار را انجام دادم و دوباره فایل ها را آپلود کردم باز م ارور می ده

اطلاعات کانفیگ

<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>

<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="SpadanADSL.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>

<appSettings>

<add key="PgwSite" value="https://pgw.bpm.bankmellat.ir/pgwchannel/startpay.mellat"/>
<add key="TerminalId" value="968019"/>
<add key="UserName" value="espadansh"/>
<add key="UserPassword" value="es26pa"/>
<add key="CallBackUrl" value=""/>
<add key="BPService.Reference" value="https://pgws.bpm.bankmellat.ir/pgwchannel/services/pgw"/>
<!-- <add key="BPService.Reference" value="https://pgwstest.bpm.bankmellat.ir/pgwchannel/services/pgw?wsdl"/>-->

</appSettings>


<connectionStrings>

<!-- <add name="MainDBConnectionString" connectionString="server=localhost;Database=SpadanMainDB;User Id=alishah;Password=!@#ali123;" providerName="System.Data.SqlClient"/>-->

<add name="MainDBConnectionString" connectionString="$(ReplacableToken_MainDBConnectionString-Web.config Connection String_0)" providerName="System.Data.SqlClient"/>

</connectionStrings>
<system.web>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>
</system.web>



<applicationSettings>
<SpadanADSL.My.MySettings>
<setting name="SpadanADSL_ir_bankmellat_bpm_pgws_PaymentGatewayIm plService"
serializeAs="String">
<value>https://pgws.bpm.bankmellat.ir/pgwchannel/services/pgw</value>
</setting>
<setting name="SpadanADSL_ir_bankmellat_bpm_pgwstest_PaymentGatew ayImplService"
serializeAs="String">
<value>https://pgwstest.bpm.bankmellat.ir/pgwchannel/services/pgw</value>
</setting>
</SpadanADSL.My.MySettings>
</applicationSettings>
</configuration>


این وب کانفیگ چند تا مشکل داره اول اینکه یه دونه <system.web> باید داشته باشید شما دوتا دارید بعدم تگ <configSections> و محتویاتشو باید اولین آیتم <configuration> باشه

alicomputer
سه شنبه 17 دی 1392, 20:46 عصر
فعلا با یکسری تغییراتی که روی هاست دادیم مشکل حل شد