 |
|
ขอความช่วยเหลือครับ พอดีเอาไฟล์ลง SERVER คนใช้ส่วนมากไม่ได้ Logout คืปิด windows ไปเฉยๆๆๆ |
|
 |
|
|
 |
 |
|
พอปิดวินโดว์เฉยๆๆ เลยไม่ รีมูล session หรือเปล่าครับ
|
 |
 |
 |
 |
Date :
2011-06-28 11:14:22 |
By :
jamePP |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ปิดเวป browser session ก็หายแล้วนี่ครับ
|
 |
 |
 |
 |
Date :
2011-06-28 11:25:52 |
By :
cyberstein |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ปกติ Session จะหายไปเองอัตโนมัติน่ะครับ เมื่อไม่มีการ Refresh หรือติดต่อกับ Server ประมาณ 20 นาทีครับ
|
 |
 |
 |
 |
Date :
2011-06-28 13:22:02 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมกำหนด Session.timeout = 10 ให้มันหายภายใน 10 นาที งั้นแสดงว่าไม่ใข่เป็นที่เกี่ยวกับ session
ที่คุณ Palmบอกวาส ปิดเวป browser session ก็หายแล้วนี่ครับ ตัดปัญหาเรื่อง session ไปได้เลยช่ายมะครับ
เราต้องไปพิจารณาที่ SERVER ทีใช่เปล่าครับ
|
 |
 |
 |
 |
Date :
2011-06-28 14:56:57 |
By :
jamePP |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
mr.win หรือติดต่อกับ Server ประมาณ 20 นาทีครับ สามารถกำหนดที่ IIS ได้ด้วยใช่ไหมครับ
|
 |
 |
 |
 |
Date :
2011-06-28 14:58:53 |
By :
jamePP |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ใช่ครับ
|
 |
 |
 |
 |
Date :
2011-06-28 15:05:12 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เพิ่งใหม่กับ WebApp ขอให้ความเห็นแบบมือใหม่นะครับ
มันอยู่ที่ว่า คุณใช้ตัวแปร Session เก็บข้อมูลขนาดใหญ่หรือเปล่า เช่น DataTable เป็นต้น
ถ้าเก็บแล้วมีการ Clear บ้างหรือไม่
เท่าที่เคยอ่านผ่านตามา การใช้ตัวแปร Session ต้องใช้อย่างระวัง
ไม่นิยมเก็บข้อมูลขนาดใหญ่ แต่ถ้าจะใช้เก็บข้อมูลขนาดใหญ่จริงๆ เมื่อส่งข้อมูลเสร็จ ก็ต้องรีบ Clear
|
 |
 |
 |
 |
Date :
2011-06-28 15:05:55 |
By :
watcharop |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (VB.NET)
Public Function LOGOUT(ByRef form As Object, ByVal u_id As String) As Boolean
If nDBCON.DB_Connect(intranet_Web.s_Server, intranet_Web.s_User, intranet_Web.s_Pass, intranet_Web.s_ASYDB) <> "PASS" Then
''''MsgBox("Don't Connect to Data Base", MsgBoxStyle.OkOnly, "Connection Error")
form.Session.clear ()
form.Session.Contents.Remove("UserId")
form.Session.Contents.Remove("Name")
form.Session.Contents.Remove("Lname")
form.Session.Contents.Remove("Email")
Return False
nDBCON.DisConnect_rtn()
Exit Function
End If
แบบเป็น Function
|
 |
 |
 |
 |
Date :
2011-06-28 15:12:34 |
By :
jamePP |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (VB.NET)
Protected Sub cmdexit_click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles cmdexit.Click
' Take some action based on the response.
'MsgBox("YES, continue!!", , Title)
'Call LOGOUT(Me, Session("UserId"))
Dim dmStrScript As String
Session.Clear()
Session.Contents.Remove("UserId")
Session.Contents.Remove("Name")
Session.Contents.Remove("Lname")
Session.Contents.Remove("Email")
Response.redirect(MMMM.aspx)
End Sub
|
 |
 |
 |
 |
Date :
2011-06-28 15:13:49 |
By :
jamePP |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อยากรู้ว่าใช้งานกี่คนถึงได้ช้าขนาดนั้นครับ 
|
 |
 |
 |
 |
Date :
2011-06-28 15:35:12 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
5-6 ก็ไปละคุณ วิน ผม เลย งง ว่าเป็นที่อะไร
|
 |
 |
 |
 |
Date :
2011-06-28 15:46:32 |
By :
jamePP |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Query นั้นสำคัญมากครับ ถ้า Query หนัก ๆ นี่ทำให้ Server โหลด ถึงกับค้างไปได้เลย 
|
 |
 |
 |
 |
Date :
2011-06-28 15:50:56 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
จากประสบกาณ์ Application ทำงานช้า มากกว่า 90% จะต้องปรับจูนที่โปรแกรมครับ เช่นพวก Query
|
 |
 |
 |
 |
Date :
2011-06-28 15:51:53 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Query แค่ SELECT อย่างเดียว กับ iNSERT อย่างเดียว แล้วก็ใช้ TMP มาช่วยด้วยครับ SELECT มากสุด 2 ตารางครับ คุณวิน
|
 |
 |
 |
 |
Date :
2011-06-28 15:53:47 |
By :
jamePP |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
พอ COPY เว็บคอนฟิก ไปทับอันเก่าก้ดีเหมือนเดิม
|
 |
 |
 |
 |
Date :
2011-06-28 16:17:20 |
By :
jamePP |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ลองเอาโค้ดของ Sub หรือ Function ที่ทำงานช้า
มาแปะให้ดูซิครับ
เห็นบอกว่าใช้ TMP ด้วย
ปกติ Query 2 Table มักจะไม่ซับซ้อน
บางทีการใช้ TMP อาจมาช่วยซ้ำเติม ทำให้ทำงานช้า ถ้ายังใช้ไม่เป็น
|
 |
 |
 |
 |
Date :
2011-06-28 16:18:31 |
By :
watcharop |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (VB.NET)
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<appSettings/>
<connectionStrings>
<add name="INTCONN" connectionString="Server=000000;Database=000000;User ID=000000;Password=000000;"
providerName="System.Data.SqlClient" />
<add name="INTRANETConnectionString" connectionString="Data Source=000000;Initial Catalog=000000;Persist Security Info=True;User ID=intranet;Password=int1685"
providerName="System.Data.SqlClient" />
<add name="INTRANETConnectionString1" connectionString="Data Source=000000;Initial Catalog=INTRANET;Persist Security Info=True;User ID=000000;Password=000000"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<!--
<customErrors mode="Off"/>
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>
</compilation>
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
</namespaces>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<!-- <authentication mode="Windows"/> -->
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<!-- <sessionState ................. timeout="90" /> -->
</system.web>
</configuration>
เว็บคอนฟิก รับ
|
ประวัติการแก้ไข 2011-06-29 08:20:46 2011-06-29 08:21:33
 |
 |
 |
 |
Date :
2011-06-29 08:18:13 |
By :
jamePP |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เป็นที่ hardware กับ network รึเปล่า
|
 |
 |
 |
 |
Date :
2011-06-29 09:01:40 |
By :
cyberstein |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|