PDA

View Full Version : مشکل در اجرای سایت پس از قراردادن در هاست



eshaghi
دوشنبه 07 اسفند 1385, 15:15 عصر
با عرض سلام
من یک سایت با بانک sqlserver نوشتم وبانکی با همین نام در کنترل پنل هاست و با uid و pass متفاوت ساختم وبا export بانکی که در روی کامپیوتر خودم بود آن را در هاست قرار دادم و تمتم پوشه های پروژه را از طریق ftp در هاست کپی کردم ولی در هنگام اجرا خطای 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


در ضمن رشته اتصال به بانک در کامپیوتر به صورت زیراست و id و pass بانک روی هاست با این دو فرق می کندآیا باید در رشته اتصال تغیری ایجاد کنم و من فایل web.config را برای بررسی آن و راهنمای من برای حل این مشکل در زیر آورده ام .
با تشکر فراوان از شما

<?xml version="1.0" encoding="utf-8" ?>
<configuration>

<system.web>


<compilation defaultLanguage="vb" debug="true" />


<customErrors mode="on" />


<authentication mode="Windows" />



<authorization>
<allow users="*" />
</authorization>


<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />



<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>


<globalization requestEncoding="utf-8" responseEncoding="utf-8" />

</system.web>

</configuration>

سار
دوشنبه 07 اسفند 1385, 15:55 عصر
Connection String مربوط به Host رو تو WEB.Config ست کن.

eshaghi
دوشنبه 07 اسفند 1385, 19:32 عصر
با تشکر
اگر ممکن است یک مثال از این set کردن نشان دهیدو بگویید که Connection String هاست به چه صورت است

Alireza_Salehi
دوشنبه 07 اسفند 1385, 21:02 عصر
برای متصل شدن به موارد زیر نیاز داری (که باید از هاست بگیری):
SQL Server IP
DataBase Name
UserName
Password

<connectionStrings>
<add name="ConnectionString" connectionString="data source='xxx.xxx.xxx.xxx,xxxx';User ID='YourUserName';Password=YourPassword;database=' YourDataBaseName'" providerName="System.Data.SqlClient"/>
</connectionStrings>این قسمت xxx.xxx.xxx.xxx,xxxx آی پی و پورت هستند

mohandess_anita
یک شنبه 19 آبان 1387, 10:57 صبح
من هم همین مشکل رو دارم
و کد بالا
<connectionStrings>
<add name="ConnectionString" connectionString="data source='xxx.xxx.xxx.xxx,xxxx';User ID='YourUserName';Password=YourPassword;database=' YourDataBaseName'" providerName="System.Data.SqlClient"/>
</connectionStrings>

را قرار دادم ولی ارور زیر را می دهد
A connection was successfully established with the server, but then an error occurred during the login process. (provider: Named Pipes Provider, error: 0 - No process is on the other end of the pipe.)

yasmeen
یک شنبه 19 آبان 1387, 11:48 صبح
سایت من به بانک متصل نیست ولی همین خطا را می دهد ایا باید برای ساختن سایت که در host جواب بده در vs باید new/website را انتخاب کنیم یا project vh

yasmeen
یک شنبه 19 آبان 1387, 11:50 صبح
لطفا اگر می دونید جواب بدید خیلی ضروری است

cache_overflow
یک شنبه 19 آبان 1387, 11:59 صبح
سایت من به بانک متصل نیست ولی همین خطا را می دهد ایا باید برای ساختن سایت که در host جواب بده در vs باید new/website را انتخاب کنیم یا project vh

این دیگه چه جور مشکلیه شما دارین دوست عزیز. اگه از دیتابیس استفاده کردید و این مشکل را دارید در connection string دنبال حل آن باشد. در ضمن برای پروژه های تحت وب New Website را انتخاب کنید !